* 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.
+2007-06-15 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * 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.
+
2007-06-15 Ulrich Weigand <uweigand@de.ibm.com>
* gdbarch.sh (get_longjmp_target): Add FRAME argument.
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)
{
/* Allocate space sufficient for a breakpoint. */
sp = (sp - 4) & ~3;
}
CORE_ADDR
-gdbarch_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)
+gdbarch_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, struct regcache *regcache)
{
gdb_assert (gdbarch != NULL);
gdb_assert (gdbarch->push_dummy_code != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
- return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
+ return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr, regcache);
}
void
extern int gdbarch_push_dummy_code_p (struct gdbarch *gdbarch);
-typedef CORE_ADDR (gdbarch_push_dummy_code_ftype) (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);
-extern CORE_ADDR gdbarch_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);
+typedef CORE_ADDR (gdbarch_push_dummy_code_ftype) (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, struct regcache *regcache);
+extern CORE_ADDR gdbarch_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, struct regcache *regcache);
extern void set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, gdbarch_push_dummy_code_ftype *push_dummy_code);
typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
# DEPRECATED_REGISTER_SIZE can be deleted.
v:=:int:deprecated_register_size
v::int:call_dummy_location::::AT_ENTRY_POINT::0
-M::CORE_ADDR:push_dummy_code: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:sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr
+M::CORE_ADDR:push_dummy_code: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, struct regcache *regcache:sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr, regcache
m::void:print_registers_info:struct ui_file *file, struct frame_info *frame, int regnum, int all:file, frame, regnum, all::default_print_registers_info::0
M::void:print_float_info:struct ui_file *file, struct frame_info *frame, const char *args:file, frame, args
CORE_ADDR funcaddr, 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)
{
CORE_ADDR pc, stubaddr;
int argreg = 0;
/* Intraspace call. */
*bp_addr = hppa_hpux_find_dummy_bpaddr (pc);
*real_pc = funcaddr;
- regcache_cooked_write_unsigned (current_regcache, HPPA_RP_REGNUM, *bp_addr);
+ regcache_cooked_write_unsigned (regcache, HPPA_RP_REGNUM, *bp_addr);
return sp;
}
if (stubaddr == 0)
error (_("Cannot call external function not referenced by application "
"(no import stub).\n"));
- regcache_cooked_write_unsigned (current_regcache, 22, stubaddr);
+ regcache_cooked_write_unsigned (regcache, 22, stubaddr);
write_memory (sp, (char *)&hppa32_tramp, sizeof (hppa32_tramp));
*bp_addr = hppa_hpux_find_dummy_bpaddr (pc);
- regcache_cooked_write_unsigned (current_regcache, 31, *bp_addr);
+ regcache_cooked_write_unsigned (regcache, 31, *bp_addr);
*real_pc = hppa32_hpux_search_dummy_call_sequence (gdbarch, pc, &argreg);
if (*real_pc == 0)
error (_("Cannot make interspace call from here."));
- regcache_cooked_write_unsigned (current_regcache, argreg, sp);
+ regcache_cooked_write_unsigned (regcache, argreg, sp);
sp += sizeof (hppa32_tramp);
}
/* for hppa64, we don't need to call through a stub; all functions
return via a bve. */
- regcache_cooked_write_unsigned (current_regcache, 22, funcaddr);
+ regcache_cooked_write_unsigned (regcache, 22, funcaddr);
write_memory (sp, (char *)&hppa64_tramp, sizeof (hppa64_tramp));
*bp_addr = pc - 4;
- regcache_cooked_write_unsigned (current_regcache, 31, *bp_addr);
+ regcache_cooked_write_unsigned (regcache, 31, *bp_addr);
*real_pc = hppa64_hpux_search_dummy_call_sequence (gdbarch, pc, &argreg);
if (*real_pc == 0)
error (_("Cannot make interspace call from here."));
- regcache_cooked_write_unsigned (current_regcache, argreg, sp);
+ regcache_cooked_write_unsigned (regcache, argreg, sp);
sp += sizeof (hppa64_tramp);
}
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. */
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
{
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
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:
CORE_ADDR funcaddr, 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)
{
*bp_addr = sp - 4;
*real_pc = funcaddr;