summaryrefslogtreecommitdiff
path: root/gdb/sh64-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-01-17 19:38:58 +0000
committerAndrew Cagney <cagney@redhat.com>2004-01-17 19:38:58 +0000
commitdf33e13235019c72328d196aaaa4a431cbe5967c (patch)
tree23ebce82d8f93ff5c20df40336386357892d210a /gdb/sh64-tdep.c
parent157f14f2aec7e21a8c07cdf95f4fee38c58ab9e7 (diff)
downloadgdb-df33e13235019c72328d196aaaa4a431cbe5967c.tar.gz
2004-01-17 Andrew Cagney <cagney@redhat.com>
* xstormy16-tdep.c: Update copyright. (xstormy16_extract_struct_value_address): Update to current extract struct value address interface. (xstormy16_gdbarch_init): Set extract_struct_value_address. * sh64-tdep.c (sh64_extract_struct_value_address): Update to current extract struct value address interface. (sh64_gdbarch_init): Set extract_struct_value_address.
Diffstat (limited to 'gdb/sh64-tdep.c')
-rw-r--r--gdb/sh64-tdep.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c
index c78a137097f..56063c11318 100644
--- a/gdb/sh64-tdep.c
+++ b/gdb/sh64-tdep.c
@@ -1342,11 +1342,14 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
}
static CORE_ADDR
-sh64_extract_struct_value_address (char *regbuf)
+sh64_extract_struct_value_address (struct regcache *regcache)
{
- return (extract_unsigned_integer ((regbuf + DEPRECATED_REGISTER_BYTE (STRUCT_RETURN_REGNUM)),
- register_size (current_gdbarch,
- STRUCT_RETURN_REGNUM)));
+ /* FIXME: cagney/2004-01-17: Does the ABI guarantee that the return
+ address regster is preserved across function calls? Probably
+ not, making this function wrong. */
+ ULONGEST val;
+ regcache_raw_read_unsigned (regcache, STRUCT_RETURN_REGNUM, &val);
+ return val;
}
static CORE_ADDR
@@ -2884,7 +2887,7 @@ sh64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_push_return_address (gdbarch, sh64_push_return_address);
set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
set_gdbarch_deprecated_store_struct_return (gdbarch, sh64_store_struct_return);
- set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sh64_extract_struct_value_address);
+ set_gdbarch_extract_struct_value_address (gdbarch, sh64_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, sh64_use_struct_convention);
set_gdbarch_deprecated_pop_frame (gdbarch, sh64_pop_frame);
set_gdbarch_elf_make_msymbol_special (gdbarch,