diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2009-06-17 18:48:26 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2009-06-17 18:48:26 +0000 |
commit | a78c2d625ffe6bf34934991e815db484d3393a76 (patch) | |
tree | 41b36b94ddb5c674e832c0297b24550ec4c7d606 /gdb/ppc-linux-tdep.c | |
parent | 3b7538c0317072d430eca4e808b183dac5bd5e45 (diff) | |
download | gdb-a78c2d625ffe6bf34934991e815db484d3393a76.zip gdb-a78c2d625ffe6bf34934991e815db484d3393a76.tar.gz gdb-a78c2d625ffe6bf34934991e815db484d3393a76.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/ppc-linux-tdep.c')
-rw-r--r-- | gdb/ppc-linux-tdep.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index da332f3..2bb88b3 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -1102,6 +1102,12 @@ ppc_linux_init_abi (struct gdbarch_info info, /* Trampolines. */ tramp_frame_prepend_unwinder (gdbarch, &ppc32_linux_sigaction_tramp_frame); tramp_frame_prepend_unwinder (gdbarch, &ppc32_linux_sighandler_tramp_frame); + + /* BFD target for core files. */ + if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE) + set_gdbarch_gcore_bfd_target (gdbarch, "elf32-powerpcle"); + else + set_gdbarch_gcore_bfd_target (gdbarch, "elf32-powerpc"); } if (tdep->wordsize == 8) @@ -1119,6 +1125,12 @@ ppc_linux_init_abi (struct gdbarch_info info, /* Trampolines. */ tramp_frame_prepend_unwinder (gdbarch, &ppc64_linux_sigaction_tramp_frame); tramp_frame_prepend_unwinder (gdbarch, &ppc64_linux_sighandler_tramp_frame); + + /* BFD target for core files. */ + if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE) + set_gdbarch_gcore_bfd_target (gdbarch, "elf64-powerpcle"); + else + set_gdbarch_gcore_bfd_target (gdbarch, "elf64-powerpc"); } set_gdbarch_regset_from_core_section (gdbarch, ppc_linux_regset_from_core_section); set_gdbarch_core_read_description (gdbarch, ppc_linux_core_read_description); |