aboutsummaryrefslogtreecommitdiff
path: root/gdb
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
commit07be497a4f8cc738dd34e269cdb60940822ec242 (patch)
tree4c30d45c9940fae0fc75c1ff989c34030644e1fc /gdb
parent6b4d5c9185dd80e1bafdd846aee307f33996e4c5 (diff)
downloadgdb-07be497a4f8cc738dd34e269cdb60940822ec242.zip
gdb-07be497a4f8cc738dd34e269cdb60940822ec242.tar.gz
gdb-07be497a4f8cc738dd34e269cdb60940822ec242.tar.bz2
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')
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/sh64-tdep.c13
-rw-r--r--gdb/xstormy16-tdep.c14
3 files changed, 25 insertions, 10 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7b8424a..fb154f0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
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.
+
* cris-tdep.c: Update copyright.
(cris_extract_struct_value_address): Delete function.
(struct_return_address): Delete variable.
diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c
index c78a137..56063c1 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,
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index 00520a5..7b3e430 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -1,6 +1,6 @@
/* Target-dependent code for the Sanyo Xstormy16a (LC590000) processor.
- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -409,10 +409,14 @@ xstormy16_store_return_value (struct type *type, char *valbuf)
*/
static CORE_ADDR
-xstormy16_extract_struct_value_address (char *regbuf)
+xstormy16_extract_struct_value_address (struct regcache *regcache)
{
- return extract_unsigned_integer (regbuf + xstormy16_register_byte (E_PTR_RET_REGNUM),
- xstormy16_reg_size);
+ /* 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, E_PTR_RET_REGNUM, &val);
+ return val;
}
/* Function: xstormy16_use_struct_convention
@@ -1082,7 +1086,7 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_pop_frame (gdbarch, xstormy16_pop_frame);
set_gdbarch_deprecated_store_struct_return (gdbarch, xstormy16_store_struct_return);
set_gdbarch_deprecated_store_return_value (gdbarch, xstormy16_store_return_value);
- set_gdbarch_deprecated_extract_struct_value_address (gdbarch, xstormy16_extract_struct_value_address);
+ set_gdbarch_extract_struct_value_address (gdbarch, xstormy16_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch,
xstormy16_use_struct_convention);
set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_words);