diff options
-rw-r--r-- | gdb/ChangeLog | 37 | ||||
-rw-r--r-- | gdb/alpha-tdep.c | 2 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 3 | ||||
-rw-r--r-- | gdb/avr-tdep.c | 2 | ||||
-rw-r--r-- | gdb/config/pa/tm-hppa64.h | 1 | ||||
-rw-r--r-- | gdb/config/sparc/tm-sp64.h | 6 | ||||
-rw-r--r-- | gdb/cris-tdep.c | 4 | ||||
-rw-r--r-- | gdb/d10v-tdep.c | 2 | ||||
-rw-r--r-- | gdb/frv-tdep.c | 2 | ||||
-rw-r--r-- | gdb/gdbarch.c | 45 | ||||
-rw-r--r-- | gdb/gdbarch.h | 15 | ||||
-rwxr-xr-x | gdb/gdbarch.sh | 3 | ||||
-rw-r--r-- | gdb/h8300-tdep.c | 2 | ||||
-rw-r--r-- | gdb/i386-tdep.c | 2 | ||||
-rw-r--r-- | gdb/ia64-tdep.c | 2 | ||||
-rw-r--r-- | gdb/infcmd.c | 72 | ||||
-rw-r--r-- | gdb/inferior.h | 7 | ||||
-rw-r--r-- | gdb/infrun.c | 55 | ||||
-rw-r--r-- | gdb/m68hc11-tdep.c | 2 | ||||
-rw-r--r-- | gdb/m68k-tdep.c | 1 | ||||
-rw-r--r-- | gdb/mcore-tdep.c | 2 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 2 | ||||
-rw-r--r-- | gdb/mn10300-tdep.c | 2 | ||||
-rw-r--r-- | gdb/ns32k-tdep.c | 1 | ||||
-rw-r--r-- | gdb/rs6000-tdep.c | 2 | ||||
-rw-r--r-- | gdb/s390-tdep.c | 2 | ||||
-rw-r--r-- | gdb/sh-tdep.c | 2 | ||||
-rw-r--r-- | gdb/sparc-tdep.c | 3 | ||||
-rw-r--r-- | gdb/v850-tdep.c | 2 | ||||
-rw-r--r-- | gdb/vax-tdep.c | 1 | ||||
-rw-r--r-- | gdb/xstormy16-tdep.c | 2 |
31 files changed, 92 insertions, 194 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c6d9db5058e..4cba99a33db 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,40 @@ +2003-04-01 Andrew Cagney <cagney@redhat.com> + + * gdbarch.sh (CALL_DUMMY_BREAKPOINT_OFFSET): Default to zero. + (CALL_DUMMY_BREAKPOINT_OFFSET_P): Delete. + * gdbarch.h, gdbarch.c: Re-generate. + * config/sparc/tm-sp64.h (CALL_DUMMY_BREAKPOINT_OFFSET_P): Delete. + (CALL_DUMMY_BREAKPOINT_OFFSET_P): Delete. + * config/pa/tm-hppa64.h (CALL_DUMMY_BREAKPOINT_OFFSET_P): Delete. + * inferior.h (CALL_DUMMY_BREAKPOINT_OFFSET_P): Delete. + (CALL_DUMMY_BREAKPOINT_OFFSET): Delete. + * infcmd.c (run_stack_dummy): Simplify assuming + CALL_DUMMY_BREAKPOINT_OFFSET_P. + * infrun.c (handle_inferior_event): Ditto. + * alpha-tdep.c (alpha_gdbarch_init): Do not set + call_dummy_breakpoint_offset or call_dummy_breakpoint_offset_p. + * arm-tdep.c (arm_gdbarch_init): Ditto. + * avr-tdep.c (avr_gdbarch_init): Ditto. + * cris-tdep.c (cris_gdbarch_init): Ditto. + * d10v-tdep.c (d10v_gdbarch_init): Ditto. + * frv-tdep.c (frv_gdbarch_init): Ditto. + * h8300-tdep.c (h8300_gdbarch_init): Ditto. + * i386-tdep.c (i386_gdbarch_init): Ditto. + * ia64-tdep.c (ia64_gdbarch_init): Ditto. + * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto. + * m68k-tdep.c (m68k_gdbarch_init): Ditto. + * mcore-tdep.c (mcore_gdbarch_init): Ditto. + * mips-tdep.c (mips_gdbarch_init): Ditto. + * mn10300-tdep.c (mn10300_gdbarch_init): Ditto. + * ns32k-tdep.c (ns32k_gdbarch_init): Ditto. + * rs6000-tdep.c (rs6000_gdbarch_init): Ditto. + * s390-tdep.c (s390_gdbarch_init): Ditto. + * sh-tdep.c (sh_gdbarch_init): Ditto. + * sparc-tdep.c (sparc_gdbarch_init): Ditto. + * v850-tdep.c (v850_gdbarch_init): Ditto. + * vax-tdep.c (vax_gdbarch_init): Ditto. + * xstormy16-tdep.c (xstormy16_gdbarch_init): Ditto. + 2003-04-01 Daniel Jacobowitz <drow@mvista.com> * symfile.c (symfile_relocate_debug_section): Update call to diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 6944d8a019a..feb332698b4 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -1869,8 +1869,6 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) no need for a dummy on the Alpha. PUSH_ARGUMENTS takes care of all argument handling and bp_call_dummy takes care of stopping the dummy. */ set_gdbarch_call_dummy_address (gdbarch, alpha_call_dummy_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); set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point); set_gdbarch_deprecated_push_dummy_frame (gdbarch, alpha_push_dummy_frame); diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 2f60f30e5bd..ea97f82a8ac 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -2930,9 +2930,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdep->lowest_pc = 0x20; tdep->jb_pc = -1; /* Longjump support not enabled by default. */ - set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); - set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0); - set_gdbarch_call_dummy_words (gdbarch, arm_call_dummy_words); set_gdbarch_sizeof_call_dummy_words (gdbarch, 0); set_gdbarch_call_dummy_start_offset (gdbarch, 0); diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index 6ad20474bea..f6c6ca65af7 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -1169,8 +1169,6 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_call_dummy_address (gdbarch, avr_call_dummy_address); set_gdbarch_call_dummy_start_offset (gdbarch, 0); - set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); - set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0); set_gdbarch_call_dummy_length (gdbarch, 0); set_gdbarch_call_dummy_words (gdbarch, avr_call_dummy_words); diff --git a/gdb/config/pa/tm-hppa64.h b/gdb/config/pa/tm-hppa64.h index 2610caceedd..b2b98e40895 100644 --- a/gdb/config/pa/tm-hppa64.h +++ b/gdb/config/pa/tm-hppa64.h @@ -183,7 +183,6 @@ call_dummy 0xe820f0000fb110d3LL, 0x0001000400151820LL,\ 0xe6c0000008000240LL} -#define CALL_DUMMY_BREAKPOINT_OFFSET_P 1 #define CALL_DUMMY_BREAKPOINT_OFFSET 22 * 4 /* CALL_DUMMY_LENGTH is computed based on the size of a word on the target diff --git a/gdb/config/sparc/tm-sp64.h b/gdb/config/sparc/tm-sp64.h index b4417b80613..0f20c5fc144 100644 --- a/gdb/config/sparc/tm-sp64.h +++ b/gdb/config/sparc/tm-sp64.h @@ -96,8 +96,6 @@ #define CALL_DUMMY_START_OFFSET 0 #undef CALL_DUMMY_BREAKPOINT_OFFSET #define CALL_DUMMY_BREAKPOINT_OFFSET 0 -#undef CALL_DUMMY_BREAKPOINT_OFFSET_P -#define CALL_DUMMY_BREAKPOINT_OFFSET_P 1 #undef CALL_DUMMY_LOCATION #define CALL_DUMMY_LOCATION AT_ENTRY_POINT #undef DEPRECATED_PC_IN_CALL_DUMMY @@ -162,10 +160,6 @@ extern void sparc_at_entry_store_struct_return (CORE_ADDR addr, CORE_ADDR sp); #undef CALL_DUMMY_BREAKPOINT_OFFSET #define CALL_DUMMY_BREAKPOINT_OFFSET (CALL_DUMMY_START_OFFSET + (8 * 4)) -/* Let's GDB know that it can make a call_dummy breakpoint. */ -#undef CALL_DUMMY_BREAKPOINT_OFFSET_P -#define CALL_DUMMY_BREAKPOINT_OFFSET_P 1 - /* Call dummy will be located on the stack. */ #undef CALL_DUMMY_LOCATION #define CALL_DUMMY_LOCATION ON_STACK diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index 4b812e2931a..ae792b38d74 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -4257,10 +4257,6 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Start execution at the beginning of dummy. */ set_gdbarch_call_dummy_start_offset (gdbarch, 0); - set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0); - - /* Set to 1 since call_dummy_breakpoint_offset was defined. */ - set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); /* Read all about dummy frames in blockframe.c. */ set_gdbarch_call_dummy_length (gdbarch, 0); diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c index 1a8410cefcc..23184cecaa3 100644 --- a/gdb/d10v-tdep.c +++ b/gdb/d10v-tdep.c @@ -1673,8 +1673,6 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) } set_gdbarch_call_dummy_length (gdbarch, 0); - 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); set_gdbarch_extract_return_value (gdbarch, d10v_extract_return_value); diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c index 2d42333b152..b5ff5699c1f 100644 --- a/gdb/frv-tdep.c +++ b/gdb/frv-tdep.c @@ -1095,7 +1095,6 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_call_dummy_words (gdbarch, frv_call_dummy_words); set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (frv_call_dummy_words)); - set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); set_gdbarch_deprecated_init_extra_frame_info (gdbarch, frv_init_extra_frame_info); /* Settings that should be unnecessary. */ @@ -1107,7 +1106,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_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 e753331df64..0c896999b61 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -190,7 +190,6 @@ struct gdbarch gdbarch_call_dummy_address_ftype *call_dummy_address; CORE_ADDR call_dummy_start_offset; CORE_ADDR call_dummy_breakpoint_offset; - int call_dummy_breakpoint_offset_p; int call_dummy_length; gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy; LONGEST * call_dummy_words; @@ -357,7 +356,6 @@ struct gdbarch startup_gdbarch = 0, 0, 0, - 0, generic_pc_in_call_dummy, 0, 0, @@ -530,8 +528,6 @@ gdbarch_alloc (const struct gdbarch_info *info, 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; current_gdbarch->call_dummy_length = -1; current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy; current_gdbarch->call_dummy_words = legacy_call_dummy_words; @@ -679,12 +675,6 @@ verify_gdbarch (struct gdbarch *gdbarch) && (gdbarch->call_dummy_start_offset == -1)) fprintf_unfiltered (log, "\n\tcall_dummy_start_offset"); if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) - && (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1)) - fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset"); - if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) - && (gdbarch->call_dummy_breakpoint_offset_p == -1)) - fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset_p"); - if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && (gdbarch->call_dummy_length == -1)) fprintf_unfiltered (log, "\n\tcall_dummy_length"); /* Skip verify of deprecated_pc_in_call_dummy, has predicate */ @@ -946,18 +936,9 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) fprintf_unfiltered (file, "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n", XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET)); - if (CALL_DUMMY_BREAKPOINT_OFFSET_P) - fprintf_unfiltered (file, - "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n", - (long) CALL_DUMMY_BREAKPOINT_OFFSET); -#endif -#ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P - fprintf_unfiltered (file, - "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n", - XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P)); fprintf_unfiltered (file, - "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n", - CALL_DUMMY_BREAKPOINT_OFFSET_P); + "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n", + (long) CALL_DUMMY_BREAKPOINT_OFFSET); #endif #ifdef CALL_DUMMY_LENGTH fprintf_unfiltered (file, @@ -3763,9 +3744,6 @@ CORE_ADDR gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); - if (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1) - internal_error (__FILE__, __LINE__, - "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid"); if (gdbarch_debug >= 2) fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n"); return gdbarch->call_dummy_breakpoint_offset; @@ -3779,25 +3757,6 @@ set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, } int -gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch) -{ - gdb_assert (gdbarch != NULL); - if (gdbarch->call_dummy_breakpoint_offset_p == -1) - internal_error (__FILE__, __LINE__, - "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid"); - if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n"); - return gdbarch->call_dummy_breakpoint_offset_p; -} - -void -set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch, - int call_dummy_breakpoint_offset_p) -{ - gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p; -} - -int gdbarch_call_dummy_length (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index fabe6bebbb3..8974185178e 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1174,22 +1174,9 @@ extern void set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, C #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_BREAKPOINT_OFFSET) #error "Non multi-arch definition of CALL_DUMMY_BREAKPOINT_OFFSET" #endif -#if GDB_MULTI_ARCH -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_BREAKPOINT_OFFSET) +#if !defined (CALL_DUMMY_BREAKPOINT_OFFSET) #define CALL_DUMMY_BREAKPOINT_OFFSET (gdbarch_call_dummy_breakpoint_offset (current_gdbarch)) #endif -#endif - -extern int gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch); -extern void set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch, int call_dummy_breakpoint_offset_p); -#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_BREAKPOINT_OFFSET_P) -#error "Non multi-arch definition of CALL_DUMMY_BREAKPOINT_OFFSET_P" -#endif -#if GDB_MULTI_ARCH -#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_BREAKPOINT_OFFSET_P) -#define CALL_DUMMY_BREAKPOINT_OFFSET_P (gdbarch_call_dummy_breakpoint_offset_p (current_gdbarch)) -#endif -#endif extern int gdbarch_call_dummy_length (struct gdbarch *gdbarch); extern void set_gdbarch_call_dummy_length (struct gdbarch *gdbarch, int call_dummy_length); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 9d4dbd1be7a..bf2ebd0f4bb 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -522,8 +522,7 @@ v:1:DEPRECATED_USE_GENERIC_DUMMY_FRAMES:int:deprecated_use_generic_dummy_frames: v:1:CALL_DUMMY_LOCATION:int:call_dummy_location:::::AT_ENTRY_POINT::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 +v::CALL_DUMMY_BREAKPOINT_OFFSET:CORE_ADDR:call_dummy_breakpoint_offset v:2:CALL_DUMMY_LENGTH:int:call_dummy_length::::0:-1:::::gdbarch->call_dummy_length >= 0 # NOTE: cagney/2002-11-24: This function with predicate has a valid # (callable) initial value. As a consequence, even when the predicate diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index 27330e6c7c8..0d680c9c1a6 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -1157,8 +1157,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_extract_struct_value_address (gdbarch, h8300_extract_struct_value_address); set_gdbarch_use_struct_convention (gdbarch, h8300_use_struct_convention); set_gdbarch_call_dummy_start_offset (gdbarch, 0); - set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0); - set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); set_gdbarch_call_dummy_length (gdbarch, 0); set_gdbarch_call_dummy_words (gdbarch, call_dummy_words); set_gdbarch_sizeof_call_dummy_words (gdbarch, 0); diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 2f00dfb10a9..7253a41364c 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -1560,8 +1560,6 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Call dummy code. */ set_gdbarch_call_dummy_start_offset (gdbarch, 0); - set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0); - set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); set_gdbarch_call_dummy_length (gdbarch, 0); set_gdbarch_call_dummy_words (gdbarch, NULL); set_gdbarch_sizeof_call_dummy_words (gdbarch, 0); diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index 8762e50c28d..7d1d8fa9437 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -2220,7 +2220,6 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_call_dummy_words (gdbarch, ia64_call_dummy_words); set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (ia64_call_dummy_words)); - set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); set_gdbarch_deprecated_init_extra_frame_info (gdbarch, ia64_init_extra_frame_info); set_gdbarch_frame_args_address (gdbarch, ia64_frame_args_address); set_gdbarch_frame_locals_address (gdbarch, ia64_frame_locals_address); @@ -2238,7 +2237,6 @@ ia64_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_breakpoint_offset (gdbarch, 0); set_gdbarch_call_dummy_start_offset (gdbarch, 0); set_gdbarch_decr_pc_after_break (gdbarch, 0); diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 19077b4a54d..38666905706 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -986,50 +986,46 @@ run_stack_dummy (CORE_ADDR addr, struct regcache *buffer) { struct cleanup *old_cleanups = make_cleanup (null_cleanup, 0); int saved_async = 0; + struct breakpoint *bpt; + struct symtab_and_line sal; /* Now proceed, having reached the desired place. */ clear_proceed_status (); - if (CALL_DUMMY_BREAKPOINT_OFFSET_P) + init_sal (&sal); /* initialize to zeroes */ + if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT) { - struct breakpoint *bpt; - struct symtab_and_line sal; - - init_sal (&sal); /* initialize to zeroes */ - if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT) - { - sal.pc = CALL_DUMMY_ADDRESS (); - } - else - { - /* If defined, CALL_DUMMY_BREAKPOINT_OFFSET is where we need - to put a breakpoint instruction. If not, the call dummy - already has the breakpoint instruction in it. - - ADDR IS THE ADDRESS of the call dummy plus the - CALL_DUMMY_START_OFFSET, so we need to subtract the - CALL_DUMMY_START_OFFSET. */ - sal.pc = addr - CALL_DUMMY_START_OFFSET + CALL_DUMMY_BREAKPOINT_OFFSET; - } - sal.section = find_pc_overlay (sal.pc); - - { - /* Set up a frame ID for the dummy frame so we can pass it to - set_momentary_breakpoint. We need to give the breakpoint a - frame ID so that the breakpoint code can correctly - re-identify the dummy breakpoint. */ - struct frame_id frame = frame_id_build (read_fp (), sal.pc); - /* Create a momentary breakpoint at the return address of the - inferior. That way it breaks when it returns. */ - bpt = set_momentary_breakpoint (sal, frame, bp_call_dummy); - bpt->disposition = disp_del; - } - - /* If all error()s out of proceed ended up calling normal_stop (and - perhaps they should; it already does in the special case of error - out of resume()), then we wouldn't need this. */ - make_cleanup (breakpoint_auto_delete_contents, &stop_bpstat); + sal.pc = CALL_DUMMY_ADDRESS (); + } + else + { + /* If defined, CALL_DUMMY_BREAKPOINT_OFFSET is where we need to + put a breakpoint instruction. If not, the call dummy already + has the breakpoint instruction in it. + + ADDR IS THE ADDRESS of the call dummy plus the + CALL_DUMMY_START_OFFSET, so we need to subtract the + CALL_DUMMY_START_OFFSET. */ + sal.pc = addr - CALL_DUMMY_START_OFFSET + CALL_DUMMY_BREAKPOINT_OFFSET; } + sal.section = find_pc_overlay (sal.pc); + + { + /* Set up a frame ID for the dummy frame so we can pass it to + set_momentary_breakpoint. We need to give the breakpoint a + frame ID so that the breakpoint code can correctly re-identify + the dummy breakpoint. */ + struct frame_id frame = frame_id_build (read_fp (), sal.pc); + /* Create a momentary breakpoint at the return address of the + inferior. That way it breaks when it returns. */ + bpt = set_momentary_breakpoint (sal, frame, bp_call_dummy); + bpt->disposition = disp_del; + } + + /* If all error()s out of proceed ended up calling normal_stop (and + perhaps they should; it already does in the special case of error + out of resume()), then we wouldn't need this. */ + make_cleanup (breakpoint_auto_delete_contents, &stop_bpstat); disable_watchpoints_before_interactive_call_start (); proceed_to_finish = 1; /* We want stop_registers, please... */ diff --git a/gdb/inferior.h b/gdb/inferior.h index e2f4881686e..6f2411cb8fd 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -421,13 +421,6 @@ extern int attach_flag; #if !defined (CALL_DUMMY_START_OFFSET) #define CALL_DUMMY_START_OFFSET (internal_error (__FILE__, __LINE__, "CALL_DUMMY_START_OFFSET"), 0) #endif -#if !defined (CALL_DUMMY_BREAKPOINT_OFFSET) -#define CALL_DUMMY_BREAKPOINT_OFFSET_P (0) -#define CALL_DUMMY_BREAKPOINT_OFFSET (internal_error (__FILE__, __LINE__, "CALL_DUMMY_BREAKPOINT_OFFSET"), 0) -#endif -#if !defined CALL_DUMMY_BREAKPOINT_OFFSET_P -#define CALL_DUMMY_BREAKPOINT_OFFSET_P (1) -#endif #if !defined (CALL_DUMMY_LENGTH) #define CALL_DUMMY_LENGTH (internal_error (__FILE__, __LINE__, "CALL_DUMMY_LENGTH"), 0) #endif diff --git a/gdb/infrun.c b/gdb/infrun.c index 7066a52de2b..74f1de1f672 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -1812,26 +1812,30 @@ handle_inferior_event (struct execution_control_state *ecs) stop_print_frame = 1; } + /* NOTE: cagney/2003-03-29: These two checks for a random signal + at one stage in the past included checks for an inferior + function call's call dummy's return breakpoint. The original + comment, that went with the test, read: + + ``End of a stack dummy. Some systems (e.g. Sony news) give + another signal besides SIGTRAP, so check here as well as + above.'' + + If someone ever tries to get get call dummys on a + non-executable stack to work (where the target would stop + with something like a SIGSEG), then those tests might need to + be re-instated. Given, however, that the tests were only + enabled when momentary breakpoints were not being used, I + suspect that it won't be the case. */ + if (stop_signal == TARGET_SIGNAL_TRAP) ecs->random_signal = !(bpstat_explains_signal (stop_bpstat) || trap_expected - || (!CALL_DUMMY_BREAKPOINT_OFFSET_P - && DEPRECATED_PC_IN_CALL_DUMMY (stop_pc, read_sp (), - get_frame_base (get_current_frame ()))) || (step_range_end && step_resume_breakpoint == NULL)); - else { - ecs->random_signal = !(bpstat_explains_signal (stop_bpstat) - /* End of a stack dummy. Some systems (e.g. Sony - news) give another signal besides SIGTRAP, so - check here as well as above. */ - || (!CALL_DUMMY_BREAKPOINT_OFFSET_P - && DEPRECATED_PC_IN_CALL_DUMMY (stop_pc, read_sp (), - get_frame_base - (get_current_frame - ())))); + ecs->random_signal = !bpstat_explains_signal (stop_bpstat); if (!ecs->random_signal) stop_signal = TARGET_SIGNAL_TRAP; } @@ -2173,31 +2177,6 @@ process_event_stop_test: return; } - if (!CALL_DUMMY_BREAKPOINT_OFFSET_P) - { - /* This is the old way of detecting the end of the stack dummy. - An architecture which defines CALL_DUMMY_BREAKPOINT_OFFSET gets - handled above. As soon as we can test it on all of them, all - architectures should define it. */ - - /* If this is the breakpoint at the end of a stack dummy, - just stop silently, unless the user was doing an si/ni, in which - case she'd better know what she's doing. */ - - if (CALL_DUMMY_HAS_COMPLETED (stop_pc, read_sp (), - get_frame_base (get_current_frame ())) - && !step_range_end) - { - stop_print_frame = 0; - stop_stack_dummy = 1; -#ifdef HP_OS_BUG - trap_expected_after_continue = 1; -#endif - stop_stepping (ecs); - return; - } - } - if (step_resume_breakpoint) { /* Having a step-resume breakpoint overrides anything diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index d9c86a9aac2..03c4c417b9b 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -1382,8 +1382,6 @@ m68hc11_gdbarch_init (struct gdbarch_info info, set_gdbarch_call_dummy_length (gdbarch, 0); set_gdbarch_call_dummy_address (gdbarch, m68hc11_call_dummy_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); set_gdbarch_call_dummy_words (gdbarch, m68hc11_call_dummy_words); set_gdbarch_sizeof_call_dummy_words (gdbarch, diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index a913ebe72f3..7a9886b5076 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -1038,7 +1038,6 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0); set_gdbarch_call_dummy_location (gdbarch, ON_STACK); - set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 24); set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack); set_gdbarch_call_dummy_length (gdbarch, 28); diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c index 05b1544673d..785b73d2201 100644 --- a/gdb/mcore-tdep.c +++ b/gdb/mcore-tdep.c @@ -1119,8 +1119,6 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_call_dummy_words (gdbarch, call_dummy_words); set_gdbarch_sizeof_call_dummy_words (gdbarch, 0); set_gdbarch_call_dummy_start_offset (gdbarch, 0); - set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); - set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0); set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); set_gdbarch_saved_pc_after_call (gdbarch, mcore_saved_pc_after_call); set_gdbarch_function_start_offset (gdbarch, 0); diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 85a523fd31f..724fb183170 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -6030,8 +6030,6 @@ mips_gdbarch_init (struct gdbarch_info info, set_gdbarch_deprecated_push_return_address (gdbarch, mips_push_return_address); set_gdbarch_deprecated_pop_frame (gdbarch, mips_pop_frame); set_gdbarch_call_dummy_start_offset (gdbarch, 0); - set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); - set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0); set_gdbarch_call_dummy_length (gdbarch, 0); set_gdbarch_fix_call_dummy (gdbarch, mips_fix_call_dummy); set_gdbarch_call_dummy_words (gdbarch, mips_call_dummy_words); diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index bb5274bbfdd..eb96f7ddde6 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -1185,8 +1185,6 @@ mn10300_gdbarch_init (struct gdbarch_info info, set_gdbarch_read_fp (gdbarch, generic_target_read_sp); /* Calling functions in the inferior from GDB. */ - set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); - set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0); set_gdbarch_call_dummy_words (gdbarch, mn10300_call_dummy_words); set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (mn10300_call_dummy_words)); diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c index f65fff26514..c451ed929d1 100644 --- a/gdb/ns32k-tdep.c +++ b/gdb/ns32k-tdep.c @@ -599,7 +599,6 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof_ns32k_call_dummy_words); set_gdbarch_fix_call_dummy (gdbarch, ns32k_fix_call_dummy); set_gdbarch_call_dummy_start_offset (gdbarch, 3); - set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 15); set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0); set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack); diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 5d873bc394b..458b375b8f0 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -2901,8 +2901,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_char_signed (gdbarch, 0); set_gdbarch_call_dummy_length (gdbarch, 0); - 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); set_gdbarch_fix_call_dummy (gdbarch, rs6000_fix_call_dummy); set_gdbarch_frame_align (gdbarch, rs6000_frame_align); diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index 78ce8a16693..7c2689f6221 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -1866,8 +1866,6 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point); set_gdbarch_deprecated_push_arguments (gdbarch, s390_push_arguments); set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); - set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); - set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0); set_gdbarch_deprecated_push_return_address (gdbarch, s390_push_return_address); set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (s390_call_dummy_words)); diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index 15cbd8ecad9..e118fe3f219 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -4654,8 +4654,6 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT); set_gdbarch_call_dummy_length (gdbarch, 0); - 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); set_gdbarch_call_dummy_words (gdbarch, sh_call_dummy_words); set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (sh_call_dummy_words)); diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index c8748fdbd58..10bf92b96a2 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -3137,7 +3137,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* First set settings that are common for all sparc architectures. */ set_gdbarch_believe_pcc_promotion (gdbarch, 1); set_gdbarch_breakpoint_from_pc (gdbarch, memory_breakpoint_from_pc); - set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); set_gdbarch_decr_pc_after_break (gdbarch, 0); set_gdbarch_double_bit (gdbarch, 8 * TARGET_CHAR_BIT); set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sparc_extract_struct_value_address); @@ -3245,7 +3244,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_call_dummy_words (gdbarch, call_dummy_32); #else set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point); - set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0); set_gdbarch_call_dummy_length (gdbarch, 0); set_gdbarch_call_dummy_words (gdbarch, call_dummy_nil); #endif @@ -3300,7 +3298,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_call_dummy_words (gdbarch, call_dummy_64); #else set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point); - set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0); set_gdbarch_call_dummy_length (gdbarch, 0); set_gdbarch_call_dummy_start_offset (gdbarch, 0); set_gdbarch_call_dummy_words (gdbarch, call_dummy_nil); diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c index 6d969a4640c..77464448a9e 100644 --- a/gdb/v850-tdep.c +++ b/gdb/v850-tdep.c @@ -1277,8 +1277,6 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_extract_struct_value_address (gdbarch, v850_extract_struct_value_address); set_gdbarch_use_struct_convention (gdbarch, v850_use_struct_convention); set_gdbarch_call_dummy_start_offset (gdbarch, 0); - set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0); - set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); set_gdbarch_call_dummy_length (gdbarch, 0); set_gdbarch_call_dummy_words (gdbarch, call_dummy_nil); set_gdbarch_sizeof_call_dummy_words (gdbarch, 0); diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c index 8b16e2e22f8..6ffa7092143 100644 --- a/gdb/vax-tdep.c +++ b/gdb/vax-tdep.c @@ -672,7 +672,6 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof_vax_call_dummy_words); set_gdbarch_fix_call_dummy (gdbarch, vax_fix_call_dummy); set_gdbarch_call_dummy_start_offset (gdbarch, 0); - set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 7); set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0); set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack); diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index 45b008baf13..040fd709761 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -1094,8 +1094,6 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_use_struct_convention (gdbarch, xstormy16_use_struct_convention); set_gdbarch_call_dummy_start_offset (gdbarch, 0); - set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0); - set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1); set_gdbarch_call_dummy_length (gdbarch, 0); set_gdbarch_call_dummy_words (gdbarch, call_dummy_words); set_gdbarch_sizeof_call_dummy_words (gdbarch, 0); |