Pass return_method to _push_dummy_call
gdb/ChangeLog: * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with return_method. * alpha-tdep.c (alpha_push_dummy_call): Likewise. * amd64-tdep.c (amd64_push_arguments): Likewise. (amd64_push_dummy_call): Likewise. * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise. * arc-tdep.c (arc_push_dummy_call): Likewise. * arm-tdep.c (arm_push_dummy_call): Likewise. * avr-tdep.c (avr_push_dummy_call): Likewise. * bfin-tdep.c (bfin_push_dummy_call): Likewise. * cris-tdep.c (cris_push_dummy_call): Likewise. * csky-tdep.c (csky_push_dummy_call): Likewise. * frv-tdep.c (frv_push_dummy_call): Likewise. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate. * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with return_method. * h8300-tdep.c (h8300_push_dummy_call): Likewise. * hppa-tdep.c (hppa32_push_dummy_call): Likewise. (hppa64_push_dummy_call): Likewise. * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise. * i386-tdep.c (i386_push_dummy_call): Likewise. * ia64-tdep.c (ia64_push_dummy_call): Likewise. * infcall.c (call_function_by_hand_dummy): Likewise. * iq2000-tdep.c (iq2000_push_dummy_call): Likewise. * lm32-tdep.c (lm32_push_dummy_call): Likewise. * m32c-tdep.c (m32c_push_dummy_call): Likewise. * m32r-tdep.c (m32r_push_dummy_call): Likewise. * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise. * m68k-tdep.c (m68k_push_dummy_call): Likewise. * mep-tdep.c (mep_push_dummy_call): Likewise. * mips-tdep.c (mips_eabi_push_dummy_call): Likewise. (mips_n32n64_push_dummy_call): Likewise. (mips_o32_push_dummy_call): Likewise. (mips_o64_push_dummy_call): Likewise. * mn10300-tdep.c (mn10300_push_dummy_call): Likewise. * msp430-tdep.c (msp430_push_dummy_call): Likewise. * nds32-tdep.c (nds32_push_dummy_call): Likewise. * nios2-tdep.c (nios2_push_dummy_call): Likewise. * or1k-tdep.c (or1k_push_dummy_call): Likewise. * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise. (ppc64_sysv_abi_push_dummy_call): Likewise. * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise. (ppc64_sysv_abi_push_dummy_call): Likewise. * riscv-tdep.c (riscv_push_dummy_call): Likewise. * rl78-tdep.c (rl78_push_dummy_call): Likewise. * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise. * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise. * rx-tdep.c (rx_push_dummy_call): Likewise. * s390-tdep.c (s390_push_dummy_call): Likewise. * score-tdep.c (score_push_dummy_call): Likewise. * sh-tdep.c (sh_push_dummy_call_fpu): Likewise. (sh_push_dummy_call_nofpu): Likewise. * sparc-tdep.c (sparc32_store_arguments): Likewise. (sparc32_push_dummy_call): Likewise. * sparc64-tdep.c (sparc64_store_arguments): Likewise. (sparc64_push_dummy_call): Likewise. * spu-tdep.c (spu_push_dummy_call): Likewise. * tic6x-tdep.c (tic6x_push_dummy_call): Likewise. * tilegx-tdep.c (tilegx_push_dummy_call): Likewise. * v850-tdep.c (v850_push_dummy_call): Likewise. * vax-tdep.c (vax_push_dummy_call): Likewise. * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise. * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
This commit is contained in:
parent
c5ac5cbb5b
commit
cf84fa6bcf
@ -1,3 +1,70 @@
|
||||
2018-11-16 Alan Hayward <alan.hayward@arm.com>
|
||||
|
||||
* aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
|
||||
return_method.
|
||||
* alpha-tdep.c (alpha_push_dummy_call): Likewise.
|
||||
* amd64-tdep.c (amd64_push_arguments): Likewise.
|
||||
(amd64_push_dummy_call): Likewise.
|
||||
* amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
|
||||
* arc-tdep.c (arc_push_dummy_call): Likewise.
|
||||
* arm-tdep.c (arm_push_dummy_call): Likewise.
|
||||
* avr-tdep.c (avr_push_dummy_call): Likewise.
|
||||
* bfin-tdep.c (bfin_push_dummy_call): Likewise.
|
||||
* cris-tdep.c (cris_push_dummy_call): Likewise.
|
||||
* csky-tdep.c (csky_push_dummy_call): Likewise.
|
||||
* frv-tdep.c (frv_push_dummy_call): Likewise.
|
||||
* gdbarch.c: Regenerate.
|
||||
* gdbarch.h: Regenerate.
|
||||
* gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
|
||||
return_method.
|
||||
* h8300-tdep.c (h8300_push_dummy_call): Likewise.
|
||||
* hppa-tdep.c (hppa32_push_dummy_call): Likewise.
|
||||
(hppa64_push_dummy_call): Likewise.
|
||||
* i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
|
||||
* i386-tdep.c (i386_push_dummy_call): Likewise.
|
||||
* ia64-tdep.c (ia64_push_dummy_call): Likewise.
|
||||
* infcall.c (call_function_by_hand_dummy): Likewise.
|
||||
* iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
|
||||
* lm32-tdep.c (lm32_push_dummy_call): Likewise.
|
||||
* m32c-tdep.c (m32c_push_dummy_call): Likewise.
|
||||
* m32r-tdep.c (m32r_push_dummy_call): Likewise.
|
||||
* m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
|
||||
* m68k-tdep.c (m68k_push_dummy_call): Likewise.
|
||||
* mep-tdep.c (mep_push_dummy_call): Likewise.
|
||||
* mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
|
||||
(mips_n32n64_push_dummy_call): Likewise.
|
||||
(mips_o32_push_dummy_call): Likewise.
|
||||
(mips_o64_push_dummy_call): Likewise.
|
||||
* mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
|
||||
* msp430-tdep.c (msp430_push_dummy_call): Likewise.
|
||||
* nds32-tdep.c (nds32_push_dummy_call): Likewise.
|
||||
* nios2-tdep.c (nios2_push_dummy_call): Likewise.
|
||||
* or1k-tdep.c (or1k_push_dummy_call): Likewise.
|
||||
* ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
|
||||
(ppc64_sysv_abi_push_dummy_call): Likewise.
|
||||
* ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
|
||||
(ppc64_sysv_abi_push_dummy_call): Likewise.
|
||||
* riscv-tdep.c (riscv_push_dummy_call): Likewise.
|
||||
* rl78-tdep.c (rl78_push_dummy_call): Likewise.
|
||||
* rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
|
||||
* rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
|
||||
* rx-tdep.c (rx_push_dummy_call): Likewise.
|
||||
* s390-tdep.c (s390_push_dummy_call): Likewise.
|
||||
* score-tdep.c (score_push_dummy_call): Likewise.
|
||||
* sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
|
||||
(sh_push_dummy_call_nofpu): Likewise.
|
||||
* sparc-tdep.c (sparc32_store_arguments): Likewise.
|
||||
(sparc32_push_dummy_call): Likewise.
|
||||
* sparc64-tdep.c (sparc64_store_arguments): Likewise.
|
||||
(sparc64_push_dummy_call): Likewise.
|
||||
* spu-tdep.c (spu_push_dummy_call): Likewise.
|
||||
* tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
|
||||
* tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
|
||||
* v850-tdep.c (v850_push_dummy_call): Likewise.
|
||||
* vax-tdep.c (vax_push_dummy_call): Likewise.
|
||||
* xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
|
||||
* xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
|
||||
|
||||
2018-11-16 Alan Hayward <alan.hayward@arm.com>
|
||||
|
||||
* gdbarch.sh (enum function_call_return_method): Add enum.
|
||||
|
@ -1514,7 +1514,8 @@ static CORE_ADDR
|
||||
aarch64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs,
|
||||
struct value **args, CORE_ADDR sp, int struct_return,
|
||||
struct value **args, CORE_ADDR sp,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
int argnum;
|
||||
@ -1578,7 +1579,7 @@ aarch64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
}
|
||||
|
||||
/* The struct_return pointer occupies X8. */
|
||||
if (struct_return || lang_struct_return)
|
||||
if (return_method == return_method_struct || lang_struct_return)
|
||||
{
|
||||
if (aarch64_debug)
|
||||
{
|
||||
|
@ -295,11 +295,12 @@ static CORE_ADDR
|
||||
alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int i;
|
||||
int accumulate_size = struct_return ? 8 : 0;
|
||||
int accumulate_size = (return_method == return_method_struct) ? 8 : 0;
|
||||
struct alpha_arg
|
||||
{
|
||||
const gdb_byte *contents;
|
||||
@ -446,7 +447,7 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
/* Everything else goes to the stack. */
|
||||
write_memory (sp + offset - sizeof(arg_reg_buffer), contents, len);
|
||||
}
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
store_unsigned_integer (arg_reg_buffer, ALPHA_REGISTER_SIZE,
|
||||
byte_order, struct_addr);
|
||||
|
||||
|
@ -861,8 +861,8 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||
|
||||
|
||||
static CORE_ADDR
|
||||
amd64_push_arguments (struct regcache *regcache, int nargs,
|
||||
struct value **args, CORE_ADDR sp, int struct_return)
|
||||
amd64_push_arguments (struct regcache *regcache, int nargs, struct value **args,
|
||||
CORE_ADDR sp, function_call_return_method return_method)
|
||||
{
|
||||
static int integer_regnum[] =
|
||||
{
|
||||
@ -890,7 +890,7 @@ amd64_push_arguments (struct regcache *regcache, int nargs,
|
||||
int i;
|
||||
|
||||
/* Reserve a register for the "hidden" argument. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
integer_reg++;
|
||||
|
||||
for (i = 0; i < nargs; i++)
|
||||
@ -996,7 +996,8 @@ static CORE_ADDR
|
||||
amd64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
gdb_byte buf[8];
|
||||
@ -1009,10 +1010,10 @@ amd64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
i387_reset_bnd_regs (gdbarch, regcache);
|
||||
|
||||
/* Pass arguments. */
|
||||
sp = amd64_push_arguments (regcache, nargs, args, sp, struct_return);
|
||||
sp = amd64_push_arguments (regcache, nargs, args, sp, return_method);
|
||||
|
||||
/* Pass "hidden" argument". */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
store_unsigned_integer (buf, 8, byte_order, struct_addr);
|
||||
regcache->cooked_write (AMD64_RDI_REGNUM, buf);
|
||||
|
@ -157,7 +157,7 @@ amd64_windows_store_arg_in_reg (struct regcache *regcache,
|
||||
static CORE_ADDR
|
||||
amd64_windows_push_arguments (struct regcache *regcache, int nargs,
|
||||
struct value **args, CORE_ADDR sp,
|
||||
int struct_return)
|
||||
function_call_return_method return_method)
|
||||
{
|
||||
int reg_idx = 0;
|
||||
int i;
|
||||
@ -180,7 +180,7 @@ amd64_windows_push_arguments (struct regcache *regcache, int nargs,
|
||||
}
|
||||
|
||||
/* Reserve a register for the "hidden" argument. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
reg_idx++;
|
||||
|
||||
for (i = 0; i < nargs; i++)
|
||||
@ -244,18 +244,18 @@ static CORE_ADDR
|
||||
amd64_windows_push_dummy_call
|
||||
(struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args,
|
||||
CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
function_call_return_method return_method, CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
gdb_byte buf[8];
|
||||
|
||||
/* Pass arguments. */
|
||||
sp = amd64_windows_push_arguments (regcache, nargs, args, sp,
|
||||
struct_return);
|
||||
return_method);
|
||||
|
||||
/* Pass "hidden" argument". */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
/* The "hidden" argument is passed throught the first argument
|
||||
register. */
|
||||
|
@ -592,7 +592,8 @@ arc_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
|
||||
static CORE_ADDR
|
||||
arc_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
|
||||
struct value **args, CORE_ADDR sp, int struct_return,
|
||||
struct value **args, CORE_ADDR sp,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
if (arc_debug)
|
||||
@ -607,7 +608,7 @@ arc_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
value return? If so, struct_addr is the address of the reserved space for
|
||||
the return structure to be written on the stack, and that address is
|
||||
passed to that function as a hidden first argument. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
/* Pass the return address in the first argument register. */
|
||||
regcache_cooked_write_unsigned (regcache, arg_reg, struct_addr);
|
||||
|
@ -3683,7 +3683,8 @@ arm_vfp_abi_for_function (struct gdbarch *gdbarch, struct type *func_type)
|
||||
static CORE_ADDR
|
||||
arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
|
||||
struct value **args, CORE_ADDR sp, int struct_return,
|
||||
struct value **args, CORE_ADDR sp,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -3718,7 +3719,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
|
||||
/* The struct_return pointer occupies the first parameter
|
||||
passing register. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
if (arm_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "struct return in %s = %s\n",
|
||||
|
@ -1263,7 +1263,8 @@ static CORE_ADDR
|
||||
avr_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
int i;
|
||||
gdb_byte buf[3];
|
||||
@ -1272,7 +1273,7 @@ avr_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
int regnum = AVR_ARGN_REGNUM;
|
||||
struct stack_item *si = NULL;
|
||||
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
regcache_cooked_write_unsigned
|
||||
(regcache, regnum--, (struct_addr >> 8) & 0xff);
|
||||
|
@ -498,7 +498,7 @@ bfin_push_dummy_call (struct gdbarch *gdbarch,
|
||||
int nargs,
|
||||
struct value **args,
|
||||
CORE_ADDR sp,
|
||||
int struct_return,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -543,7 +543,7 @@ bfin_push_dummy_call (struct gdbarch *gdbarch,
|
||||
|
||||
/* Store struct value address. */
|
||||
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
regcache_cooked_write_unsigned (regcache, BFIN_P0_REGNUM, struct_addr);
|
||||
|
||||
/* Set the dummy return value to bp_addr.
|
||||
|
@ -808,7 +808,8 @@ static CORE_ADDR
|
||||
cris_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int argreg;
|
||||
@ -822,10 +823,8 @@ cris_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
/* Are we returning a value using a structure return or a normal value
|
||||
return? struct_addr is the address of the reserved space for the return
|
||||
structure to be written on the stack. */
|
||||
if (struct_return)
|
||||
{
|
||||
regcache_cooked_write_unsigned (regcache, STR_REGNUM, struct_addr);
|
||||
}
|
||||
if (return_method == return_method_struct)
|
||||
regcache_cooked_write_unsigned (regcache, STR_REGNUM, struct_addr);
|
||||
|
||||
/* Now load as many as possible of the first arguments into registers,
|
||||
and push the rest onto the stack. */
|
||||
|
@ -336,7 +336,8 @@ static CORE_ADDR
|
||||
csky_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
int argnum;
|
||||
int argreg = CSKY_ABI_A0_REGNUM;
|
||||
@ -351,7 +352,7 @@ csky_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
|
||||
/* The struct_return pointer occupies the first parameter
|
||||
passing register. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
if (csky_debug)
|
||||
{
|
||||
|
@ -1193,7 +1193,8 @@ static CORE_ADDR
|
||||
frv_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int argreg;
|
||||
@ -1230,7 +1231,7 @@ frv_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
|
||||
argreg = 8;
|
||||
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
regcache_cooked_write_unsigned (regcache, struct_return_regnum,
|
||||
struct_addr);
|
||||
|
||||
|
@ -2356,13 +2356,13 @@ gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
|
||||
}
|
||||
|
||||
CORE_ADDR
|
||||
gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
|
||||
gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, function_call_return_method return_method, CORE_ADDR struct_addr)
|
||||
{
|
||||
gdb_assert (gdbarch != NULL);
|
||||
gdb_assert (gdbarch->push_dummy_call != NULL);
|
||||
if (gdbarch_debug >= 2)
|
||||
fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
|
||||
return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
|
||||
return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, return_method, struct_addr);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -417,8 +417,8 @@ extern void set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, int depre
|
||||
|
||||
extern int gdbarch_push_dummy_call_p (struct gdbarch *gdbarch);
|
||||
|
||||
typedef CORE_ADDR (gdbarch_push_dummy_call_ftype) (struct gdbarch *gdbarch, struct value *function, 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, struct value *function, struct regcache *regcache, CORE_ADDR bp_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, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, function_call_return_method return_method, CORE_ADDR struct_addr);
|
||||
extern CORE_ADDR gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, function_call_return_method return_method, CORE_ADDR struct_addr);
|
||||
extern void set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call);
|
||||
|
||||
extern int gdbarch_call_dummy_location (struct gdbarch *gdbarch);
|
||||
|
@ -485,7 +485,7 @@ M;struct frame_id;dummy_id;struct frame_info *this_frame;this_frame
|
||||
# deprecated_fp_regnum.
|
||||
v;int;deprecated_fp_regnum;;;-1;-1;;0
|
||||
|
||||
M;CORE_ADDR;push_dummy_call;struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr;function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr
|
||||
M;CORE_ADDR;push_dummy_call;struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, function_call_return_method return_method, CORE_ADDR struct_addr;function, regcache, bp_addr, nargs, args, sp, return_method, struct_addr
|
||||
v;int;call_dummy_location;;;;AT_ENTRY_POINT;;0
|
||||
M;CORE_ADDR;push_dummy_code;CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache;sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache
|
||||
|
||||
|
@ -634,7 +634,8 @@ static CORE_ADDR
|
||||
h8300_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int stack_alloc = 0, stack_offset = 0;
|
||||
@ -657,7 +658,7 @@ h8300_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
If we're returning a structure by value, then we must pass a
|
||||
pointer to the buffer for the return value as an invisible first
|
||||
argument. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
regcache_cooked_write_unsigned (regcache, reg++, struct_addr);
|
||||
|
||||
for (argument = 0; argument < nargs; argument++)
|
||||
|
@ -714,7 +714,8 @@ static CORE_ADDR
|
||||
hppa32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
|
||||
@ -849,7 +850,7 @@ hppa32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
|
||||
/* If a structure has to be returned, set up register 28 to hold its
|
||||
address. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
regcache_cooked_write_unsigned (regcache, 28, struct_addr);
|
||||
|
||||
gp = tdep->find_global_pointer (gdbarch, function);
|
||||
@ -969,7 +970,8 @@ static CORE_ADDR
|
||||
hppa64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -1113,7 +1115,7 @@ hppa64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
|
||||
/* If a structure has to be returned, set up GR 28 (%ret0) to hold
|
||||
its address. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
regcache_cooked_write_unsigned (regcache, HPPA_RET0_REGNUM, struct_addr);
|
||||
|
||||
/* Set up GR27 (%dp) to hold the global pointer (gp). */
|
||||
|
@ -153,7 +153,8 @@ static CORE_ADDR
|
||||
i386_darwin_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -169,7 +170,7 @@ i386_darwin_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
int args_space = 0;
|
||||
int num_m128 = 0;
|
||||
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
if (write_pass)
|
||||
{
|
||||
|
@ -2671,7 +2671,8 @@ i386_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr,
|
||||
static CORE_ADDR
|
||||
i386_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
|
||||
struct value **args, CORE_ADDR sp, int struct_return,
|
||||
struct value **args, CORE_ADDR sp,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -2695,7 +2696,7 @@ i386_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
{
|
||||
int args_space_used = 0;
|
||||
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
if (write_pass)
|
||||
{
|
||||
|
@ -3673,7 +3673,8 @@ static CORE_ADDR
|
||||
ia64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -3828,11 +3829,9 @@ ia64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
}
|
||||
|
||||
/* Store the struct return value in r8 if necessary. */
|
||||
if (struct_return)
|
||||
{
|
||||
regcache_cooked_write_unsigned (regcache, IA64_GR8_REGNUM,
|
||||
(ULONGEST) struct_addr);
|
||||
}
|
||||
if (return_method == return_method_struct)
|
||||
regcache_cooked_write_unsigned (regcache, IA64_GR8_REGNUM,
|
||||
(ULONGEST) struct_addr);
|
||||
|
||||
global_pointer = ia64_find_global_pointer (gdbarch, func_addr);
|
||||
|
||||
|
@ -1052,8 +1052,7 @@ call_function_by_hand_dummy (struct value *function,
|
||||
presumably, the ABI code knows where, in the call dummy, the
|
||||
return address should be pointed. */
|
||||
sp = gdbarch_push_dummy_call (gdbarch, function, get_current_regcache (),
|
||||
bp_addr, nargs, args, sp,
|
||||
(return_method == return_method_struct),
|
||||
bp_addr, nargs, args, sp, return_method,
|
||||
struct_addr);
|
||||
|
||||
/* Set up a frame ID for the dummy frame so we can pass it to
|
||||
|
@ -645,7 +645,8 @@ static CORE_ADDR
|
||||
iq2000_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
const bfd_byte *val;
|
||||
@ -657,7 +658,9 @@ iq2000_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
CORE_ADDR struct_ptr;
|
||||
|
||||
/* First determine how much stack space we will need. */
|
||||
for (i = 0, argreg = E_1ST_ARGREG + (struct_return != 0); i < nargs; i++)
|
||||
for (i = 0, argreg = E_1ST_ARGREG + (return_method == return_method_struct);
|
||||
i < nargs;
|
||||
i++)
|
||||
{
|
||||
type = value_type (args[i]);
|
||||
typelen = TYPE_LENGTH (type);
|
||||
@ -716,7 +719,7 @@ iq2000_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
stackspace = 0;
|
||||
|
||||
argreg = E_1ST_ARGREG;
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
/* A function that returns a struct will consume one argreg to do so.
|
||||
*/
|
||||
|
@ -228,7 +228,8 @@ static CORE_ADDR
|
||||
lm32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int first_arg_reg = SIM_LM32_R1_REGNUM;
|
||||
@ -240,7 +241,7 @@ lm32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
|
||||
/* If we're returning a large struct, a pointer to the address to
|
||||
store it at is passed as a first hidden parameter. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
regcache_cooked_write_unsigned (regcache, first_arg_reg, struct_addr);
|
||||
first_arg_reg++;
|
||||
|
@ -2016,7 +2016,8 @@ m32c_reg_arg_type (struct type *type)
|
||||
static CORE_ADDR
|
||||
m32c_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
|
||||
struct value **args, CORE_ADDR sp, int struct_return,
|
||||
struct value **args, CORE_ADDR sp,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
@ -2054,7 +2055,7 @@ m32c_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
/* First, if the function returns an aggregate by value, push a
|
||||
pointer to a buffer for it. This doesn't affect the way
|
||||
subsequent arguments are allocated to registers. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
int ptr_len = TYPE_LENGTH (tdep->ptr_voyd);
|
||||
sp -= ptr_len;
|
||||
|
@ -659,7 +659,8 @@ m32r_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
|
||||
static CORE_ADDR
|
||||
m32r_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
|
||||
struct value **args, CORE_ADDR sp, int struct_return,
|
||||
struct value **args, CORE_ADDR sp,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -683,7 +684,7 @@ m32r_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
/* If STRUCT_RETURN is true, then the struct return address (in
|
||||
STRUCT_ADDR) will consume the first argument-passing register.
|
||||
Both adjust the register count and store that value. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
regcache_cooked_write_unsigned (regcache, argreg, struct_addr);
|
||||
argreg++;
|
||||
|
@ -1154,7 +1154,8 @@ static CORE_ADDR
|
||||
m68hc11_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int argnum;
|
||||
@ -1164,10 +1165,8 @@ m68hc11_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
gdb_byte buf[2];
|
||||
|
||||
first_stack_argnum = 0;
|
||||
if (struct_return)
|
||||
{
|
||||
regcache_cooked_write_unsigned (regcache, HARD_D_REGNUM, struct_addr);
|
||||
}
|
||||
if (return_method == return_method_struct)
|
||||
regcache_cooked_write_unsigned (regcache, HARD_D_REGNUM, struct_addr);
|
||||
else if (nargs > 0)
|
||||
{
|
||||
type = value_type (args[0]);
|
||||
|
@ -492,7 +492,8 @@ m68k_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
|
||||
static CORE_ADDR
|
||||
m68k_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
|
||||
struct value **args, CORE_ADDR sp, int struct_return,
|
||||
struct value **args, CORE_ADDR sp,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
@ -522,7 +523,7 @@ m68k_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
}
|
||||
|
||||
/* Store struct value address. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
store_unsigned_integer (buf, 4, byte_order, struct_addr);
|
||||
regcache->cooked_write (tdep->struct_value_regnum, buf);
|
||||
|
@ -2258,7 +2258,7 @@ static CORE_ADDR
|
||||
mep_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int argc, struct value **argv, CORE_ADDR sp,
|
||||
int struct_return,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -2287,7 +2287,7 @@ mep_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
|
||||
/* If we're returning a structure by value, push the pointer to the
|
||||
buffer as the first argument. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
regcache_cooked_write_unsigned (regcache, arg_reg, struct_addr);
|
||||
arg_reg++;
|
||||
|
@ -4495,7 +4495,8 @@ static CORE_ADDR
|
||||
mips_eabi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
int argreg;
|
||||
int float_argreg;
|
||||
@ -4541,7 +4542,7 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
float_argreg = mips_fpa0_regnum (gdbarch);
|
||||
|
||||
/* The struct_return pointer occupies the first parameter-passing reg. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
if (mips_debug)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
@ -4890,7 +4891,8 @@ static CORE_ADDR
|
||||
mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
int argreg;
|
||||
int float_argreg;
|
||||
@ -4933,7 +4935,7 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
float_argreg = mips_fpa0_regnum (gdbarch);
|
||||
|
||||
/* The struct_return pointer occupies the first parameter-passing reg. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
if (mips_debug)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
@ -5347,7 +5349,8 @@ static CORE_ADDR
|
||||
mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
int argreg;
|
||||
int float_argreg;
|
||||
@ -5398,7 +5401,7 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
float_argreg = mips_fpa0_regnum (gdbarch);
|
||||
|
||||
/* The struct_return pointer occupies the first parameter-passing reg. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
if (mips_debug)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
@ -5872,7 +5875,7 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs,
|
||||
struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method, CORE_ADDR struct_addr)
|
||||
{
|
||||
int argreg;
|
||||
int float_argreg;
|
||||
@ -5920,7 +5923,7 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
float_argreg = mips_fpa0_regnum (gdbarch);
|
||||
|
||||
/* The struct_return pointer occupies the first parameter-passing reg. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
if (mips_debug)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
|
@ -1191,7 +1191,7 @@ mn10300_push_dummy_call (struct gdbarch *gdbarch,
|
||||
CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args,
|
||||
CORE_ADDR sp,
|
||||
int struct_return,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -1211,7 +1211,7 @@ mn10300_push_dummy_call (struct gdbarch *gdbarch,
|
||||
|
||||
XXX This doesn't appear to handle pass-by-invisible reference
|
||||
arguments. */
|
||||
regs_used = struct_return ? 1 : 0;
|
||||
regs_used = (return_method == return_method_struct) ? 1 : 0;
|
||||
for (len = 0, argnum = 0; argnum < nargs; argnum++)
|
||||
{
|
||||
arg_len = (TYPE_LENGTH (value_type (args[argnum])) + 3) & ~3;
|
||||
@ -1226,7 +1226,7 @@ mn10300_push_dummy_call (struct gdbarch *gdbarch,
|
||||
/* Allocate stack space. */
|
||||
sp -= len;
|
||||
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
regs_used = 1;
|
||||
regcache_cooked_write_unsigned (regcache, E_D0_REGNUM, struct_addr);
|
||||
|
@ -669,7 +669,8 @@ static CORE_ADDR
|
||||
msp430_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int write_pass;
|
||||
@ -699,7 +700,7 @@ msp430_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
sp = align_down (sp - sp_off, 4);
|
||||
sp_off = 0;
|
||||
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
if (write_pass)
|
||||
regcache_cooked_write_unsigned (regcache, arg_reg, struct_addr);
|
||||
|
@ -1490,7 +1490,8 @@ static CORE_ADDR
|
||||
nds32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
const int REND = 6; /* End for register offset. */
|
||||
int goff = 0; /* Current gpr offset for argument. */
|
||||
@ -1511,7 +1512,7 @@ nds32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
/* If STRUCT_RETURN is true, then the struct return address (in
|
||||
STRUCT_ADDR) will consume the first argument-passing register.
|
||||
Both adjust the register count and store that value. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
regcache_cooked_write_unsigned (regcache, NDS32_R0_REGNUM, struct_addr);
|
||||
goff++;
|
||||
|
@ -1811,7 +1811,8 @@ static CORE_ADDR
|
||||
nios2_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
int argreg;
|
||||
int argnum;
|
||||
@ -1833,7 +1834,7 @@ nios2_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
|
||||
/* The struct_return pointer occupies the first parameter-passing
|
||||
register. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
regcache_cooked_write_unsigned (regcache, argreg++, struct_addr);
|
||||
|
||||
/* Now load as many as possible of the first arguments into
|
||||
|
@ -595,7 +595,8 @@ static CORE_ADDR
|
||||
or1k_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
|
||||
int argreg;
|
||||
@ -617,7 +618,7 @@ or1k_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
|
||||
/* Location for a returned structure. This is passed as a silent first
|
||||
argument. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
regcache_cooked_write_unsigned (regcache, OR1K_FIRST_ARG_REGNUM,
|
||||
struct_addr);
|
||||
|
@ -62,7 +62,8 @@ CORE_ADDR
|
||||
ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -107,7 +108,7 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
(which will be passed in r3) is used for struct return
|
||||
address. In that case we should advance one word and start
|
||||
from r4 register to copy parameters. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
if (write_pass)
|
||||
regcache_cooked_write_signed (regcache,
|
||||
@ -1540,7 +1541,8 @@ ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
|
||||
struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
CORE_ADDR func_addr = find_function_addr (function, NULL);
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
@ -1624,7 +1626,7 @@ ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
|
||||
containing the address of that struct.. In that case we
|
||||
should advance one word and start from r4 register to copy
|
||||
parameters. This also consumes one on-stack parameter slot. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
ppc64_sysv_abi_push_integer (gdbarch, struct_addr, &argpos);
|
||||
|
||||
for (argno = 0; argno < nargs; argno++)
|
||||
|
@ -39,20 +39,17 @@ enum return_value_convention ppc_sysv_abi_broken_return_value (struct gdbarch *g
|
||||
struct regcache *regcache,
|
||||
gdb_byte *readbuf,
|
||||
const gdb_byte *writebuf);
|
||||
CORE_ADDR ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
|
||||
struct value *function,
|
||||
struct regcache *regcache,
|
||||
CORE_ADDR bp_addr, int nargs,
|
||||
struct value **args, CORE_ADDR sp,
|
||||
int struct_return,
|
||||
CORE_ADDR struct_addr);
|
||||
CORE_ADDR ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
|
||||
struct value *function,
|
||||
struct regcache *regcache,
|
||||
CORE_ADDR bp_addr, int nargs,
|
||||
struct value **args, CORE_ADDR sp,
|
||||
int struct_return,
|
||||
CORE_ADDR struct_addr);
|
||||
|
||||
CORE_ADDR ppc_sysv_abi_push_dummy_call
|
||||
(struct gdbarch *gdbarch, struct value *function, struct regcache *regcache,
|
||||
CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp,
|
||||
function_call_return_method return_method, CORE_ADDR struct_addr);
|
||||
|
||||
CORE_ADDR ppc64_sysv_abi_push_dummy_call
|
||||
(struct gdbarch *gdbarch, struct value *function, struct regcache *regcache,
|
||||
CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp,
|
||||
function_call_return_method return_method, CORE_ADDR struct_addr);
|
||||
|
||||
enum return_value_convention ppc64_sysv_abi_return_value (struct gdbarch *gdbarch,
|
||||
struct value *function,
|
||||
struct type *valtype,
|
||||
|
@ -2374,7 +2374,7 @@ riscv_push_dummy_call (struct gdbarch *gdbarch,
|
||||
int nargs,
|
||||
struct value **args,
|
||||
CORE_ADDR sp,
|
||||
int struct_return,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
int i;
|
||||
@ -2394,7 +2394,7 @@ riscv_push_dummy_call (struct gdbarch *gdbarch,
|
||||
ftype = check_typedef (TYPE_TARGET_TYPE (ftype));
|
||||
|
||||
/* We'll use register $a0 if we're returning a struct. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
++call_info.int_regs.next_regnum;
|
||||
|
||||
for (i = 0; i < nargs; ++i)
|
||||
@ -2425,7 +2425,7 @@ riscv_push_dummy_call (struct gdbarch *gdbarch,
|
||||
(riscv_has_fp_abi (gdbarch) ? "is" : "is not"));
|
||||
fprintf_unfiltered (gdb_stdlog, ": xlen: %d\n: flen: %d\n",
|
||||
call_info.xlen, call_info.flen);
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"[*] struct return pointer in register $A0\n");
|
||||
for (i = 0; i < nargs; ++i)
|
||||
@ -2452,7 +2452,7 @@ riscv_push_dummy_call (struct gdbarch *gdbarch,
|
||||
|
||||
/* Now load the argument into registers, or onto the stack. */
|
||||
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
gdb_byte buf[sizeof (LONGEST)];
|
||||
|
||||
|
@ -1336,7 +1336,8 @@ static CORE_ADDR
|
||||
rl78_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
gdb_byte buf[4];
|
||||
@ -1355,7 +1356,7 @@ rl78_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
}
|
||||
|
||||
/* Store struct value address. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
store_unsigned_integer (buf, 2, byte_order, struct_addr);
|
||||
sp -= 2;
|
||||
|
@ -285,7 +285,8 @@ static CORE_ADDR
|
||||
rs6000_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -316,7 +317,7 @@ rs6000_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
(which will be passed in r3) is used for struct return address.
|
||||
In that case we should advance one word and start from r4
|
||||
register to copy parameters. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
regcache_raw_write_unsigned (regcache, tdep->ppc_gp0_regnum + 3,
|
||||
struct_addr);
|
||||
|
@ -33,7 +33,8 @@ rs6000_lynx178_push_dummy_call (struct gdbarch *gdbarch,
|
||||
struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -63,7 +64,7 @@ rs6000_lynx178_push_dummy_call (struct gdbarch *gdbarch,
|
||||
(which will be passed in r3) is used for struct return address.
|
||||
In that case we should advance one word and start from r4
|
||||
register to copy parameters. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
regcache_raw_write_unsigned (regcache, tdep->ppc_gp0_regnum + 3,
|
||||
struct_addr);
|
||||
|
@ -784,7 +784,8 @@ rx_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
|
||||
static CORE_ADDR
|
||||
rx_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
|
||||
struct value **args, CORE_ADDR sp, int struct_return,
|
||||
struct value **args, CORE_ADDR sp,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -830,7 +831,7 @@ rx_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
sp = align_down (sp - sp_off, 4);
|
||||
sp_off = 0;
|
||||
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
struct type *return_type = TYPE_TARGET_TYPE (func_type);
|
||||
|
||||
@ -854,7 +855,8 @@ rx_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct type *arg_type = check_typedef (value_type (arg));
|
||||
ULONGEST arg_size = TYPE_LENGTH (arg_type);
|
||||
|
||||
if (i == 0 && struct_addr != 0 && !struct_return
|
||||
if (i == 0 && struct_addr != 0
|
||||
&& return_method != return_method_struct
|
||||
&& TYPE_CODE (arg_type) == TYPE_CODE_PTR
|
||||
&& extract_unsigned_integer (arg_bits, 4,
|
||||
byte_order) == struct_addr)
|
||||
|
@ -1865,7 +1865,8 @@ static CORE_ADDR
|
||||
s390_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
int word_size = gdbarch_ptr_bit (gdbarch) / 8;
|
||||
@ -1879,7 +1880,7 @@ s390_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
ftype = check_typedef (TYPE_TARGET_TYPE (ftype));
|
||||
|
||||
arg_prep.copy = sp;
|
||||
arg_prep.gr = struct_return ? 3 : 2;
|
||||
arg_prep.gr = (return_method == return_method_struct) ? 3 : 2;
|
||||
arg_prep.fr = 0;
|
||||
arg_prep.vr = 0;
|
||||
arg_prep.argp = 0;
|
||||
@ -1908,7 +1909,7 @@ s390_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
error (_("Stack overflow"));
|
||||
|
||||
/* Pass the structure return address in general register 2. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
regcache_cooked_write_unsigned (regcache, S390_R2_REGNUM, struct_addr);
|
||||
|
||||
/* Initialize arg_state for "write mode". */
|
||||
|
@ -511,7 +511,8 @@ static CORE_ADDR
|
||||
score_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int argnum;
|
||||
@ -535,7 +536,7 @@ score_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
|
||||
/* Step 3, Check if struct return then save the struct address to
|
||||
r4 and increase the stack_offset by 4. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
regcache_cooked_write_unsigned (regcache, argreg++, struct_addr);
|
||||
stack_offset += SCORE_REGSIZE;
|
||||
|
@ -1062,7 +1062,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch,
|
||||
struct regcache *regcache,
|
||||
CORE_ADDR bp_addr, int nargs,
|
||||
struct value **args,
|
||||
CORE_ADDR sp, int struct_return,
|
||||
CORE_ADDR sp, function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -1175,7 +1175,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch,
|
||||
}
|
||||
}
|
||||
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
if (sh_is_renesas_calling_convention (func_type))
|
||||
/* If the function uses the Renesas ABI, subtract another 4 bytes from
|
||||
@ -1204,7 +1204,8 @@ sh_push_dummy_call_nofpu (struct gdbarch *gdbarch,
|
||||
struct regcache *regcache,
|
||||
CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args,
|
||||
CORE_ADDR sp, int struct_return,
|
||||
CORE_ADDR sp,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -1278,7 +1279,7 @@ sh_push_dummy_call_nofpu (struct gdbarch *gdbarch,
|
||||
}
|
||||
}
|
||||
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
if (sh_is_renesas_calling_convention (func_type))
|
||||
/* If the function uses the Renesas ABI, subtract another 4 bytes from
|
||||
|
@ -612,7 +612,8 @@ sparc32_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp,
|
||||
static CORE_ADDR
|
||||
sparc32_store_arguments (struct regcache *regcache, int nargs,
|
||||
struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -697,7 +698,7 @@ sparc32_store_arguments (struct regcache *regcache, int nargs,
|
||||
|
||||
gdb_assert (element == num_elements);
|
||||
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
gdb_byte buf[4];
|
||||
|
||||
@ -712,16 +713,18 @@ static CORE_ADDR
|
||||
sparc32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
CORE_ADDR call_pc = (struct_return ? (bp_addr - 12) : (bp_addr - 8));
|
||||
CORE_ADDR call_pc = (return_method == return_method_struct
|
||||
? (bp_addr - 12) : (bp_addr - 8));
|
||||
|
||||
/* Set return address. */
|
||||
regcache_cooked_write_unsigned (regcache, SPARC_O7_REGNUM, call_pc);
|
||||
|
||||
/* Set up function arguments. */
|
||||
sp = sparc32_store_arguments (regcache, nargs, args, sp,
|
||||
struct_return, struct_addr);
|
||||
sp = sparc32_store_arguments (regcache, nargs, args, sp, return_method,
|
||||
struct_addr);
|
||||
|
||||
/* Allocate the 16-word window save area. */
|
||||
sp -= 16 * 4;
|
||||
|
@ -1367,7 +1367,8 @@ sparc64_extract_floating_fields (struct regcache *regcache, struct type *type,
|
||||
static CORE_ADDR
|
||||
sparc64_store_arguments (struct regcache *regcache, int nargs,
|
||||
struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
struct gdbarch *gdbarch = regcache->arch ();
|
||||
/* Number of extended words in the "parameter array". */
|
||||
@ -1381,7 +1382,7 @@ sparc64_store_arguments (struct regcache *regcache, int nargs,
|
||||
/* First we calculate the number of extended words in the "parameter
|
||||
array". While doing so we also convert some of the arguments. */
|
||||
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
num_elements++;
|
||||
|
||||
for (i = 0; i < nargs; i++)
|
||||
@ -1477,7 +1478,7 @@ sparc64_store_arguments (struct regcache *regcache, int nargs,
|
||||
contents of any unused memory or registers in the "parameter
|
||||
array" are undefined. */
|
||||
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
regcache_cooked_write_unsigned (regcache, SPARC_O0_REGNUM, struct_addr);
|
||||
element++;
|
||||
@ -1621,14 +1622,15 @@ static CORE_ADDR
|
||||
sparc64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
/* Set return address. */
|
||||
regcache_cooked_write_unsigned (regcache, SPARC_O7_REGNUM, bp_addr - 8);
|
||||
|
||||
/* Set up function arguments. */
|
||||
sp = sparc64_store_arguments (regcache, nargs, args, sp,
|
||||
struct_return, struct_addr);
|
||||
sp = sparc64_store_arguments (regcache, nargs, args, sp, return_method,
|
||||
struct_addr);
|
||||
|
||||
/* Allocate the register save area. */
|
||||
sp -= 16 * 8;
|
||||
|
@ -1401,7 +1401,8 @@ static CORE_ADDR
|
||||
spu_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
CORE_ADDR sp_delta;
|
||||
@ -1418,7 +1419,7 @@ spu_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
/* If STRUCT_RETURN is true, then the struct return address (in
|
||||
STRUCT_ADDR) will consume the first argument-passing register.
|
||||
Both adjust the register count and store that value. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
memset (buf, 0, sizeof buf);
|
||||
store_unsigned_integer (buf, 4, byte_order, SPUADDR_ADDR (struct_addr));
|
||||
|
@ -875,7 +875,8 @@ static CORE_ADDR
|
||||
tic6x_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr,
|
||||
int nargs, struct value **args, CORE_ADDR sp,
|
||||
int struct_return, CORE_ADDR struct_addr)
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
int argreg = 0;
|
||||
int argnum;
|
||||
@ -894,7 +895,7 @@ tic6x_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
/* The caller must pass an argument in A3 containing a destination address
|
||||
for the returned value. The callee returns the object by copying it to
|
||||
the address in A3. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
regcache_cooked_write_unsigned (regcache, 3, struct_addr);
|
||||
|
||||
/* Determine the type of this function. */
|
||||
|
@ -281,7 +281,7 @@ tilegx_push_dummy_call (struct gdbarch *gdbarch,
|
||||
struct regcache *regcache,
|
||||
CORE_ADDR bp_addr, int nargs,
|
||||
struct value **args,
|
||||
CORE_ADDR sp, int struct_return,
|
||||
CORE_ADDR sp, function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -293,7 +293,7 @@ tilegx_push_dummy_call (struct gdbarch *gdbarch,
|
||||
|
||||
/* If struct_return is 1, then the struct return address will
|
||||
consume one argument-passing register. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
regcache_cooked_write_unsigned (regcache, argreg++, struct_addr);
|
||||
|
||||
/* Arguments are passed in R0 - R9, and as soon as an argument
|
||||
|
@ -1013,7 +1013,7 @@ v850_push_dummy_call (struct gdbarch *gdbarch,
|
||||
int nargs,
|
||||
struct value **args,
|
||||
CORE_ADDR sp,
|
||||
int struct_return,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -1039,7 +1039,7 @@ v850_push_dummy_call (struct gdbarch *gdbarch,
|
||||
|
||||
argreg = E_ARG0_REGNUM;
|
||||
/* The struct_return pointer occupies the first parameter register. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
regcache_cooked_write_unsigned (regcache, argreg++, struct_addr);
|
||||
|
||||
/* Now load as many as possible of the first arguments into
|
||||
|
@ -141,7 +141,8 @@ vax_store_arguments (struct regcache *regcache, int nargs,
|
||||
static CORE_ADDR
|
||||
vax_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
|
||||
struct value **args, CORE_ADDR sp, int struct_return,
|
||||
struct value **args, CORE_ADDR sp,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -152,7 +153,7 @@ vax_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
sp = vax_store_arguments (regcache, nargs, args, sp);
|
||||
|
||||
/* Store return value address. */
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
regcache_cooked_write_unsigned (regcache, VAX_R1_REGNUM, struct_addr);
|
||||
|
||||
/* Store return address in the PC slot. */
|
||||
|
@ -226,7 +226,8 @@ xstormy16_push_dummy_call (struct gdbarch *gdbarch,
|
||||
struct regcache *regcache,
|
||||
CORE_ADDR bp_addr, int nargs,
|
||||
struct value **args,
|
||||
CORE_ADDR sp, int struct_return,
|
||||
CORE_ADDR sp,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -236,9 +237,9 @@ xstormy16_push_dummy_call (struct gdbarch *gdbarch,
|
||||
int typelen, slacklen;
|
||||
gdb_byte buf[xstormy16_pc_size];
|
||||
|
||||
/* If struct_return is true, then the struct return address will
|
||||
consume one argument-passing register. */
|
||||
if (struct_return)
|
||||
/* If returning a struct using target ABI method, then the struct return
|
||||
address will consume one argument-passing register. */
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
regcache_cooked_write_unsigned (regcache, E_PTR_RET_REGNUM, struct_addr);
|
||||
argreg++;
|
||||
|
@ -1685,7 +1685,7 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch,
|
||||
int nargs,
|
||||
struct value **args,
|
||||
CORE_ADDR sp,
|
||||
int struct_return,
|
||||
function_call_return_method return_method,
|
||||
CORE_ADDR struct_addr)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
@ -1715,9 +1715,9 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch,
|
||||
if (xtensa_debug_level > 3)
|
||||
{
|
||||
DEBUGINFO ("[xtensa_push_dummy_call] nargs = %d\n", nargs);
|
||||
DEBUGINFO ("[xtensa_push_dummy_call] sp=0x%x, struct_return=%d, "
|
||||
DEBUGINFO ("[xtensa_push_dummy_call] sp=0x%x, return_method=%d, "
|
||||
"struct_addr=0x%x\n",
|
||||
(int) sp, (int) struct_return, (int) struct_addr);
|
||||
(int) sp, (int) return_method, (int) struct_addr);
|
||||
|
||||
for (int i = 0; i < nargs; i++)
|
||||
{
|
||||
@ -1751,7 +1751,7 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch,
|
||||
size = 0;
|
||||
onstack_size = 0;
|
||||
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
size = REGISTER_SIZE;
|
||||
|
||||
for (int i = 0; i < nargs; i++)
|
||||
@ -1828,7 +1828,7 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch,
|
||||
|
||||
/* Second Loop: Load arguments. */
|
||||
|
||||
if (struct_return)
|
||||
if (return_method == return_method_struct)
|
||||
{
|
||||
store_unsigned_integer (buf, REGISTER_SIZE, byte_order, struct_addr);
|
||||
regcache->cooked_write (ARG_1ST (gdbarch), buf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user