From e9a2674e1d04f307ae4ffb7e4571c9878f63ff66 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Mon, 31 Mar 2003 21:58:23 +0000 Subject: [PATCH] 2003-03-31 Andrew Cagney * gdbarch.sh: Include "symfile.h". (CALL_DUMMY_ADDRESS): Default to entry_point_address. * gdbarch.h, gdbarch.c: Re-generate. * inferior.h (CALL_DUMMY_ADDRESS): Delete macro. * xstormy16-tdep.c (xstormy16_gdbarch_init): Do not set call_dummy_address, the default is at entry_point_address. * v850-tdep.c (v850_gdbarch_init): Ditto. * sparc-tdep.c (sparc_gdbarch_init): Ditto. * sh-tdep.c (sh_gdbarch_init): Ditto. * s390-tdep.c (s390_gdbarch_init): Ditto. * rs6000-tdep.c (rs6000_gdbarch_init): Ditto. * mn10300-tdep.c (mn10300_gdbarch_init): Ditto. * mcore-tdep.c (mcore_gdbarch_init): Ditto. * ia64-tdep.c (ia64_gdbarch_init): Ditto. * i386-tdep.c (i386_gdbarch_init): Ditto. * h8300-tdep.c (h8300_gdbarch_init): Ditto. * frv-tdep.c (frv_gdbarch_init): Ditto. * d10v-tdep.c (d10v_gdbarch_init): Ditto. * cris-tdep.c (cris_gdbarch_init): Ditto. * arm-tdep.c (arm_gdbarch_init): Ditto. --- gdb/ChangeLog | 23 +++++++++++++++++++++++ gdb/arm-tdep.c | 2 -- gdb/cris-tdep.c | 3 --- gdb/d10v-tdep.c | 1 - gdb/frv-tdep.c | 1 - gdb/gdbarch.c | 6 +++--- gdb/gdbarch.h | 6 ++++++ gdb/gdbarch.sh | 4 +++- gdb/h8300-tdep.c | 1 - gdb/i386-tdep.c | 1 - gdb/ia64-tdep.c | 1 - gdb/inferior.h | 3 --- gdb/mcore-tdep.c | 1 - gdb/mn10300-tdep.c | 1 - gdb/rs6000-tdep.c | 1 - gdb/s390-tdep.c | 1 - gdb/sh-tdep.c | 1 - gdb/sparc-tdep.c | 2 -- gdb/v850-tdep.c | 1 - gdb/xstormy16-tdep.c | 1 - 20 files changed, 35 insertions(+), 26 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c7bca878ece..ed13cfdc22e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,26 @@ +2003-03-31 Andrew Cagney + + * gdbarch.sh: Include "symfile.h". + (CALL_DUMMY_ADDRESS): Default to entry_point_address. + * gdbarch.h, gdbarch.c: Re-generate. + * inferior.h (CALL_DUMMY_ADDRESS): Delete macro. + * xstormy16-tdep.c (xstormy16_gdbarch_init): Do not set + call_dummy_address, the default is at entry_point_address. + * v850-tdep.c (v850_gdbarch_init): Ditto. + * sparc-tdep.c (sparc_gdbarch_init): Ditto. + * sh-tdep.c (sh_gdbarch_init): Ditto. + * s390-tdep.c (s390_gdbarch_init): Ditto. + * rs6000-tdep.c (rs6000_gdbarch_init): Ditto. + * mn10300-tdep.c (mn10300_gdbarch_init): Ditto. + * mcore-tdep.c (mcore_gdbarch_init): Ditto. + * ia64-tdep.c (ia64_gdbarch_init): Ditto. + * i386-tdep.c (i386_gdbarch_init): Ditto. + * h8300-tdep.c (h8300_gdbarch_init): Ditto. + * frv-tdep.c (frv_gdbarch_init): Ditto. + * d10v-tdep.c (d10v_gdbarch_init): Ditto. + * cris-tdep.c (cris_gdbarch_init): Ditto. + * arm-tdep.c (arm_gdbarch_init): Ditto. + 2003-03-31 Andrew Cagney * gdbarch.sh (CALL_DUMMY_P): Delete. diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 6102a69b40c..73113cf5c41 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -2940,8 +2940,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy); - set_gdbarch_call_dummy_address (gdbarch, entry_point_address); - set_gdbarch_push_dummy_call (gdbarch, arm_push_dummy_call); /* Frame handling. */ diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index ca79b4781dc..d0b1fc9121a 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -4255,9 +4255,6 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Use generic dummy frames. */ - /* Where to execute the call in the memory segments. */ - set_gdbarch_call_dummy_address (gdbarch, entry_point_address); - /* Start execution at the beginning of dummy. */ set_gdbarch_call_dummy_start_offset (gdbarch, 0); set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0); diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c index 405df3aba00..e438b96d39d 100644 --- a/gdb/d10v-tdep.c +++ b/gdb/d10v-tdep.c @@ -1673,7 +1673,6 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) } set_gdbarch_call_dummy_length (gdbarch, 0); - set_gdbarch_call_dummy_address (gdbarch, entry_point_address); set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0); set_gdbarch_call_dummy_start_offset (gdbarch, 0); diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c index 6a464192c59..7b40865ef88 100644 --- a/gdb/frv-tdep.c +++ b/gdb/frv-tdep.c @@ -1107,7 +1107,6 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_read_sp (gdbarch, generic_target_read_sp); set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp); - set_gdbarch_call_dummy_address (gdbarch, entry_point_address); set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0); set_gdbarch_call_dummy_start_offset (gdbarch, 0); set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point); diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 1caf81efbde..c12b9c7639d 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -66,6 +66,7 @@ #include "gdb-events.h" #include "reggroups.h" #include "osabi.h" +#include "symfile.h" /* For entry_point_address. */ /* Static function declarations */ @@ -527,6 +528,7 @@ gdbarch_alloc (const struct gdbarch_info *info, current_gdbarch->cannot_store_register = cannot_register_not; current_gdbarch->deprecated_use_generic_dummy_frames = 1; current_gdbarch->call_dummy_location = AT_ENTRY_POINT; + current_gdbarch->call_dummy_address = entry_point_address; current_gdbarch->call_dummy_start_offset = -1; current_gdbarch->call_dummy_breakpoint_offset = -1; current_gdbarch->call_dummy_breakpoint_offset_p = -1; @@ -672,9 +674,7 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of get_longjmp_target, has predicate */ /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */ /* Skip verify of call_dummy_location, invalid_p == 0 */ - if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) - && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0)) - fprintf_unfiltered (log, "\n\tcall_dummy_address"); + /* Skip verify of call_dummy_address, invalid_p == 0 */ if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && (gdbarch->call_dummy_start_offset == -1)) fprintf_unfiltered (log, "\n\tcall_dummy_start_offset"); diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 9cbedf792c6..261a8492d18 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -39,6 +39,7 @@ #if !GDB_MULTI_ARCH /* Pull in function declarations refered to, indirectly, via macros. */ #include "inferior.h" /* For unsigned_address_to_pointer(). */ +#include "symfile.h" /* For entry_point_address(). */ #endif struct frame_info; @@ -1140,6 +1141,11 @@ extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_d #endif #endif +/* Default (function) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_ADDRESS) +#define CALL_DUMMY_ADDRESS() (entry_point_address ()) +#endif + typedef CORE_ADDR (gdbarch_call_dummy_address_ftype) (void); extern CORE_ADDR gdbarch_call_dummy_address (struct gdbarch *gdbarch); extern void set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, gdbarch_call_dummy_address_ftype *call_dummy_address); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 8adfb13485d..3d47f565a00 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -520,7 +520,7 @@ F:2:GET_LONGJMP_TARGET:int:get_longjmp_target:CORE_ADDR *pc:pc::0:0 # avoids any potential problems with moving beyond multi-arch partial. v:1:DEPRECATED_USE_GENERIC_DUMMY_FRAMES:int:deprecated_use_generic_dummy_frames:::::1::0 v:1:CALL_DUMMY_LOCATION:int:call_dummy_location:::::AT_ENTRY_POINT::0 -f:2:CALL_DUMMY_ADDRESS:CORE_ADDR:call_dummy_address:void:::0:0::gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0 +f::CALL_DUMMY_ADDRESS:CORE_ADDR:call_dummy_address:void::::entry_point_address::0 v:2:CALL_DUMMY_START_OFFSET:CORE_ADDR:call_dummy_start_offset::::0:-1:::0x%08lx v:2:CALL_DUMMY_BREAKPOINT_OFFSET:CORE_ADDR:call_dummy_breakpoint_offset::::0:-1::gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1:0x%08lx::CALL_DUMMY_BREAKPOINT_OFFSET_P v:1:CALL_DUMMY_BREAKPOINT_OFFSET_P:int:call_dummy_breakpoint_offset_p::::0:-1 @@ -805,6 +805,7 @@ cat <