diff options
author | Sergio Durigan Junior <sergiodj@redhat.com> | 2013-02-04 18:40:41 +0000 |
---|---|---|
committer | Sergio Durigan Junior <sergiodj@redhat.com> | 2013-02-04 18:40:41 +0000 |
commit | b3ac9c77560a7a807c10af506cb478274d00cc97 (patch) | |
tree | 8208bbae33ce492b90b62cde3ac20690b55360ee /gdb/ppc-linux-tdep.c | |
parent | 70a38d42c5b3fdc03acd4faef4149f5f2e8a0fb4 (diff) | |
download | gdb-b3ac9c77560a7a807c10af506cb478274d00cc97.zip gdb-b3ac9c77560a7a807c10af506cb478274d00cc97.tar.gz gdb-b3ac9c77560a7a807c10af506cb478274d00cc97.tar.bz2 |
2013-02-04 Sergio Durigan Junior <sergiodj@redhat.com>
Denys Vlasenko <dvlasenk@redhat.com>
Pedro Alves <palves@redhat.com>
* gdbarch.sh (elfcore_write_linux_prpsinfo): New F hook.
(struct elf_internal_linux_prpsinfo): Forward declare.
* gdbarch.h, gdbarch.c: Regenerate.
* linux-tdep.c: Include `cli/cli-utils.h'.
(linux_fill_prpsinfo): New function.
(linux_make_corefile_notes): Use linux_fill_prpsinfo. If there's
an elfcore_write_linux_prpsinfo hook, use it, otherwise, use
elfcore_write_linux_prpsinfo32 or elfcore_write_linux_prpsinfo64
depending on gdbarch pointer bitness.
* ppc-linux-tdep.c: Include elf-bfd.h.
(ppc_linux_init_abi): Hook in elfcore_write_ppc_linux_prpsinfo32
on 32-bit.
Diffstat (limited to 'gdb/ppc-linux-tdep.c')
-rw-r--r-- | gdb/ppc-linux-tdep.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index cdf362f22..7c2712d 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -57,6 +57,7 @@ #include "parser-defs.h" #include "user-regs.h" #include <ctype.h> +#include "elf-bfd.h" /* for elfcore_write_* */ #include "features/rs6000/powerpc-32l.c" #include "features/rs6000/powerpc-altivec32l.c" @@ -1368,6 +1369,13 @@ ppc_linux_init_abi (struct gdbarch_info info, set_gdbarch_core_regset_sections (gdbarch, ppc64_linux_fp_regset_sections); } + + /* PPC32 uses a different prpsinfo32 compared to most other Linux + archs. */ + if (tdep->wordsize == 4) + set_gdbarch_elfcore_write_linux_prpsinfo (gdbarch, + elfcore_write_ppc_linux_prpsinfo32); + set_gdbarch_regset_from_core_section (gdbarch, ppc_linux_regset_from_core_section); set_gdbarch_core_read_description (gdbarch, ppc_linux_core_read_description); |