aboutsummaryrefslogtreecommitdiff
path: root/gdb/hppa-tdep.c
diff options
context:
space:
mode:
authorAdam Fedor <fedor@gnu.org>2003-06-02 02:54:35 +0000
committerAdam Fedor <fedor@gnu.org>2003-06-02 02:54:35 +0000
commit143985b7f3c98d0644b2eef50059f14974fe9d64 (patch)
treef7be8c8c3c477f6a794f4f67885b1afe31c9418f /gdb/hppa-tdep.c
parent7c0b4a206672ef45cc3112a1c3f5269e35f44efa (diff)
downloadgdb-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/hppa-tdep.c')
-rw-r--r--gdb/hppa-tdep.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 1f78d06..9366afc 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -4993,6 +4993,16 @@ hppa_smash_text_address (CORE_ADDR addr)
return (addr &= ~0x3);
}
+/* Get the ith function argument for the current function. */
+CORE_ADDR
+hppa_fetch_pointer_argument (struct frame_info *frame, int argi,
+ struct type *type)
+{
+ CORE_ADDR addr;
+ frame_read_register (frame, R0_REGNUM + 26 - argi, &addr);
+ return addr;
+}
+
static struct gdbarch *
hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
@@ -5071,6 +5081,9 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_write_pc (gdbarch, hppa_target_write_pc);
set_gdbarch_deprecated_target_read_fp (gdbarch, hppa_target_read_fp);
+ /* Helper for function argument information. */
+ set_gdbarch_fetch_pointer_argument (gdbarch, hppa_fetch_pointer_argument);
+
return gdbarch;
}