2004-01-26 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / sh64-tdep.c
index c78a137097fa9b7a011fb2e0317da8fb3ad3fce2..545725480ced89aebb180ab6b2a069dc9f5f5258 100644 (file)
@@ -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
This page took 0.023566 seconds and 4 git commands to generate.