aboutsummaryrefslogtreecommitdiff
path: root/gdb/sparc-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/sparc-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/sparc-tdep.c')
-rw-r--r--gdb/sparc-tdep.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index f387ad8..c3fd6dd 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -3243,6 +3243,15 @@ sparc_return_value_on_stack (struct type *type)
return 0;
}
+/* Get the ith function argument for the current function. */
+CORE_ADDR
+sparc_fetch_pointer_argument (struct frame_info *frame, int argi, struct type *type)
+{
+ CORE_ADDR addr;
+ frame_read_register (frame, O0_REGNUM + argi, &addr);
+ return addr;
+}
+
/*
* Gdbarch "constructor" function.
*/
@@ -3354,6 +3363,9 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0);
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
+ /* Helper for function argument information. */
+ set_gdbarch_fetch_pointer_argument (gdbarch, sparc_fetch_pointer_argument);
+
/*
* Settings that depend only on 32/64 bit word size
*/