diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 13 | ||||
-rw-r--r-- | gdb/d10v-tdep.c | 11 | ||||
-rw-r--r-- | gdb/gdbarch.c | 4 | ||||
-rw-r--r-- | gdb/gdbarch.h | 4 | ||||
-rwxr-xr-x | gdb/gdbarch.sh | 2 | ||||
-rw-r--r-- | gdb/i386-tdep.c | 9 | ||||
-rw-r--r-- | gdb/infcall.c | 2 |
8 files changed, 35 insertions, 21 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7e40903..8dc2ca5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,14 @@ +2003-05-31 Andrew Cagney <cagney@redhat.com> + + * gdbarch.sh (PUSH_DUMMY_CALL): Add "func_addr" parameter. Rename + "dummy_addr" to "bp_addr". + * infcall.c (call_function_by_hand): Pass "funaddr" to + gdbarch_push_dummy_call. + * gdbarch.h, gdbarch.c: Re-generate. + * i386-tdep.c (i386_push_dummy_call): Update. + * arm-tdep.c (arm_push_dummy_call): Update. + * d10v-tdep.c (d10v_push_dummy_call): Update. + 2003-05-31 Mark Kettenis <kettenis@gnu.org> * x86-64-tdep.h (x86_64_num_regs, x86_64_num_gregs): Remove diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index c0e2408..0ee3e24 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -1405,19 +1405,20 @@ pop_stack_item (struct stack_item *si) we should probably support some of them based on the selected ABI. */ static CORE_ADDR -arm_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, - CORE_ADDR dummy_addr, int nargs, struct value **args, - CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr) +arm_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, + struct regcache *regcache, CORE_ADDR bp_addr, int nargs, + struct value **args, CORE_ADDR sp, int struct_return, + CORE_ADDR struct_addr) { int argnum; int argreg; int nstack; struct stack_item *si = NULL; - /* Set the return address. For the ARM, the return breakpoint is always - at DUMMY_ADDR. */ + /* Set the return address. For the ARM, the return breakpoint is + always at BP_ADDR. */ /* XXX Fix for Thumb. */ - regcache_cooked_write_unsigned (regcache, ARM_LR_REGNUM, dummy_addr); + regcache_cooked_write_unsigned (regcache, ARM_LR_REGNUM, bp_addr); /* Walk through the list of args and determine how large a temporary stack is required. Need to take care here as structs may be diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c index c184b44..6278161 100644 --- a/gdb/d10v-tdep.c +++ b/gdb/d10v-tdep.c @@ -977,9 +977,10 @@ d10v_push_dummy_code (struct gdbarch *gdbarch, } static CORE_ADDR -d10v_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, - CORE_ADDR dummy_addr, int nargs, struct value **args, - CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr) +d10v_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, + struct regcache *regcache, CORE_ADDR bp_addr, + int nargs, struct value **args, CORE_ADDR sp, int struct_return, + CORE_ADDR struct_addr) { int i; int regnum = ARG1_REGNUM; @@ -987,9 +988,9 @@ d10v_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, long val; /* Set the return address. For the d10v, the return breakpoint is - always at DUMMY_ADDR. */ + always at BP_ADDR. */ regcache_cooked_write_unsigned (regcache, LR_REGNUM, - d10v_convert_iaddr_to_raw (dummy_addr)); + d10v_convert_iaddr_to_raw (bp_addr)); /* If STRUCT_RETURN is true, then the struct return address (in STRUCT_ADDR) will consume the first argument-passing register. diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 976ce59..8bf2c32 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -4264,7 +4264,7 @@ gdbarch_push_dummy_call_p (struct gdbarch *gdbarch) } CORE_ADDR -gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR dummy_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr) +gdbarch_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr) { gdb_assert (gdbarch != NULL); if (gdbarch->push_dummy_call == 0) @@ -4272,7 +4272,7 @@ gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, COR "gdbarch: gdbarch_push_dummy_call invalid"); if (gdbarch_debug >= 2) fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n"); - return gdbarch->push_dummy_call (gdbarch, regcache, dummy_addr, nargs, args, sp, struct_return, struct_addr); + return gdbarch->push_dummy_call (gdbarch, func_addr, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr); } void diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 8e52d240..6a822f3 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1613,8 +1613,8 @@ extern void set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, gdba extern int gdbarch_push_dummy_call_p (struct gdbarch *gdbarch); -typedef CORE_ADDR (gdbarch_push_dummy_call_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR dummy_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr); -extern CORE_ADDR gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR dummy_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr); +typedef CORE_ADDR (gdbarch_push_dummy_call_ftype) (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr); +extern CORE_ADDR gdbarch_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr); extern void set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call); #if defined (DEPRECATED_PUSH_DUMMY_FRAME) diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 633c910..fd014cd 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -568,7 +568,7 @@ F:2:INTEGER_TO_ADDRESS:CORE_ADDR:integer_to_address:struct type *type, void *buf f:2:RETURN_VALUE_ON_STACK:int:return_value_on_stack:struct type *type:type:::generic_return_value_on_stack_not::0 # Replaced by PUSH_DUMMY_CALL F:2:DEPRECATED_PUSH_ARGUMENTS:CORE_ADDR:deprecated_push_arguments:int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:nargs, args, sp, struct_return, struct_addr -M::PUSH_DUMMY_CALL:CORE_ADDR:push_dummy_call:struct regcache *regcache, CORE_ADDR dummy_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:regcache, dummy_addr, nargs, args, sp, struct_return, struct_addr +M::PUSH_DUMMY_CALL:CORE_ADDR:push_dummy_call:CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:func_addr, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr F:2:DEPRECATED_PUSH_DUMMY_FRAME:void:deprecated_push_dummy_frame:void:-:::0 # NOTE: This can be handled directly in push_dummy_call. F:2:DEPRECATED_PUSH_RETURN_ADDRESS:CORE_ADDR:deprecated_push_return_address:CORE_ADDR pc, CORE_ADDR sp:pc, sp:::0 diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 6641516..47bf95c 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -1005,9 +1005,10 @@ i386_get_longjmp_target (CORE_ADDR *pc) static CORE_ADDR -i386_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, - CORE_ADDR dummy_addr, int nargs, struct value **args, - CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr) +i386_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, + struct regcache *regcache, CORE_ADDR bp_addr, int nargs, + struct value **args, CORE_ADDR sp, int struct_return, + CORE_ADDR struct_addr) { char buf[4]; int i; @@ -1038,7 +1039,7 @@ i386_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, /* Store return address. */ sp -= 4; - store_unsigned_integer (buf, 4, dummy_addr); + store_unsigned_integer (buf, 4, bp_addr); write_memory (sp, buf, 4); /* Finally, update the stack pointer... */ diff --git a/gdb/infcall.c b/gdb/infcall.c index a4ad896..82c18ae 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -747,7 +747,7 @@ You must use a pointer to function type variable. Command ignored.", arg_name); /* When there is no push_dummy_call method, should this code simply error out. That would the implementation of this method for all ABIs (which is probably a good thing). */ - sp = gdbarch_push_dummy_call (current_gdbarch, current_regcache, + sp = gdbarch_push_dummy_call (current_gdbarch, funaddr, current_regcache, bp_addr, nargs, args, sp, struct_return, struct_addr); else if (DEPRECATED_PUSH_ARGUMENTS_P ()) |