diff options
author | Adam Fedor <fedor@gnu.org> | 2003-06-02 02:54:35 +0000 |
---|---|---|
committer | Adam Fedor <fedor@gnu.org> | 2003-06-02 02:54:35 +0000 |
commit | 143985b7f3c98d0644b2eef50059f14974fe9d64 (patch) | |
tree | f7be8c8c3c477f6a794f4f67885b1afe31c9418f /gdb/rs6000-tdep.c | |
parent | 7c0b4a206672ef45cc3112a1c3f5269e35f44efa (diff) | |
download | gdb-143985b7f3c98d0644b2eef50059f14974fe9d64.zip gdb-143985b7f3c98d0644b2eef50059f14974fe9d64.tar.gz gdb-143985b7f3c98d0644b2eef50059f14974fe9d64.tar.bz2 |
* gdbarch.sh (function_list): Add FETCH_POINTER_ARGUMENT.
* gdbarch.[ch]: Regenerate.
* hppa-tdep.c (hppa_fetch_pointer_argument): New function.
(hppa_gdbarch_init): Set it in the gdbarch vector.
* i386-tdep.c (i386_fetch_pointer_argument): New
(i386_gdbarch_init): Set it into gdbarch.
* rs6000-tdep.c (rs6000_fetch_pointer_argument): New.
(rs6000_gdbarch_init): Set it in gdbarch.
* sparc-tdep.c (sparc_fetch_pointer_argument): New
(sparc_gdbarch_init): Set it in gdbarch.
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r-- | gdb/rs6000-tdep.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 23fc054..98e1a0c 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -230,6 +230,16 @@ rs6000_saved_pc_after_call (struct frame_info *fi) return read_register (gdbarch_tdep (current_gdbarch)->ppc_lr_regnum); } +/* Get the ith function argument for the current function. */ +CORE_ADDR +rs6000_fetch_pointer_argument (struct frame_info *frame, int argi, + struct type *type) +{ + CORE_ADDR addr; + frame_read_register (frame, 3 + argi, &addr); + return addr; +} + /* Calculate the destination of a branch/jump. Return -1 if not a branch. */ static CORE_ADDR @@ -2991,6 +3001,9 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_frame_locals_address (gdbarch, rs6000_frame_args_address); set_gdbarch_deprecated_saved_pc_after_call (gdbarch, rs6000_saved_pc_after_call); + /* Helpers for function argument information. */ + set_gdbarch_fetch_pointer_argument (gdbarch, rs6000_fetch_pointer_argument); + /* We can't tell how many args there are now that the C compiler delays popping them. */ set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); |