aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorRandolph Chung <tausq@debian.org>2004-06-07 02:02:55 +0000
committerRandolph Chung <tausq@debian.org>2004-06-07 02:02:55 +0000
commit7d9b040b53ba0e94d46774491ec01dd919af6587 (patch)
tree8cf828c191fbd500bcc7629d3a09ffcba146365d /gdb
parent0985fe3f1c90eee46fed4cafd787d59fbb80fe72 (diff)
downloadgdb-7d9b040b53ba0e94d46774491ec01dd919af6587.zip
gdb-7d9b040b53ba0e94d46774491ec01dd919af6587.tar.gz
gdb-7d9b040b53ba0e94d46774491ec01dd919af6587.tar.bz2
2004-06-06 Randolph Chung <tausq@debian.org>
* gdbarch.sh (PUSH_DUMMY_CALL): Change CORE_ADDR func_addr argument to struct value *function. * gdbarch.c: Regenerate. * gdbarch.h: Likewise. * infcall.c (call_function_by_hand): Pass entire function value to push_dummy_call. * Makefile.in (alpha-tdep.o, frv-tdep.o, ia64-tdep.o, mips-tdep.o) (ppc-sysv-tdep.o, rs6000-tdep.o): Update dependencies. * alpha-tdep.c (alpha_push_dummy_call): Update call signature. * amd64-tdep.c (amd64_push_dummy_call): Likewise. * arm-tdep.c (arm_push_dummy_call): Likewise. * avr-tdep.c (avr_push_dummy_call): Likewise. * cris-tdep.c (cris_push_dummy_call): Likewise. * d10v-tdep.c (d10v_push_dummy_call): Likewise. * frv-tdep.c (frv_push_dummy_call): Likewise. * h8300-tdep.c (h8300_push_dummy_call): Likewise. * hppa-tdep.c (hppa32_push_dummy_call) (hppa64_push_dummy_call): Likewise. * i386-tdep.c (i386_push_dummy_call): Likewise. * ia64-tdep.c (ia64_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. * m88k-tdep.c (m88k_push_dummy_call): Likewise. * mips-tdep.c (mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call) (mips_o32_push_dummy_call, mips_o64_push_dummy_call): Likewise. * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call) (ppc64_sysv_abi_push_dummy_call): Likewise. * ppc-tdep.h (ppc_sysv_abi_push_dummy_call) (ppc64_sysv_abi_push_dummy_call): Likewise. * rs6000-tdep.c (rs6000_push_dummy_call): Likewise. * s390-tdep.c (s390_push_dummy_call): Likewise. * sh-tdep.c (sh_push_dummy_call_fpu) (sh_push_dummy_call_nofpu): Likewise. * sparc-tdep.c (sparc32_push_dummy_call): Likewise. * sparc64-tdep.c (sparc64_push_dummy_call): Likewise. * vax-tdep.c (vax_push_dummy_call): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog41
-rw-r--r--gdb/Makefile.in12
-rw-r--r--gdb/alpha-tdep.c4
-rw-r--r--gdb/amd64-tdep.c2
-rw-r--r--gdb/arm-tdep.c2
-rw-r--r--gdb/avr-tdep.c2
-rw-r--r--gdb/cris-tdep.c2
-rw-r--r--gdb/d10v-tdep.c2
-rw-r--r--gdb/frv-tdep.c4
-rw-r--r--gdb/gdbarch.c4
-rw-r--r--gdb/gdbarch.h4
-rwxr-xr-xgdb/gdbarch.sh2
-rw-r--r--gdb/h8300-tdep.c2
-rw-r--r--gdb/hppa-tdep.c4
-rw-r--r--gdb/i386-tdep.c2
-rw-r--r--gdb/ia64-tdep.c4
-rw-r--r--gdb/infcall.c5
-rw-r--r--gdb/m32r-tdep.c2
-rw-r--r--gdb/m68hc11-tdep.c2
-rw-r--r--gdb/m68k-tdep.c2
-rw-r--r--gdb/m88k-tdep.c2
-rw-r--r--gdb/mips-tdep.c13
-rw-r--r--gdb/ppc-sysv-tdep.c6
-rw-r--r--gdb/ppc-tdep.h4
-rw-r--r--gdb/rs6000-tdep.c4
-rw-r--r--gdb/s390-tdep.c2
-rw-r--r--gdb/sh-tdep.c4
-rw-r--r--gdb/sparc-tdep.c2
-rw-r--r--gdb/sparc64-tdep.c2
-rw-r--r--gdb/vax-tdep.c2
30 files changed, 101 insertions, 44 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6ca06c5..0924853 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,44 @@
+2004-06-06 Randolph Chung <tausq@debian.org>
+
+ * gdbarch.sh (PUSH_DUMMY_CALL): Change CORE_ADDR func_addr argument
+ to struct value *function.
+ * gdbarch.c: Regenerate.
+ * gdbarch.h: Likewise.
+ * infcall.c (call_function_by_hand): Pass entire function value
+ to push_dummy_call.
+
+ * Makefile.in (alpha-tdep.o, frv-tdep.o, ia64-tdep.o, mips-tdep.o)
+ (ppc-sysv-tdep.o, rs6000-tdep.o): Update dependencies.
+ * alpha-tdep.c (alpha_push_dummy_call): Update call signature.
+ * amd64-tdep.c (amd64_push_dummy_call): Likewise.
+ * arm-tdep.c (arm_push_dummy_call): Likewise.
+ * avr-tdep.c (avr_push_dummy_call): Likewise.
+ * cris-tdep.c (cris_push_dummy_call): Likewise.
+ * d10v-tdep.c (d10v_push_dummy_call): Likewise.
+ * frv-tdep.c (frv_push_dummy_call): Likewise.
+ * h8300-tdep.c (h8300_push_dummy_call): Likewise.
+ * hppa-tdep.c (hppa32_push_dummy_call)
+ (hppa64_push_dummy_call): Likewise.
+ * i386-tdep.c (i386_push_dummy_call): Likewise.
+ * ia64-tdep.c (ia64_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.
+ * m88k-tdep.c (m88k_push_dummy_call): Likewise.
+ * mips-tdep.c (mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call)
+ (mips_o32_push_dummy_call, mips_o64_push_dummy_call): Likewise.
+ * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call)
+ (ppc64_sysv_abi_push_dummy_call): Likewise.
+ * ppc-tdep.h (ppc_sysv_abi_push_dummy_call)
+ (ppc64_sysv_abi_push_dummy_call): Likewise.
+ * rs6000-tdep.c (rs6000_push_dummy_call): Likewise.
+ * s390-tdep.c (s390_push_dummy_call): Likewise.
+ * sh-tdep.c (sh_push_dummy_call_fpu)
+ (sh_push_dummy_call_nofpu): Likewise.
+ * sparc-tdep.c (sparc32_push_dummy_call): Likewise.
+ * sparc64-tdep.c (sparc64_push_dummy_call): Likewise.
+ * vax-tdep.c (vax_push_dummy_call): Likewise.
+
2004-06-04 Jim Blandy <jimb@redhat.com>
* ppc-linux-nat.c (fetch_register): Don't forget to pass the
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index ba25d03..5a303c2 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1532,7 +1532,7 @@ alpha-tdep.o: alpha-tdep.c $(defs_h) $(doublest_h) $(frame_h) \
$(symtab_h) $(value_h) $(gdbcmd_h) $(gdbcore_h) $(dis_asm_h) \
$(symfile_h) $(objfiles_h) $(gdb_string_h) $(linespec_h) \
$(regcache_h) $(reggroups_h) $(arch_utils_h) $(osabi_h) $(block_h) \
- $(elf_bfd_h) $(alpha_tdep_h)
+ $(elf_bfd_h) $(infcall_h) $(alpha_tdep_h)
amd64bsd-nat.o: amd64bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
$(gdb_assert_h) $(amd64_tdep_h) $(amd64_nat_h)
amd64fbsd-nat.o: amd64fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
@@ -1791,7 +1791,7 @@ frv-tdep.o: frv-tdep.c $(defs_h) $(gdb_string_h) $(inferior_h) $(gdbcore_h) \
$(arch_utils_h) $(regcache_h) $(frame_h) $(frame_unwind_h) \
$(frame_base_h) $(trad_frame_h) $(dis_asm_h) $(gdb_assert_h) \
$(sim_regno_h) $(gdb_sim_frv_h) $(opcodes_frv_desc_h) $(symtab_h) \
- $(elf_bfd_h) $(elf_frv_h) $(osabi_h) $(frv_tdep_h)
+ $(elf_bfd_h) $(elf_frv_h) $(osabi_h) $(infcall_h) $(frv_tdep_h)
f-typeprint.o: f-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
$(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
$(f_lang_h) $(gdb_string_h)
@@ -1921,7 +1921,7 @@ ia64-tdep.o: ia64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \
$(arch_utils_h) $(floatformat_h) $(regcache_h) $(reggroups_h) \
$(frame_h) $(frame_base_h) $(frame_unwind_h) $(doublest_h) \
$(value_h) $(gdb_assert_h) $(objfiles_h) $(elf_common_h) \
- $(elf_bfd_h) $(elf_h) $(dis_asm_h) $(ia64_tdep_h) \
+ $(elf_bfd_h) $(elf_h) $(dis_asm_h) $(infcall_h) $(ia64_tdep_h) \
$(libunwind_frame_h) $(libunwind_ia64_h)
infcall.o: infcall.c $(defs_h) $(breakpoint_h) $(target_h) $(regcache_h) \
$(inferior_h) $(gdb_assert_h) $(block_h) $(gdbcore_h) $(language_h) \
@@ -2096,7 +2096,7 @@ mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(gdb_assert_h) \
$(target_h) $(arch_utils_h) $(regcache_h) $(osabi_h) $(mips_tdep_h) \
$(block_h) $(reggroups_h) $(opcode_mips_h) $(elf_mips_h) \
$(elf_bfd_h) $(symcat_h) $(sim_regno_h) $(dis_asm_h) \
- $(frame_unwind_h) $(frame_base_h) $(trad_frame_h)
+ $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) $(infcall_h)
mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
$(regcache_h) $(gregset_h)
mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
@@ -2182,7 +2182,7 @@ ppcobsd-tdep.o: ppcobsd-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h) \
$(ppc_tdep_h) $(ppcobsd_tdep_h) $(solib_svr4_h)
ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
$(regcache_h) $(value_h) $(gdb_string_h) $(gdb_assert_h) \
- $(ppc_tdep_h) $(target_h) $(objfiles_h)
+ $(ppc_tdep_h) $(target_h) $(objfiles_h) $(infcall_h)
printcmd.o: printcmd.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \
$(gdbtypes_h) $(value_h) $(language_h) $(expression_h) $(gdbcore_h) \
$(gdbcmd_h) $(target_h) $(breakpoint_h) $(demangle_h) $(valprint_h) \
@@ -2282,7 +2282,7 @@ rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
$(osabi_h) $(libbfd_h) $(coff_internal_h) $(libcoff_h) \
$(coff_xcoff_h) $(libxcoff_h) $(elf_bfd_h) $(solib_svr4_h) \
$(ppc_tdep_h) $(gdb_assert_h) $(dis_asm_h) $(trad_frame_h) \
- $(frame_unwind_h) $(frame_base_h)
+ $(frame_unwind_h) $(frame_base_h) $(infcall_h)
s390-nat.o: s390-nat.c $(defs_h) $(tm_h) $(regcache_h) $(inferior_h) \
$(s390_tdep_h)
s390-tdep.o: s390-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) $(inferior_h) \
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 24f1b04..f0ab8c0 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -40,6 +40,7 @@
#include "arch-utils.h"
#include "osabi.h"
#include "block.h"
+#include "infcall.h"
#include "elf-bfd.h"
@@ -263,7 +264,7 @@ alpha_value_to_register (struct frame_info *frame, int regnum,
structure to be returned is passed as a hidden first argument. */
static CORE_ADDR
-alpha_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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)
@@ -281,6 +282,7 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
struct alpha_arg *m_arg;
char arg_reg_buffer[ALPHA_REGISTER_SIZE * ALPHA_NUM_ARG_REGS];
int required_arg_regs;
+ CORE_ADDR func_addr = find_function_addr (function, NULL);
/* The ABI places the address of the called function in T12. */
regcache_cooked_write_signed (regcache, ALPHA_T12_REGNUM, func_addr);
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index 4a64bf3..90a4e11 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -646,7 +646,7 @@ amd64_push_arguments (struct regcache *regcache, int nargs,
}
static CORE_ADDR
-amd64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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)
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 6606ad1..9eccbb9 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -1210,7 +1210,7 @@ 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, CORE_ADDR func_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,
CORE_ADDR struct_addr)
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index e7faef1..2b5db68 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -1146,7 +1146,7 @@ pop_stack_item (struct stack_item *si)
registers R0 to R2. */
static CORE_ADDR
-avr_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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)
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 23fe1d5..4708f54 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -511,7 +511,7 @@ cris_push_dummy_code (struct gdbarch *gdbarch,
}
static CORE_ADDR
-cris_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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)
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index 72211cd..8bb2aa5 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -953,7 +953,7 @@ d10v_push_dummy_code (struct gdbarch *gdbarch,
}
static CORE_ADDR
-d10v_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+d10v_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)
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index b1b5cd0..634a8b6 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -37,6 +37,7 @@
#include "elf-bfd.h"
#include "elf/frv.h"
#include "osabi.h"
+#include "infcall.h"
#include "frv-tdep.h"
extern void _initialize_frv_tdep (void);
@@ -1118,7 +1119,7 @@ frv_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr,
}
static CORE_ADDR
-frv_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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)
@@ -1135,6 +1136,7 @@ frv_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
int stack_space;
int stack_offset;
enum frv_abi abi = frv_abi (gdbarch);
+ CORE_ADDR func_addr = find_function_addr (function, NULL);
#if 0
printf("Push %d args at sp = %x, struct_return=%d (%x)\n",
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index df0a03e..fe857cd 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -3073,13 +3073,13 @@ gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
}
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)
+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)
{
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, func_addr, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
+ return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
}
void
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 3efa2ec..b59ace6 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -721,8 +721,8 @@ extern void set_gdbarch_deprecated_target_read_fp (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, 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);
+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);
extern void set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call);
/* PUSH_DUMMY_CALL is a direct replacement for DEPRECATED_PUSH_ARGUMENTS. */
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 12aac5b..181f782 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -514,7 +514,7 @@ F::DEPRECATED_TARGET_READ_FP:CORE_ADDR:deprecated_target_read_fp:void
# See gdbint.texinfo. See infcall.c. New, all singing all dancing,
# replacement for DEPRECATED_PUSH_ARGUMENTS.
-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
+M::PUSH_DUMMY_CALL: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
# PUSH_DUMMY_CALL is a direct replacement for DEPRECATED_PUSH_ARGUMENTS.
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
# Implement PUSH_RETURN_ADDRESS, and then merge in
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index c6f55f8..b0c21ec 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -632,7 +632,7 @@ h8300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
to begin with. */
static CORE_ADDR
-h8300_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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)
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index d219429..4af061f 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -709,7 +709,7 @@ hppa64_register_name (int i)
arguments into their proper slots. */
CORE_ADDR
-hppa32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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)
@@ -870,7 +870,7 @@ hppa32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
to the callee, so we do that too. */
CORE_ADDR
-hppa64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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)
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index a3c5afe..2008acb 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -1119,7 +1119,7 @@ i386_get_longjmp_target (CORE_ADDR *pc)
static CORE_ADDR
-i386_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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,
CORE_ADDR struct_addr)
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index 04e4f1b..d53aec2 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -37,6 +37,7 @@
#include "elf/common.h" /* for DT_PLTGOT value */
#include "elf-bfd.h"
#include "dis-asm.h"
+#include "infcall.h"
#include "ia64-tdep.h"
#ifdef HAVE_LIBUNWIND_IA64_H
@@ -3023,7 +3024,7 @@ ia64_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
}
static CORE_ADDR
-ia64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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)
@@ -3035,6 +3036,7 @@ ia64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
int nslots, rseslots, memslots, slotnum, nfuncargs;
int floatreg;
CORE_ADDR bsp, cfm, pfs, new_bsp, funcdescaddr, pc, global_pointer;
+ CORE_ADDR func_addr = find_function_addr (function, NULL);
nslots = 0;
nfuncargs = 0;
diff --git a/gdb/infcall.c b/gdb/infcall.c
index 0f0ffc9..7f0a118 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -205,7 +205,8 @@ find_function_addr (struct value *function, struct type **retval_type)
else
error ("Invalid data type for function to be called.");
- *retval_type = value_type;
+ if (retval_type != NULL)
+ *retval_type = value_type;
return funaddr + FUNCTION_START_OFFSET;
}
@@ -660,7 +661,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, funaddr, current_regcache,
+ sp = gdbarch_push_dummy_call (current_gdbarch, function, current_regcache,
bp_addr, nargs, args, sp, struct_return,
struct_addr);
else if (DEPRECATED_PUSH_ARGUMENTS_P ())
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
index 26e4b4a..32feafc 100644
--- a/gdb/m32r-tdep.c
+++ b/gdb/m32r-tdep.c
@@ -686,7 +686,7 @@ m32r_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
static CORE_ADDR
-m32r_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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,
CORE_ADDR struct_addr)
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index e7e1a1a..80480a6 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -1172,7 +1172,7 @@ m68hc11_stack_align (CORE_ADDR addr)
}
static CORE_ADDR
-m68hc11_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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)
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 5973f0b..0f81d39 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -405,7 +405,7 @@ m68k_svr4_return_value (struct gdbarch *gdbarch, struct type *type,
static CORE_ADDR
-m68k_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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,
CORE_ADDR struct_addr)
diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c
index 215f1db..572a66d 100644
--- a/gdb/m88k-tdep.c
+++ b/gdb/m88k-tdep.c
@@ -344,7 +344,7 @@ m88k_store_arguments (struct regcache *regcache, int nargs,
}
static CORE_ADDR
-m88k_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+m88k_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)
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 54f79f8..c6deb80 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -53,6 +53,7 @@
#include "frame-unwind.h"
#include "frame-base.h"
#include "trad-frame.h"
+#include "infcall.h"
static const struct objfile_data *mips_pdr_data;
@@ -2767,7 +2768,7 @@ mips_eabi_reg_struct_has_addr (int gcc_p, struct type *type)
}
static CORE_ADDR
-mips_eabi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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)
@@ -2778,6 +2779,7 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
int len = 0;
int stack_offset = 0;
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ CORE_ADDR func_addr = find_function_addr (function, NULL);
/* For shared libraries, "t9" needs to point at the function
address. */
@@ -3085,7 +3087,7 @@ mips_eabi_store_return_value (struct type *valtype, char *valbuf)
/* N32/N64 ABI stuff. */
static CORE_ADDR
-mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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)
@@ -3096,6 +3098,7 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
int len = 0;
int stack_offset = 0;
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ CORE_ADDR func_addr = find_function_addr (function, NULL);
/* For shared libraries, "t9" needs to point at the function
address. */
@@ -3423,7 +3426,7 @@ mips_n32n64_return_value (struct gdbarch *gdbarch,
/* O32 ABI stuff. */
static CORE_ADDR
-mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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)
@@ -3434,6 +3437,7 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
int len = 0;
int stack_offset = 0;
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ CORE_ADDR func_addr = find_function_addr (function, NULL);
/* For shared libraries, "t9" needs to point at the function
address. */
@@ -3875,7 +3879,7 @@ mips_o32_return_value (struct gdbarch *gdbarch, struct type *type,
ABI. */
static CORE_ADDR
-mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+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,
@@ -3887,6 +3891,7 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
int len = 0;
int stack_offset = 0;
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ CORE_ADDR func_addr = find_function_addr (function, NULL);
/* For shared libraries, "t9" needs to point at the function
address. */
diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c
index 7da5ce2..cdf2855 100644
--- a/gdb/ppc-sysv-tdep.c
+++ b/gdb/ppc-sysv-tdep.c
@@ -30,6 +30,7 @@
#include "ppc-tdep.h"
#include "target.h"
#include "objfiles.h"
+#include "infcall.h"
/* Pass the arguments in either registers, or in the stack. Using the
ppc sysv ABI, the first eight words of the argument list (that might
@@ -43,7 +44,7 @@
starting from r4. */
CORE_ADDR
-ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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)
@@ -540,11 +541,12 @@ ppc_sysv_abi_broken_return_value (struct gdbarch *gdbarch,
greatly simplifies the logic. */
CORE_ADDR
-ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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 func_addr = find_function_addr (function, NULL);
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
/* By this stage in the proceedings, SP has been decremented by "red
zone size" + "struct return size". Fetch the stack-pointer from
diff --git a/gdb/ppc-tdep.h b/gdb/ppc-tdep.h
index ec2e7ae..14d3444 100644
--- a/gdb/ppc-tdep.h
+++ b/gdb/ppc-tdep.h
@@ -41,14 +41,14 @@ enum return_value_convention ppc_sysv_abi_broken_return_value (struct gdbarch *g
void *readbuf,
const void *writebuf);
CORE_ADDR ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
- CORE_ADDR func_addr,
+ 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,
- CORE_ADDR func_addr,
+ struct value *function,
struct regcache *regcache,
CORE_ADDR bp_addr, int nargs,
struct value **args, CORE_ADDR sp,
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index c7dfae5..9cd744b 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -36,6 +36,7 @@
#include "value.h"
#include "parser-defs.h"
#include "osabi.h"
+#include "infcall.h"
#include "libbfd.h" /* for bfd_default_set_arch_mach */
#include "coff/internal.h" /* for libcoff.h */
@@ -1271,7 +1272,7 @@ rs6000_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr)
starting from r4. */
static CORE_ADDR
-rs6000_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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)
@@ -1284,6 +1285,7 @@ rs6000_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
char tmp_buffer[50];
int f_argno = 0; /* current floating point argno */
int wordsize = gdbarch_tdep (current_gdbarch)->wordsize;
+ CORE_ADDR func_addr = find_function_addr (function, NULL);
struct value *arg = 0;
struct type *type;
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 3bad26b..fbaf567 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -2565,7 +2565,7 @@ alignment_of (struct type *type)
Our caller has taken care of any type promotions needed to satisfy
prototypes or the old K&R argument-passing rules. */
static CORE_ADDR
-s390_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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)
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index d8b29c9..866a351 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -885,7 +885,7 @@ sh_treat_as_flt_p (struct type *type)
static CORE_ADDR
sh_push_dummy_call_fpu (struct gdbarch *gdbarch,
- CORE_ADDR func_addr,
+ struct value *function,
struct regcache *regcache,
CORE_ADDR bp_addr, int nargs,
struct value **args,
@@ -997,7 +997,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch,
static CORE_ADDR
sh_push_dummy_call_nofpu (struct gdbarch *gdbarch,
- CORE_ADDR func_addr,
+ struct value *function,
struct regcache *regcache,
CORE_ADDR bp_addr,
int nargs, struct value **args,
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 893648c..7fbd9de 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -450,7 +450,7 @@ sparc32_store_arguments (struct regcache *regcache, int nargs,
}
static CORE_ADDR
-sparc32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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)
diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c
index 4376508..4903077 100644
--- a/gdb/sparc64-tdep.c
+++ b/gdb/sparc64-tdep.c
@@ -949,7 +949,7 @@ sparc64_store_arguments (struct regcache *regcache, int nargs,
}
static CORE_ADDR
-sparc64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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)
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index e5b7cb8..e07f91f 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -144,7 +144,7 @@ vax_store_arguments (struct regcache *regcache, int nargs,
}
static CORE_ADDR
-vax_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_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,
CORE_ADDR struct_addr)