aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-10-02 21:21:47 +0000
committerAndrew Cagney <cagney@redhat.com>2002-10-02 21:21:47 +0000
commitda3eff4919642fed6fd1f1a48162bc672cf4f06b (patch)
tree333152ea84bae356759642ebec1468664c3f8cd9 /gdb
parent8033ae3b15e5533461bc1485899d0b07edb0b6e3 (diff)
downloadgdb-da3eff4919642fed6fd1f1a48162bc672cf4f06b.zip
gdb-da3eff4919642fed6fd1f1a48162bc672cf4f06b.tar.gz
gdb-da3eff4919642fed6fd1f1a48162bc672cf4f06b.tar.bz2
2002-10-02 Andrew Cagney <ac131313@redhat.com>
* rs6000-tdep.c (rs6000_store_struct_return): Store struct_return value in register 3 adjusted by ppc_gp0_regnum.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/rs6000-tdep.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f210799..5bb236a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
2002-10-02 Andrew Cagney <ac131313@redhat.com>
+ * rs6000-tdep.c (rs6000_store_struct_return): Store struct_return
+ value in register 3 adjusted by ppc_gp0_regnum.
+
* rs6000-tdep.c (skip_prologue): Bias alloca_reg by ppc_gp0_regnum.
2002-10-02 Marko Mlinar <markom@opencores.org>
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 152eb0e..53b9dd3 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -1991,7 +1991,8 @@ rs6000_stab_reg_to_regnum (int num)
static void
rs6000_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
{
- write_register (3, addr);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ write_register (tdep->ppc_gp0_regnum + 3, addr);
}
/* Write into appropriate registers a function return value