summaryrefslogtreecommitdiff
path: root/gdb/infcall.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-06-15 22:42:22 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-06-15 22:42:22 +0000
commitf0423c39d51224e4becfaed021a1ac0536242415 (patch)
tree7a04bbd96e592e370ad66addf30f747d12617f76 /gdb/infcall.c
parent92299d021575b0ab79e63c7e5ba30460055bcbe7 (diff)
downloadgdb-f0423c39d51224e4becfaed021a1ac0536242415.tar.gz
* gdbarch.sh (push_dummy_code): Add REGCACHE argument.
* gdbarch.c, gdbarch.h: Regenerate. * infcall.c (generic_push_dummy_code): Add REGCACHE argument. (push_dummy_code): Likewise. Pass it to callee. (call_function_by_hand): Pass current regcache to push_dummy_code. * hppa-hpux-tdep.c (hppa_hpux_push_dummy_code): Add REGCACHE argument. Use it instead of current_regcache. * cris-tdep.c (cris_push_dummy_code): Add REGCACHE argument. * sparc-tdep.c (sparc32_push_dummy_code): Likewise.
Diffstat (limited to 'gdb/infcall.c')
-rw-r--r--gdb/infcall.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gdb/infcall.c b/gdb/infcall.c
index 5bd2ce33863..2805e4b4f89 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -249,7 +249,8 @@ generic_push_dummy_code (struct gdbarch *gdbarch,
CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc,
struct value **args, int nargs,
struct type *value_type,
- CORE_ADDR *real_pc, CORE_ADDR *bp_addr)
+ CORE_ADDR *real_pc, CORE_ADDR *bp_addr,
+ struct regcache *regcache)
{
/* Something here to findout the size of a breakpoint and then
allocate space for it on the stack. */
@@ -288,14 +289,17 @@ push_dummy_code (struct gdbarch *gdbarch,
CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc,
struct value **args, int nargs,
struct type *value_type,
- CORE_ADDR *real_pc, CORE_ADDR *bp_addr)
+ CORE_ADDR *real_pc, CORE_ADDR *bp_addr,
+ struct regcache *regcache)
{
if (gdbarch_push_dummy_code_p (gdbarch))
return gdbarch_push_dummy_code (gdbarch, sp, funaddr, using_gcc,
- args, nargs, value_type, real_pc, bp_addr);
+ args, nargs, value_type, real_pc, bp_addr,
+ regcache);
else
return generic_push_dummy_code (gdbarch, sp, funaddr, using_gcc,
- args, nargs, value_type, real_pc, bp_addr);
+ args, nargs, value_type, real_pc, bp_addr,
+ regcache);
}
/* All this stuff with a dummy frame may seem unnecessarily complicated
@@ -465,7 +469,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
{
sp = push_dummy_code (current_gdbarch, sp, funaddr,
using_gcc, args, nargs, values_type,
- &real_pc, &bp_addr);
+ &real_pc, &bp_addr, current_regcache);
dummy_addr = sp;
}
else
@@ -473,7 +477,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
dummy_addr = sp;
sp = push_dummy_code (current_gdbarch, sp, funaddr,
using_gcc, args, nargs, values_type,
- &real_pc, &bp_addr);
+ &real_pc, &bp_addr, current_regcache);
}
break;
case AT_ENTRY_POINT: