diff options
author | Michael Snyder <msnyder@vmware.com> | 2001-06-28 21:34:03 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2001-06-28 21:34:03 +0000 |
commit | 80b34fabd3043272bd132a1479fcbd81d761b16a (patch) | |
tree | f63f9bea8a7a0bbfdcf141483f191afd3d41e8c2 /gdb/breakpoint.c | |
parent | 1456ad8e67b1dd1b2e46fbc6e926bd312330ea24 (diff) | |
download | gdb-80b34fabd3043272bd132a1479fcbd81d761b16a.zip gdb-80b34fabd3043272bd132a1479fcbd81d761b16a.tar.gz gdb-80b34fabd3043272bd132a1479fcbd81d761b16a.tar.bz2 |
2001-06-28 Michael Snyder <msnyder@redhat.com>
* infrun.c (handle_inferior_event): Replace prev_pc test in all
calls to bpstat_stop_status (removed in 1999-09-24). This test
helps distinguish stepping over a breakpoint trap from stepping
thru a jump to the instruction after a breakpoint trap.
(handle_inferior_event): Don't bother writing the PC if
DECR_PC_AFTER_BREAK is zero (optimization).
* breakpoint.c (bpstat_stop_status): Add comment explaining the
purpose and usage of the "not_a_breakpoint" argument in computing
the breakpoint address.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 20f7251..cee302e 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -2409,7 +2409,12 @@ bpstat_stop_status (CORE_ADDR *pc, int not_a_breakpoint) "Error evaluating expression for watchpoint %d\n"; char message[sizeof (message1) + 30 /* slop */ ]; - /* Get the address where the breakpoint would have been. */ + /* Get the address where the breakpoint would have been. + The "not_a_breakpoint" argument is meant to distinguish + between a breakpoint trap event and a trace/singlestep + trap event. For a trace/singlestep trap event, we would + not want to subtract DECR_PC_AFTER_BREAK from the PC. */ + bp_addr = *pc - (not_a_breakpoint && !SOFTWARE_SINGLE_STEP_P () ? 0 : DECR_PC_AFTER_BREAK); |