aboutsummaryrefslogtreecommitdiff
path: root/gdb/mips-tdep.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2002-08-20 19:26:23 +0000
committerMichael Snyder <msnyder@vmware.com>2002-08-20 19:26:23 +0000
commit2f1488ce234434761410fb65a4d7dc8671decf97 (patch)
treee5fd0b50b597880e6a5d9d0277ec83f39d1a0799 /gdb/mips-tdep.c
parent41ff2da14cddc1398262d459f40b3613354c6a52 (diff)
downloadgdb-2f1488ce234434761410fb65a4d7dc8671decf97.zip
gdb-2f1488ce234434761410fb65a4d7dc8671decf97.tar.gz
gdb-2f1488ce234434761410fb65a4d7dc8671decf97.tar.bz2
2002-08-20 Michael Snyder <msnyder@redhat.com>
* config/mips/tm-mips.h (STORE_STRUCT_RETURN): Delete. (EXTRACT_STRUCT_VALUE_ADDRESS): Delete. * mips-tdep.c (mips_store_struct_return): New function. (mips_extract_struct_value_address): New function. (mips_gdbarch_init): Set store_struct_return and extract_struct_value_address.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r--gdb/mips-tdep.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 5bc44ba..6308e4f 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -4863,6 +4863,21 @@ mips_n32n64_store_return_value (struct type *type, char *valbuf)
mips_n32n64_xfer_return_value (type, current_regcache, NULL, valbuf);
}
+static void
+mips_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
+{
+ /* Nothing to do -- push_arguments does all the work. */
+}
+
+static CORE_ADDR
+mips_extract_struct_value_address (struct regcache *ignore)
+{
+ /* FIXME: This will only work at random. The caller passes the
+ struct_return address in V0, but it is not preserved. It may
+ still be there, or this may be a random value. */
+ return read_register (V0_REGNUM);
+}
+
/* Exported procedure: Is PC in the signal trampoline code */
static int
@@ -5934,6 +5949,9 @@ mips_gdbarch_init (struct gdbarch_info info,
/* Hook in OS ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch, osabi);
+ set_gdbarch_store_struct_return (gdbarch, mips_store_struct_return);
+ set_gdbarch_extract_struct_value_address (gdbarch,
+ mips_extract_struct_value_address);
return gdbarch;
}