diff options
author | Mark Kettenis <kettenis@gnu.org> | 2004-01-05 20:38:57 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2004-01-05 20:38:57 +0000 |
commit | 9515395e66db89b143374414b98ef8c3ee233a7b (patch) | |
tree | d0610995d704d907feaa396196aab541622ec592 /gdb/sparc-tdep.c | |
parent | dbc22fa117a217df10f09ade0649a0ba95c5b44e (diff) | |
download | gdb-9515395e66db89b143374414b98ef8c3ee233a7b.zip gdb-9515395e66db89b143374414b98ef8c3ee233a7b.tar.gz gdb-9515395e66db89b143374414b98ef8c3ee233a7b.tar.bz2 |
* sparc-tdep.c (sparc_extract_struct_value_address): Get the
address from [sp + 64] instead of %o2.
Diffstat (limited to 'gdb/sparc-tdep.c')
-rw-r--r-- | gdb/sparc-tdep.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index ab3f365..92684a3 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -839,10 +839,10 @@ sparc32_return_value (struct gdbarch *gdbarch, struct type *type, static CORE_ADDR sparc_extract_struct_value_address (struct regcache *regcache) { - ULONGEST addr; + ULONGEST sp; - regcache_cooked_read_unsigned (regcache, SPARC_O0_REGNUM, &addr); - return addr; + regcache_cooked_read_unsigned (regcache, SPARC_SP_REGNUM, &sp); + return read_memory_unsigned_integer (sp + 64, 4); } static int |