diff options
author | Mark Kettenis <kettenis@gnu.org> | 2014-02-27 13:40:15 +0100 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2014-02-27 13:40:15 +0100 |
commit | 27a48a9223d0c7558f0bfde2d704d4a660f5d4ea (patch) | |
tree | 8fbaa11502a79bb31e17ddd0aab09e980863397d /gdb/gdbarch.h | |
parent | 2e877f5ecb5916d147f91dfad461a8fa5017d8b0 (diff) | |
download | gdb-27a48a9223d0c7558f0bfde2d704d4a660f5d4ea.zip gdb-27a48a9223d0c7558f0bfde2d704d4a660f5d4ea.tar.gz gdb-27a48a9223d0c7558f0bfde2d704d4a660f5d4ea.tar.bz2 |
Add auxv parsing to the architecture vector.
Necessary to fix parsing auxv entries from core files on systems that use
the layout specified by ELF instead of the incompatible variant used by Linux.
gdb/Changelog:
* gdbarch.sh (auxv_parse): New.
* gdbarch.h: Regenerated.
* gdbarch.c: Regenerated.
* auxv.c (target_auxv_parse): Call gdbarch_parse_auxv if provided.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index c8fbc6e..9fb27d4 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1305,6 +1305,17 @@ typedef int (gdbarch_insn_is_jump_ftype) (struct gdbarch *gdbarch, CORE_ADDR add extern int gdbarch_insn_is_jump (struct gdbarch *gdbarch, CORE_ADDR addr); extern void set_gdbarch_insn_is_jump (struct gdbarch *gdbarch, gdbarch_insn_is_jump_ftype *insn_is_jump); +/* Read one auxv entry from *READPTR, not reading locations >= ENDPTR. + Return 0 if *READPTR is already at the end of the buffer. + Return -1 if there is insufficient buffer for a whole entry. + Return 1 if an entry was read into *TYPEP and *VALP. */ + +extern int gdbarch_auxv_parse_p (struct gdbarch *gdbarch); + +typedef int (gdbarch_auxv_parse_ftype) (struct gdbarch *gdbarch, gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp); +extern int gdbarch_auxv_parse (struct gdbarch *gdbarch, gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp); +extern void set_gdbarch_auxv_parse (struct gdbarch *gdbarch, gdbarch_auxv_parse_ftype *auxv_parse); + /* Definition for an unknown syscall, used basically in error-cases. */ #define UNKNOWN_SYSCALL (-1) |