summaryrefslogtreecommitdiffstats
path: root/gdb/sparc64-tdep.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-01-11 20:47:53 +0000
committerMark Kettenis <kettenis@gnu.org>2004-01-11 20:47:53 +0000
commitca9d58e9025120684e1ef66844a42362c146a7db (patch)
tree157d01527f1d925382f6f0c31951acf78f21278c /gdb/sparc64-tdep.c
parent762c360d8ca7366722c0747ecf861bd25d2cbc3b (diff)
downloadppe42-binutils-ca9d58e9025120684e1ef66844a42362c146a7db.tar.gz
ppe42-binutils-ca9d58e9025120684e1ef66844a42362c146a7db.zip
* sparc-tdep.c (sparc32_extract_struct_value_address): Rename from
sparc_extract_struct_value_address. (sparc32_gdbarch_init): Set extract_struct_value_address. * sparc64-tdep.c (sparc64_extract_struct_value_address): New function. (sparc64_init_abi): Set extract_struct_value_address. Don't set return_value_on_stack.
Diffstat (limited to 'gdb/sparc64-tdep.c')
-rw-r--r--gdb/sparc64-tdep.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c
index 2e56ec972a..b32a24c51b 100644
--- a/gdb/sparc64-tdep.c
+++ b/gdb/sparc64-tdep.c
@@ -1086,6 +1086,19 @@ sparc64_return_value (struct gdbarch *gdbarch, struct type *type,
return RETURN_VALUE_REGISTER_CONVENTION;
}
+
+/* Extract from REGCACHE, which contains the (raw) register state, the
+ address in which a function should return its structure value, as a
+ CORE_ADDR. */
+
+static CORE_ADDR
+sparc64_extract_struct_value_address (struct regcache *regcache)
+{
+ ULONGEST addr;
+
+ regcache_cooked_read_unsigned (regcache, SPARC_O0_REGNUM, &addr);
+ return addr;
+}
void
@@ -1117,8 +1130,8 @@ sparc64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_push_dummy_call (gdbarch, sparc64_push_dummy_call);
set_gdbarch_return_value (gdbarch, sparc64_return_value);
- set_gdbarch_return_value_on_stack
- (gdbarch, generic_return_value_on_stack_not);
+ set_gdbarch_extract_struct_value_address
+ (gdbarch, sparc64_extract_struct_value_address);
set_gdbarch_stabs_argument_has_addr
(gdbarch, default_stabs_argument_has_addr);
OpenPOWER on IntegriCloud