mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-23 13:21:43 +08:00
* 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.
This commit is contained in:
parent
60ade65d49
commit
e4fd649ae2
@ -1,3 +1,17 @@
|
||||
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.
|
||||
|
@ -868,7 +868,8 @@ cris_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)
|
||||
{
|
||||
/* Allocate space sufficient for a breakpoint. */
|
||||
sp = (sp - 4) & ~3;
|
||||
|
@ -1900,13 +1900,13 @@ gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
|
||||
}
|
||||
|
||||
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
|
||||
|
@ -344,8 +344,8 @@ extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_d
|
||||
|
||||
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);
|
||||
|
@ -472,7 +472,7 @@ M::CORE_ADDR:push_dummy_call:struct value *function, struct regcache *regcache,
|
||||
# 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
|
||||
|
@ -1097,7 +1097,8 @@ hppa_hpux_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp,
|
||||
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;
|
||||
@ -1115,7 +1116,7 @@ hppa_hpux_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp,
|
||||
/* 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;
|
||||
}
|
||||
@ -1193,18 +1194,18 @@ hppa_hpux_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR 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);
|
||||
}
|
||||
@ -1220,17 +1221,17 @@ hppa_hpux_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp,
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
@ -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:
|
||||
|
@ -383,7 +383,8 @@ sparc32_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp,
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user