This commit is contained in:
committed by
Git OBS Bridge
parent
a2afc99c64
commit
0ffa8e7b93
@@ -1,388 +1,3 @@
|
||||
ChangeLog:
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* spu-tdep.c: Include "infcall.h".
|
||||
(spu_auto_flush_cache_p): New static variable.
|
||||
(spu_objfile_from_context): New function.
|
||||
(flush_ea_cache, spu_attach_normal_stop): Likewise.
|
||||
(show_spu_auto_flush_cache): Likewise.
|
||||
(_initialize_spu_tdep): Attach to normal_stop observer.
|
||||
Install "set spu auto-flush-cache" / "show spu auto-flush-cache"
|
||||
commands.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* spu-tdep.c (spu_address_class_type_flags): New function.
|
||||
(spu_address_class_type_flags_to_name): Likewise.
|
||||
(spu_address_class_name_to_type_flags): Likewise.
|
||||
(spu_pointer_to_address): Handle __ea pointers.
|
||||
(spu_integer_to_address): Likewise.
|
||||
(spu_gdbarch_init): Install address class handlers.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* spu-tdep.c: Include "block.h".
|
||||
(setspucmdlist, showspucmdlist): New static variables.
|
||||
(spu_stop_on_load_p): Likewise.
|
||||
(spu_catch_start): New function.
|
||||
(show_spu_command, set_spu_command): New functions.
|
||||
(show_spu_stop_on_load): Likewise.
|
||||
(_initialize_spu_tdep): Attach spu_catch_start to new_objfile observer.
|
||||
Install "set spu" / "show spu" prefix command handler.
|
||||
Install "set spu stop-on-load" / "show spu stop-on-load" command.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* ppc-linux-tdep.c: Include "exceptions.h", "arch-utils.h",
|
||||
and "spu-tdep.h".
|
||||
(spe_context_lm_addr, spe_context_offset): New static variables.
|
||||
(spe_context_cache_ptid, spe_context_cache_address): Likewise.
|
||||
(ppc_linux_new_objfile): New function.
|
||||
(ppc_linux_spe_context): Likewise.
|
||||
(struct ppu2spu_cache, struct ppu2spu_data): New data types.
|
||||
(ppu2spu_prev_arch, ppu2spu_this_id, ppu2spu_prev_register,
|
||||
ppu2spu_unwind_register, ppu2spu_sniffer,
|
||||
ppu2spu_dealloc_cache): New functions.
|
||||
(ppu2spu_unwind): New static variable.
|
||||
(ppc_linux_init_abi): Install cross-architecture unwinder.
|
||||
(_initialize_ppc_linux_tdep): Attach to new_objfile observer.
|
||||
|
||||
* spu-tdep.c (struct spu2ppu_cache): New data type.
|
||||
(spu2ppu_prev_arch, spu2ppu_this_id, spu2ppu_prev_register,
|
||||
spu2ppu_sniffer, spu2ppu_dealloc_cache): New functions.
|
||||
(spu2ppu_unwind): New static variable.
|
||||
(spu_gdbarch_init): Install cross-architecture unwinder.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* target.h (enum strata): New value arch_stratum.
|
||||
* target.c (target_require_runnable): Skip arch_stratum targets.
|
||||
|
||||
* configure.tgt (powerpc-*-linux* | powerpc64-*-linux*): Add
|
||||
solib-spu.o and spu-multiarch.o to gdb_target_obs.
|
||||
* Makefile.in (ALL_TARGET_OBS): Add solib-spu.o and spu-multiarch.o.
|
||||
(ALLDEPFILES): Add solib-spu.c and spu-multiarch.c.
|
||||
|
||||
* solib-spu.c: New file.
|
||||
* spu-multiarch.c: New file.
|
||||
|
||||
* spu-tdep.h (SPUADDR, SPUADDR_SPU, SPUADDR_ADDR): New macros.
|
||||
(set_spu_solib_ops): Add prototype.
|
||||
(spu_multiarch_enable, spu_multiarch_disable): Likewise.
|
||||
|
||||
* spu-tdep.c (struct gdbarch_tdep): New members id and lslr.
|
||||
(spu_lslr): New function.
|
||||
|
||||
(spu_address_to_pointer): New function.
|
||||
(spu_pointer_to_address): Support SPU ID address encoding. Use
|
||||
lslr from tdep structure.
|
||||
(spu_integer_to_address): Likewise.
|
||||
(spu_frame_unwind_cache): Update for encoded addresses.
|
||||
(spu_unwind_pc, spu_unwind_sp): Likewise.
|
||||
(spu_read_pc, spu_write_pc): Likewise.
|
||||
(spu_push_dummy_call): Likewise.
|
||||
(spu_software_single_step): Likewise.
|
||||
(spu_overlay_update_osect): Likewise.
|
||||
|
||||
(spu_dis_asm_print_address): New function.
|
||||
(gdb_print_insn_spu): Likewise.
|
||||
|
||||
(spu_gdbarch_init): Store requested SPU ID in tdep structure.
|
||||
Query for LSLR and store it into tdep as well.
|
||||
Install spu_address_to_pointer and gdb_print_insn_spu.
|
||||
|
||||
* ppc-linux-tdep.c: Include "observer.h", "auxv.h" and "elf/common.h".
|
||||
(ppc_linux_entry_point_addr): New static variable.
|
||||
(ppc_linux_inferior_created): New function.
|
||||
(ppc_linux_displaced_step_location): Likewise.
|
||||
(ppc_linux_init_abi): Enable Cell/B.E. support if supported
|
||||
by the target.
|
||||
(_initialize_ppc_linux_tdep): Attach to inferior_created observer.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* features/Makefile (WHICH): Add rs6000/powerpc-cell32l and
|
||||
rs6000/powerpc-cell64l.
|
||||
(rs6000/powerpc-cell32l-expedite): Define.
|
||||
(rs6000/powerpc-cell64l-expedite): Likewise.
|
||||
* features/rs6000/powerpc-cell32l.xml: New file.
|
||||
* features/rs6000/powerpc-cell64l.xml: New file.
|
||||
* features/rs6000/powerpc-cell32l.c: New generated file.
|
||||
* features/rs6000/powerpc-cell64l.c: New generated file.
|
||||
|
||||
* regformats/rs6000/powerpc-cell32l.dat: New generated file.
|
||||
* regformats/rs6000/powerpc-cell64l.dat: New generated file.
|
||||
|
||||
* ppc-linux-tdep.h (tdesc_powerpc_cell32l): Add prototype.
|
||||
(tdesc_powerpc_cell64l): Likewise.
|
||||
* ppc-linux-tdep.c: Include "features/rs6000/powerpc-cell32l.c"
|
||||
and "features/rs6000/powerpc-cell64l.c".
|
||||
(_initialize_ppc_linux_tdep): Initialize target descriptions.
|
||||
(ppc_linux_spu_section): New function.
|
||||
(ppc_linux_core_read_description): Detect Cell/B.E. core files.
|
||||
* ppc-linux-nat.c (PPC_FEATURE_CELL): Define.
|
||||
(ppc_linux_read_description): Detect Cell/B.E. architecture.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* target-descriptions.h (tdesc_compatible_p): New.
|
||||
(tdesc_add_compatible): New.
|
||||
* target-descriptions.c (arch_p): New VEC_P type.
|
||||
(struct target_desc): New member compatible.
|
||||
(free_target_description): Handle it.
|
||||
(maint_print_c_tdesc_cmd): Likewise.
|
||||
(tdesc_compatible_p): New function.
|
||||
(tdesc_add_compatible): New function.
|
||||
|
||||
* xml-tdesc.c (tdesc_end_compatible): New function.
|
||||
(target_children): Handle <compatible> element.
|
||||
|
||||
* arch-utils.c (choose_architecture_for_target): Accept target
|
||||
description instead of BFD architecture as input. Query target
|
||||
description for compatible architectures.
|
||||
(gdbarch_info_fill): Update call.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* gdbarch.sh (gcore_bfd_target): New gdbarch callback.
|
||||
* gdbarch.h, gdbarch.c: Regenerate.
|
||||
|
||||
* gcore.c (default_gcore_target): Make return value const.
|
||||
Call gdbarch_gcore_bfd_target if present.
|
||||
(default_gcore_arch, default_gcore_mach): Use target_gdbarch.
|
||||
|
||||
* corelow.c (core_read_description): Call gdbarch_core_read_description
|
||||
on core_gdbarch instead of current_gdbarch.
|
||||
|
||||
* ppc-linux-tdep.c (ppc_linux_init_abi): Install gcore_bfd_target.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* gdbarch.sh (pointer_to_address): Change to type 'm'.
|
||||
(address_to_pointer): Likewise.
|
||||
* gdbarch.c, gdbarch.h: Regenerate.
|
||||
|
||||
* inferior.h (unsigned_pointer_to_address): Add GDBARCH argument.
|
||||
(signed_pointer_to_address): Likewise.
|
||||
(unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
|
||||
* findvar.c (unsigned_pointer_to_address): Likewise.
|
||||
(signed_pointer_to_address): Likewise.
|
||||
(unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
|
||||
|
||||
* avr-tdep.c (avr_address_to_pointer): Likewise.
|
||||
(avr_pointer_to_address): Likewise.
|
||||
* iq2000-tdep.c (iq2000_pointer_to_address): Likewise.
|
||||
(iq2000_address_to_pointer): Likewise.
|
||||
* m32c-tdep.c (m32c_m16c_address_to_pointer): Likewise.
|
||||
(m32c_m16c_pointer_to_address): Likewise.
|
||||
* spu-tdep.c (spu_pointer_to_address): Likewise.
|
||||
* xstormy16-tdep.c (xstormy16_pointer_to_address): Likewise.
|
||||
(xstormy16_address_to_pointer): Likewise.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* printcmd.c (print_scalar_formatted): Always truncate
|
||||
unsigned data types.
|
||||
|
||||
* cli-dump.c (struct callback_data): Change type of load_offset
|
||||
to CORE_ADDR.
|
||||
(restore_binary_file): Update type casts.
|
||||
(restore_command): Parse load_offset as address, not long.
|
||||
|
||||
* utils.c (string_to_core_addr): Do not sign-extend value.
|
||||
* varobj.c (find_frame_addr_in_frame_chain): Truncate frame_base
|
||||
before comparing against requested frame address.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* breakpoint.h (breakpoint_relocate): New.
|
||||
* breakpoint.c (breakpoint_relocate): New function.
|
||||
* objfiles.c (objfile_relocate): Call breakpoint_relocate
|
||||
instead of breakpoint_re_set.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* breakpoint.c (insert_breakpoint): Treat negative return values
|
||||
from target_insert_breakpoint or target_insert_hw_breakpoint as
|
||||
temporary issues; do not throw an error.
|
||||
(remove_breakpoint): Likewise for target_remove_breakpoint and
|
||||
target_remove_hw_breakpoint.
|
||||
|
||||
* i386-nat.c (i386_remove_hw_breakpoint): Return positive value
|
||||
on failure.
|
||||
* remote.c (remote_insert_breakpoint): Likewise.
|
||||
(remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Likewise.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* solib.h (struct target_so_ops): New member open_bfd.
|
||||
* solib.c (solib_map_sections): Use open_bfd callback if present.
|
||||
(symbol_add_stub): Likewise.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* linux-nat.c: Include <sys/vfs.h> and <dirent.h>.
|
||||
(SPUFS_MAGIC): Define.
|
||||
(spu_enumerate_spu_ids): New function.
|
||||
(linux_proc_xfer_spu): New function.
|
||||
(linux_xfer_partial): Handle TARGET_OBJECT_SPU.
|
||||
|
||||
(iterate_over_spus): New function.
|
||||
(struct linux_spu_corefile_data): New data type.
|
||||
(linux_spu_corefile_callback): New function.
|
||||
(linux_spu_make_corefile_notes): New function.
|
||||
(linux_nat_make_corefile_notes): Call it.
|
||||
|
||||
* corelow.c (struct spuid_list): New data type.
|
||||
(add_to_spuid_list): New function.
|
||||
(core_xfer_partial): Handle TARGET_OBJECT_SPU.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* arch-utils.h (save_current_gdbarch): New.
|
||||
* arch-utils.c (restore_current_gdbarch): New function.
|
||||
(save_current_gdbarch): Likewise.
|
||||
|
||||
* frame.c: Include "arch-utils.h".
|
||||
(get_frame_id): Reset current_gdbarch while calling frame
|
||||
sniffer callbacks.
|
||||
(frame_unwind_register_value): Likewise.
|
||||
(get_frame_type): Likewise.
|
||||
(frame_arch_unwind): Likewise.
|
||||
|
||||
* stack.c: Include "arch-utils.h".
|
||||
(print_stack_frame): Reset current_gdbarch to frame arch
|
||||
while handling one frame.
|
||||
(print_frame_args): Likewise.
|
||||
(print_frame_info): Likewise.
|
||||
(print_frame_local_vars): Likewise.
|
||||
|
||||
* regcache.c (regcache_raw_read): Reset current_gdbarch
|
||||
while calling target routines.
|
||||
(regcache_raw_write): Likewise.
|
||||
|
||||
* gdbarch.sh (gdbarch_data): Reset current_gdbarch while
|
||||
calling data post_init callback.
|
||||
* gdbarch.c: Regenerate.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* frame.h (frame_arch_unwind): New.
|
||||
* frame-unwind.h (frame_prev_arch_ftype): New type.
|
||||
(struct frame_unwind): New member prev_arch.
|
||||
* frame.c (struct frame_info): New member prev_arch.
|
||||
(frame_arch_unwind): New function.
|
||||
(get_frame_arch): Reimplement in terms of frame_arch_unwind.
|
||||
* sentinel-frame.c (sentinel_frame_prev_arch): New function.
|
||||
(sentinel_frame_unwinder): Install it.
|
||||
|
||||
* frame.c (select_frame): Reset current_gdbarch.
|
||||
|
||||
* frame.c (frame_pc_unwind): Use frame_arch_unwind instead
|
||||
of get_frame_arch.
|
||||
(frame_unwind_register_value): Likewise.
|
||||
(frame_unwind_register_signed): Likewise.
|
||||
(frame_unwind_register_unsigned): Likewise.
|
||||
* frame-unwind.c (frame_unwind_got_optimized): Likewise.
|
||||
(frame_unwind_got_register): Likewise.
|
||||
(frame_unwind_got_constant): Likewise.
|
||||
(frame_unwind_got_bytes): Likewise.
|
||||
(frame_unwind_got_address): Likewise.
|
||||
|
||||
* frame.h (enum frame_type): New value ARCH_FRAME.
|
||||
* frame.c (fprint_frame_type): Handle ARCH_FRAME.
|
||||
* stack.c (print_frame_info): Likewise.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* target.h (struct target_ops): New member to_thread_architecture.
|
||||
(target_thread_architecture): New macro.
|
||||
* target.c (update_current_target): Inherit to_thread_architecture.
|
||||
(default_thread_architecture): New function.
|
||||
(debug_to_thread_architecture): New function.
|
||||
(setup_target_debug): Handle to_thread_architecture.
|
||||
|
||||
* regcache.h (get_thread_arch_regcache): New.
|
||||
* regcache.c (struct regcache_list): New data type.
|
||||
(current_regcache): Hold regcache list instead of single regcache.
|
||||
(current_thread_ptid, current_thread_arch): New static variables.
|
||||
(get_thread_arch_regcache): New function.
|
||||
(get_thread_regcache): Use it. Call target_thread_architecture.
|
||||
(regcache_thread_ptid_changed): Update to current_regcache changes.
|
||||
(registers_changed): Likewise. Reset current_thread_arch and
|
||||
current_thread_ptid.
|
||||
|
||||
* thread.c (switch_to_thread): Reset current_gdbarch.
|
||||
|
||||
* remote.c (remote_wait): Access target registers in target_gdbarch.
|
||||
* linux-nat.c (linux_nat_do_thread_registers): Likewise.
|
||||
* proc-service.c (ps_lgetregs, ps_lsetregs): Likewise.
|
||||
(ps_lgetfpregs, ps_lsetfpregs): Likewise.
|
||||
* sol-thread.c (ps_lgetregs, ps_lsetregs): Likewise.
|
||||
(ps_lgetfpregs, ps_lsetfpregs): Likewise.
|
||||
|
||||
|
||||
gdbserver/ChangeLog:
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
|
||||
(parse_spufs_run): New function.
|
||||
(ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
|
||||
(ppc_breakpoint_at): Handle SPU breakpoints.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
|
||||
and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
|
||||
and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
|
||||
* Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
|
||||
(powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
|
||||
* linux-ppc-low.c (PPC_FEATURE_CELL): Define.
|
||||
(init_registers_powerpc_cell32l): Add prototype.
|
||||
(init_registers_powerpc_cell64l): Likewise.
|
||||
(ppc_arch_setup): Detect Cell/B.E. architecture.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* linux-low.c: Include <sys/types.h>, <sys/stat.h>,
|
||||
<sys/vfs.h> and <dirent.h>.
|
||||
(SPUFS_MAGIC): Define.
|
||||
(spu_enumerate_spu_ids): New function.
|
||||
(linux_spu_qxfer_partial): New function.
|
||||
(linux_target_ops): Install linux_spu_qxfer_partial.
|
||||
|
||||
|
||||
testsuite/ChangeLog:
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* gdb.xml/tdesc-regs.exp: Skip for SPU targets.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* gdb.base/dump.exp: Handle SPU like 64-bit platforms.
|
||||
|
||||
|
||||
doc/ChangeLog:
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* gdb.texinfo (Cell Broadband Engine SPU architecture): Document the
|
||||
"set spu auto-flush-cache" and "show spu auto-flush-cache" commands.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* gdb.texinfo (Cell Broadband Engine SPU architecture): Document the
|
||||
"set spu stop-on-load" and "show spu stop-on-load" commands.
|
||||
|
||||
2008-09-11 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* gdb.texinfo (Target Descriptions): Document <compatible> element.
|
||||
|
||||
|
||||
================================================================================
|
||||
--- gdb/Makefile.in
|
||||
+++ gdb/Makefile.in
|
||||
@@ -499,7 +499,7 @@ ALL_TARGET_OBS = \
|
||||
@@ -2190,6 +1805,19 @@ doc/ChangeLog:
|
||||
return 0;
|
||||
}
|
||||
|
||||
--- gdb/gdbserver/thread-db.c
|
||||
+++ gdb/gdbserver/thread-db.c
|
||||
@@ -386,6 +386,10 @@ thread_db_get_tls_address (struct thread
|
||||
td_err_e err;
|
||||
struct process_info *process;
|
||||
|
||||
+ /* If the thread layer is not (yet) initialized, fail. */
|
||||
+ if (!all_symbols_looked_up)
|
||||
+ return -1;
|
||||
+
|
||||
process = get_thread_process (thread);
|
||||
if (!process->thread_known)
|
||||
find_one_thread (process->lwpid);
|
||||
--- gdb/i386-nat.c
|
||||
+++ gdb/i386-nat.c
|
||||
@@ -641,14 +641,14 @@ i386_insert_hw_breakpoint (struct bp_tar
|
||||
@@ -2566,7 +2194,58 @@ doc/ChangeLog:
|
||||
#ifndef PPC_FEATURE_BOOKE
|
||||
#define PPC_FEATURE_BOOKE 0x00008000
|
||||
#endif
|
||||
@@ -1244,6 +1247,7 @@ ppc_linux_read_description (struct targe
|
||||
@@ -1238,12 +1241,58 @@ fill_fpregset (const struct regcache *re
|
||||
fpregsetp, sizeof (*fpregsetp));
|
||||
}
|
||||
|
||||
+static int
|
||||
+ppc_linux_target_wordsize (void)
|
||||
+{
|
||||
+ int wordsize = 4;
|
||||
+
|
||||
+ /* Check for 64-bit inferior process. This is the case when the host is
|
||||
+ 64-bit, and in addition the top bit of the MSR register is set. */
|
||||
+#ifdef __powerpc64__
|
||||
+ long msr;
|
||||
+
|
||||
+ int tid = TIDGET (inferior_ptid);
|
||||
+ if (tid == 0)
|
||||
+ tid = PIDGET (inferior_ptid);
|
||||
+
|
||||
+ errno = 0;
|
||||
+ msr = (long) ptrace (PTRACE_PEEKUSER, tid, PT_MSR * 8, 0);
|
||||
+ if (errno == 0 && msr < 0)
|
||||
+ wordsize = 8;
|
||||
+#endif
|
||||
+
|
||||
+ return wordsize;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+ppc_linux_auxv_parse (struct target_ops *ops, gdb_byte **readptr,
|
||||
+ gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
|
||||
+{
|
||||
+ int sizeof_auxv_field = ppc_linux_target_wordsize ();
|
||||
+ gdb_byte *ptr = *readptr;
|
||||
+
|
||||
+ if (endptr == ptr)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (endptr - ptr < sizeof_auxv_field * 2)
|
||||
+ return -1;
|
||||
+
|
||||
+ *typep = extract_unsigned_integer (ptr, sizeof_auxv_field);
|
||||
+ ptr += sizeof_auxv_field;
|
||||
+ *valp = extract_unsigned_integer (ptr, sizeof_auxv_field);
|
||||
+ ptr += sizeof_auxv_field;
|
||||
+
|
||||
+ *readptr = ptr;
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
static const struct target_desc *
|
||||
ppc_linux_read_description (struct target_ops *ops)
|
||||
{
|
||||
int altivec = 0;
|
||||
int vsx = 0;
|
||||
int isa205 = 0;
|
||||
@@ -2574,30 +2253,41 @@ doc/ChangeLog:
|
||||
|
||||
int tid = TIDGET (inferior_ptid);
|
||||
if (tid == 0)
|
||||
@@ -1291,6 +1295,9 @@ ppc_linux_read_description (struct targe
|
||||
@@ -1291,26 +1340,24 @@ ppc_linux_read_description (struct targe
|
||||
if (ppc_linux_get_hwcap () & PPC_FEATURE_ARCH_2_05)
|
||||
isa205 = 1;
|
||||
|
||||
- /* Check for 64-bit inferior process. This is the case when the host is
|
||||
- 64-bit, and in addition the top bit of the MSR register is set. */
|
||||
-#ifdef __powerpc64__
|
||||
- {
|
||||
- long msr;
|
||||
- errno = 0;
|
||||
- msr = (long) ptrace (PTRACE_PEEKUSER, tid, PT_MSR * 8, 0);
|
||||
- if (errno == 0 && msr < 0)
|
||||
- {
|
||||
- if (vsx)
|
||||
- return isa205? tdesc_powerpc_isa205_vsx64l : tdesc_powerpc_vsx64l;
|
||||
- else if (altivec)
|
||||
- return isa205? tdesc_powerpc_isa205_altivec64l : tdesc_powerpc_altivec64l;
|
||||
+ if (ppc_linux_get_hwcap () & PPC_FEATURE_CELL)
|
||||
+ cell = 1;
|
||||
|
||||
- return isa205? tdesc_powerpc_isa205_64l : tdesc_powerpc_64l;
|
||||
- }
|
||||
- }
|
||||
-#endif
|
||||
+ if (ppc_linux_target_wordsize () == 8)
|
||||
+ {
|
||||
+ if (cell)
|
||||
+ return tdesc_powerpc_cell64l;
|
||||
+ else if (vsx)
|
||||
+ return isa205? tdesc_powerpc_isa205_vsx64l : tdesc_powerpc_vsx64l;
|
||||
+ else if (altivec)
|
||||
+ return isa205? tdesc_powerpc_isa205_altivec64l : tdesc_powerpc_altivec64l;
|
||||
+
|
||||
/* Check for 64-bit inferior process. This is the case when the host is
|
||||
64-bit, and in addition the top bit of the MSR register is set. */
|
||||
#ifdef __powerpc64__
|
||||
@@ -1300,7 +1307,9 @@ ppc_linux_read_description (struct targe
|
||||
msr = (long) ptrace (PTRACE_PEEKUSER, tid, PT_MSR * 8, 0);
|
||||
if (errno == 0 && msr < 0)
|
||||
{
|
||||
- if (vsx)
|
||||
+ if (cell)
|
||||
+ return tdesc_powerpc_cell64l;
|
||||
+ else if (vsx)
|
||||
return isa205? tdesc_powerpc_isa205_vsx64l : tdesc_powerpc_vsx64l;
|
||||
else if (altivec)
|
||||
return isa205? tdesc_powerpc_isa205_altivec64l : tdesc_powerpc_altivec64l;
|
||||
@@ -1310,7 +1319,9 @@ ppc_linux_read_description (struct targe
|
||||
}
|
||||
#endif
|
||||
+ return isa205? tdesc_powerpc_isa205_64l : tdesc_powerpc_64l;
|
||||
+ }
|
||||
|
||||
- if (vsx)
|
||||
+ if (cell)
|
||||
@@ -2606,6 +2296,14 @@ doc/ChangeLog:
|
||||
return isa205? tdesc_powerpc_isa205_vsx32l : tdesc_powerpc_vsx32l;
|
||||
else if (altivec)
|
||||
return isa205? tdesc_powerpc_isa205_altivec32l : tdesc_powerpc_altivec32l;
|
||||
@@ -1342,6 +1389,7 @@ _initialize_ppc_linux_nat (void)
|
||||
t->to_watchpoint_addr_within_range = ppc_linux_watchpoint_addr_within_range;
|
||||
|
||||
t->to_read_description = ppc_linux_read_description;
|
||||
+ t->to_auxv_parse = ppc_linux_auxv_parse;
|
||||
|
||||
/* Register the target. */
|
||||
linux_nat_add_target (t);
|
||||
--- gdb/ppc-linux-tdep.c
|
||||
+++ gdb/ppc-linux-tdep.c
|
||||
@@ -38,12 +38,20 @@
|
||||
@@ -3491,6 +3189,15 @@ doc/ChangeLog:
|
||||
+32:vrsave
|
||||
--- gdb/remote.c
|
||||
+++ gdb/remote.c
|
||||
@@ -4523,7 +4523,7 @@ process_stop_reply (struct stop_reply *s
|
||||
for (ix = 0;
|
||||
VEC_iterate(cached_reg_t, stop_reply->regcache, ix, reg);
|
||||
ix++)
|
||||
- regcache_raw_supply (get_thread_regcache (ptid),
|
||||
+ regcache_raw_supply (get_thread_arch_regcache (ptid, target_gdbarch),
|
||||
reg->num, reg->data);
|
||||
VEC_free (cached_reg_t, stop_reply->regcache);
|
||||
}
|
||||
@@ -6781,7 +6781,7 @@ remote_insert_breakpoint (struct bp_targ
|
||||
switch (packet_ok (rs->buf, &remote_protocol_packets[PACKET_Z0]))
|
||||
{
|
||||
@@ -3536,6 +3243,25 @@ doc/ChangeLog:
|
||||
case PACKET_OK:
|
||||
return 0;
|
||||
}
|
||||
--- gdb/rs6000-tdep.c
|
||||
+++ gdb/rs6000-tdep.c
|
||||
@@ -3338,6 +3338,16 @@ rs6000_gdbarch_init (struct gdbarch_info
|
||||
int num_pseudoregs = 0;
|
||||
int cur_reg;
|
||||
|
||||
+ /* INFO may refer to a binary that is not of the PowerPC architecture,
|
||||
+ e.g. when debugging a stand-alone SPE executable on a Cell/B.E. system.
|
||||
+ In this case, we must not attempt to infer properties of the (PowerPC
|
||||
+ side) of the target system from properties of that executable. Trust
|
||||
+ the target description instead. */
|
||||
+ if (info.abfd
|
||||
+ && bfd_get_arch (info.abfd) != bfd_arch_powerpc
|
||||
+ && bfd_get_arch (info.abfd) != bfd_arch_rs6000)
|
||||
+ info.abfd = NULL;
|
||||
+
|
||||
from_xcoff_exec = info.abfd && info.abfd->format == bfd_object &&
|
||||
bfd_get_flavour (info.abfd) == bfd_target_xcoff_flavour;
|
||||
|
||||
--- gdb/sentinel-frame.c
|
||||
+++ gdb/sentinel-frame.c
|
||||
@@ -76,11 +76,23 @@ sentinel_frame_this_id (struct frame_inf
|
||||
@@ -3603,7 +3329,7 @@ doc/ChangeLog:
|
||||
if (target_has_execution)
|
||||
--- gdb/solib-spu.c
|
||||
+++ gdb/solib-spu.c
|
||||
@@ -0,0 +1,478 @@
|
||||
@@ -0,0 +1,482 @@
|
||||
+/* Cell SPU GNU/Linux support -- shared library handling.
|
||||
+ Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@@ -3692,14 +3418,18 @@ doc/ChangeLog:
|
||||
+ make_cleanup_restore_integer (&suppress_stop_observer);
|
||||
+ suppress_stop_observer = 1;
|
||||
+
|
||||
+ /* We either may or may not have an extra SIGTRAP pending, depending
|
||||
+ on whether we've started a new inferior or attached to one that was
|
||||
+ already running. We cannot readily distinguish between the two,
|
||||
+ in particular when using the extended-remote target. Thus, we pass
|
||||
+ TARGET_SIGNAL_TRAP to resume -- this way we will always get a trap.
|
||||
+ (If one was already pending, it will be combined into this trap.) */
|
||||
+ /* Only some kernels report an extra SIGTRAP with the binfmt_misc
|
||||
+ loader; others do not. In addition, if we have attached to an
|
||||
+ already running inferior instead of starting a new one, we will
|
||||
+ not see the extra SIGTRAP -- and we cannot readily distinguish
|
||||
+ the two cases, in particular with the extended-remote target.
|
||||
+
|
||||
+ Thus we issue a single-step here. If no extra SIGTRAP was pending,
|
||||
+ this will step past the first instruction of the stand-alone SPE
|
||||
+ executable loader, but we don't care about that. */
|
||||
+
|
||||
+ inferior->stop_soon = STOP_QUIETLY;
|
||||
+ resume (0, TARGET_SIGNAL_TRAP);
|
||||
+ resume (1, TARGET_SIGNAL_0);
|
||||
+ wait_for_inferior (1);
|
||||
+ inferior->stop_soon = NO_STOP_QUIETLY;
|
||||
+
|
||||
@@ -4146,7 +3876,7 @@ doc/ChangeLog:
|
||||
/* Free the memory associated with a (so_list *). */
|
||||
--- gdb/spu-multiarch.c
|
||||
+++ gdb/spu-multiarch.c
|
||||
@@ -0,0 +1,450 @@
|
||||
@@ -0,0 +1,461 @@
|
||||
+/* Cell SPU GNU/Linux multi-architecture debugging support.
|
||||
+ Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
@@ -4337,6 +4067,11 @@ doc/ChangeLog:
|
||||
+ ret = ops_beneath->to_insert_breakpoint (bp);
|
||||
+ do_cleanups (old_chain);
|
||||
+
|
||||
+ /* Ignore failure to insert breakpoints in a stand-alone SPE
|
||||
+ executable just before exit, when the FD is already gone. */
|
||||
+ if (spu_standalone_p () && ret > 0)
|
||||
+ ret = -1;
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
@@ -4366,6 +4101,11 @@ doc/ChangeLog:
|
||||
+ ret = ops_beneath->to_remove_breakpoint (bp);
|
||||
+ do_cleanups (old_chain);
|
||||
+
|
||||
+ /* Ignore failure to remove breakpoints in a stand-alone SPE
|
||||
+ executable just before exit, when the FD is already gone. */
|
||||
+ if (spu_standalone_p () && ret > 0)
|
||||
+ ret = -1;
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
@@ -4562,7 +4302,8 @@ doc/ChangeLog:
|
||||
+static void
|
||||
+spu_mourn_inferior (struct target_ops *ops)
|
||||
+{
|
||||
+ find_target_beneath (&spu_ops)->to_mourn_inferior (ops);
|
||||
+ struct target_ops *ops_beneath = find_target_beneath (ops);
|
||||
+ ops_beneath->to_mourn_inferior (ops_beneath);
|
||||
+ spu_multiarch_disable ();
|
||||
+}
|
||||
+
|
||||
|
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 22 17:12:42 CET 2009 - schwab@suse.de
|
||||
|
||||
- Update Cell combined debugger patch.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 16 16:02:56 CET 2009 - schwab@suse.de
|
||||
|
||||
|
16
gdb.spec
16
gdb.spec
@@ -20,7 +20,7 @@
|
||||
Name: gdb
|
||||
Summary: The GNU Debugger
|
||||
Version: 6.8.50.20090116
|
||||
Release: 1
|
||||
Release: 2
|
||||
BuildRequires: bison dejagnu flex gcc-c++ gcc-fortran gcc-java gcc-objc python-devel readline-devel zlib-devel
|
||||
%if 0%{?suse_version} > 1020
|
||||
BuildRequires: libexpat-devel
|
||||
@@ -33,7 +33,6 @@ BuildRequires: libunwind-devel
|
||||
%ifnarch ppc64 s390x
|
||||
BuildRequires: gcc-ada
|
||||
%endif
|
||||
Recommends: python
|
||||
Url: http://www.gnu.org/software/gdb/
|
||||
License: GNU Free Documentation License, Version 1.2 (GFDL 1.2); GPL v2 or later; GPL v3 or later
|
||||
Group: Development/Tools/Debuggers
|
||||
@@ -42,6 +41,7 @@ AutoReqProv: on
|
||||
Obsoletes: gdb-64bit
|
||||
%endif
|
||||
PreReq: %{install_info_prereq}
|
||||
Recommends: python
|
||||
%define sss -cvs
|
||||
Source: gdb-%{version}%{sss}.tar.bz2
|
||||
Patch: cell-combined.diff
|
||||
@@ -54,6 +54,7 @@ Patch7: pie-relocate.diff
|
||||
Patch8: find-separate-debug-file.diff
|
||||
Patch9: fix-gdb-backtrace.diff
|
||||
Patch10: expand-line-sal-maybe.diff
|
||||
Patch11: startup-inferior.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@@ -123,6 +124,7 @@ Authors:
|
||||
%patch8
|
||||
%patch9
|
||||
%patch10
|
||||
%patch11
|
||||
|
||||
%build
|
||||
%ifarch %ix86 ia64 ppc ppc64 s390 s390x x86_64
|
||||
@@ -133,10 +135,10 @@ Authors:
|
||||
%define target_list i686 ia64 powerpc powerpc64 s390 s390x x86_64
|
||||
%define DIST %(echo '%distribution' | sed 's/ (.*)//')
|
||||
%if %build_multitarget
|
||||
ADDITIONAL_TARGETS="%(echo %target_list | sed -e 's/[^ ]\+/&-suse-linux/g')"
|
||||
ADDITIONAL_TARGETS="$ADDITIONAL_TARGETS spu-elf"
|
||||
EXTRA_TARGETS="%(printf ,%%s-suse-linux %target_list)"
|
||||
EXTRA_TARGETS="$EXTRA_TARGETS,spu-elf"
|
||||
%else
|
||||
ADDITIONAL_TARGETS=
|
||||
EXTRA_TARGETS=
|
||||
%endif
|
||||
./configure CFLAGS="$RPM_OPT_FLAGS" \
|
||||
--prefix=%{_prefix} --libdir=%{_libdir} --infodir=%{_infodir} \
|
||||
@@ -150,7 +152,7 @@ ADDITIONAL_TARGETS=
|
||||
--enable-64-bit-bfd --disable-werror --disable-sim \
|
||||
--with-bugurl=http://bugs.opensuse.org/ --with-pkgversion="GDB; %{DIST}" \
|
||||
--build=%{_target_cpu}-suse-linux \
|
||||
${ADDITIONAL_TARGETS:+--enable-targets="${ADDITIONAL_TARGETS// /,}"}
|
||||
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
|
||||
make %{?jobs:-j%jobs}
|
||||
make info
|
||||
|
||||
@@ -199,6 +201,8 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Jan 22 2009 schwab@suse.de
|
||||
- Update Cell combined debugger patch.
|
||||
* Fri Jan 16 2009 schwab@suse.de
|
||||
- Update to head of trunk.
|
||||
* Fri Jan 16 2009 bwalle@suse.de
|
||||
|
12
startup-inferior.diff
Normal file
12
startup-inferior.diff
Normal file
@@ -0,0 +1,12 @@
|
||||
--- gdb/fork-child.c 10 Nov 2008 11:25:09 +0100 1.47
|
||||
+++ gdb/fork-child.c 20 Nov 2008 14:27:26 +0100
|
||||
@@ -494,6 +494,9 @@ startup_inferior (int ntraps)
|
||||
resume_ptid = pid_to_ptid (-1);
|
||||
else
|
||||
resume_ptid = event_ptid;
|
||||
+ /* Update running state now, in case an error occurs during
|
||||
+ resume. */
|
||||
+ set_running (resume_ptid, 0);
|
||||
|
||||
if (resume_signal != TARGET_SIGNAL_TRAP)
|
||||
{
|
Reference in New Issue
Block a user