aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-09-09 22:41:47 +0000
committerAndrew Cagney <cagney@redhat.com>2003-09-09 22:41:47 +0000
commite56a0ecc9e596e2109148793cac8fb905e71d544 (patch)
tree43c84d3bc12b2b56d1ee57151bb3e858cdc84c29
parentfbd93201df80d4028b0e4762e701b20f96cff8bb (diff)
downloadgdb-e56a0ecc9e596e2109148793cac8fb905e71d544.zip
gdb-e56a0ecc9e596e2109148793cac8fb905e71d544.tar.gz
gdb-e56a0ecc9e596e2109148793cac8fb905e71d544.tar.bz2
2003-09-09 Andrew Cagney <cagney@redhat.com>
* rs6000-tdep.c (ppc_push_return_address): Delete function. (rs6000_push_dummy_call): Set LR to BP_ADDR. (rs6000_gdbarch_init): Do not set deprecated_push_return_address. * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Ditto.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/ppc-sysv-tdep.c4
-rw-r--r--gdb/rs6000-tdep.c16
3 files changed, 13 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0361a4d..3ed38b7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2003-09-09 Andrew Cagney <cagney@redhat.com>
+ * rs6000-tdep.c (ppc_push_return_address): Delete function.
+ (rs6000_push_dummy_call): Set LR to BP_ADDR.
+ (rs6000_gdbarch_init): Do not set deprecated_push_return_address.
+ * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Ditto.
+
* rs6000-tdep.c (rs6000_fix_call_dummy): Delete function.
(rs6000_push_dummy_call): Set the "TOC" register.
diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c
index bd80188..9548007 100644
--- a/gdb/ppc-sysv-tdep.c
+++ b/gdb/ppc-sysv-tdep.c
@@ -339,6 +339,10 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
}
}
+ /* Point the inferior function call's return address at the dummy's
+ breakpoint. */
+ regcache_raw_write_signed (regcache, tdep->ppc_lr_regnum, bp_addr);
+
target_store_registers (-1);
return sp;
}
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 1fc2b2a..abed029 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -1302,6 +1302,10 @@ ran_out_of_registers_for_arguments:
store_unsigned_integer (tmp_buffer, 4, saved_sp);
write_memory (sp, tmp_buffer, 4);
+ /* Point the inferior function call's return address at the dummy's
+ breakpoint. */
+ regcache_raw_write_signed (regcache, tdep->ppc_lr_regnum, bp_addr);
+
/* Set the TOC register, get the value from the objfile reader
which, in turn, gets it from the VMAP table. */
if (rs6000_find_toc_address_hook != NULL)
@@ -1314,17 +1318,6 @@ ran_out_of_registers_for_arguments:
return sp;
}
-/* Function: ppc_push_return_address (pc, sp)
- Set up the return address for the inferior function call. */
-
-static CORE_ADDR
-ppc_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
-{
- write_register (gdbarch_tdep (current_gdbarch)->ppc_lr_regnum,
- entry_point_address ());
- return sp;
-}
-
/* Extract a function return value of type TYPE from raw register array
REGBUF, and copy that return value into VALBUF in virtual format. */
static void
@@ -2935,7 +2928,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* PowerOpen / AIX 32 bit. */
set_gdbarch_frame_red_zone_size (gdbarch, 220);
set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
- set_gdbarch_deprecated_push_return_address (gdbarch, ppc_push_return_address);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
set_gdbarch_deprecated_register_convertible (gdbarch, rs6000_register_convertible);