diff options
author | Joel Brobecker <brobecker@gnat.com> | 2013-05-15 12:26:14 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2013-05-15 12:26:14 +0000 |
commit | 356a523362d2d4afc329f318a0d144ba6ee20d7f (patch) | |
tree | f2b6b0c3ad4f0404309f43535e8053e64dcbf080 /gdb/gdbarch.h | |
parent | 742ce053c16cb345eeddfdb0acf0c6658ce8e126 (diff) | |
download | gdb-356a523362d2d4afc329f318a0d144ba6ee20d7f.zip gdb-356a523362d2d4afc329f318a0d144ba6ee20d7f.tar.gz gdb-356a523362d2d4afc329f318a0d144ba6ee20d7f.tar.bz2 |
ppc-aix core file relocation.
The current code attempts to provide relocation support when debugging
core files via the rs6000_xfer_partial method of the rs6000-nat
target_ops vector. However, this target_ops vector does not get pushed
on the target stack at all when debugging core files, thus bypassing
completely that part of the code.
This patch fixes the problem by extending corelow's core_xfer_partial
into handling the TARGET_OBJECT_LIBRARIES_AIX object.
gdb/ChangeLog:
* gdbarch.sh (core_xfer_shared_libraries_aix): New method.
* gdbarch.h, gdbarch.c: Regenerate.
* corelow.c (core_xfer_partial): Add TARGET_OBJECT_LIBRARIES_AIX
handling.
* rs6000-aix-tdep.h: New file.
* Makefile.in (HFILES_NO_SRCDIR): Add rs6000-aix-tdep.h.
* rs6000-aix-tdep.c: Include "rs6000-aix-tdep.h" and
"xml-utils.h".
(struct field_info, struct ld_info_desc): New types.
(ld_info32_desc, ld_info64_desc): New static constants.
(struct ld_info): New type.
(rs6000_aix_extract_ld_info): New function.
(rs6000_aix_shared_library_to_xml): Likewise.
(rs6000_aix_ld_info_to_xml): Likewise.
(rs6000_aix_core_xfer_shared_libraries_aix): Likewise.
(rs6000_aix_init_osabi): Add call to
set_gdbarch_core_xfer_shared_libraries_aix.
* rs6000-nat.c: Add "rs6000-aix-tdep.h" include.
Remove "xml-utils.h" include.
(LdInfo): Delete typedef.
(ARCH64_DECL, LDI_FIELD, LDI_NEXT, LDI_FD, LDI_FILENAME):
Delete macros.
(rs6000_ptrace_ldinfo): Change return type to gdb_byte *.
Adjust code accordingly.
(rs6000_core_ldinfo): Delete, folded into
rs6000_aix_core_xfer_shared_libraries_aix.
(rs6000_xfer_shared_library): Delete.
(rs6000_xfer_shared_libraries): Reimplement.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 464c4b6..e1959c3 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -766,6 +766,15 @@ typedef LONGEST (gdbarch_core_xfer_shared_libraries_ftype) (struct gdbarch *gdba extern LONGEST gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, LONGEST len); extern void set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries); +/* Read offset OFFSET of TARGET_OBJECT_LIBRARIES_AIX formatted shared + libraries list from core file into buffer READBUF with length LEN. */ + +extern int gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch); + +typedef LONGEST (gdbarch_core_xfer_shared_libraries_aix_ftype) (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, LONGEST len); +extern LONGEST gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, LONGEST len); +extern void set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdbarch_core_xfer_shared_libraries_aix_ftype *core_xfer_shared_libraries_aix); + /* How the core target converts a PTID from a core file to a string. */ extern int gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch); |