aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-04-01 14:38:51 +0000
committerAndrew Cagney <cagney@redhat.com>2003-04-01 14:38:51 +0000
commit73dd234f2ffe66ac8e500fb37244c5c65c74caa6 (patch)
tree8733f4b83e6714907da5dfe4360de9ed6b43c48a /gdb/infcmd.c
parent97606a13b0bcb57387f42415c8fb3952de1c4d19 (diff)
downloadgdb-73dd234f2ffe66ac8e500fb37244c5c65c74caa6.zip
gdb-73dd234f2ffe66ac8e500fb37244c5c65c74caa6.tar.gz
gdb-73dd234f2ffe66ac8e500fb37244c5c65c74caa6.tar.bz2
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.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c72
1 files changed, 34 insertions, 38 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 19077b4..3866690 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... */