aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-12-15 20:08:02 +0000
committerDaniel Jacobowitz <drow@false.org>2002-12-15 20:08:02 +0000
commit675bf4cbc866316506d5aff06471c3580ba289fa (patch)
tree581d8ff99db17c038a4c5803cfcbc47e73e33c2b /gdb
parent81e5617914246146055f6a235f52c6332f74d7f6 (diff)
downloadgdb-675bf4cbc866316506d5aff06471c3580ba289fa.zip
gdb-675bf4cbc866316506d5aff06471c3580ba289fa.tar.gz
gdb-675bf4cbc866316506d5aff06471c3580ba289fa.tar.bz2
* infrun.c (handle_inferior_event): Assume that catchpoints
are not affected by DECR_PC_AFTER_BREAK.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/infrun.c60
2 files changed, 32 insertions, 33 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 390ce96..994556d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2002-12-15 Daniel Jacobowitz <drow@mvista.com>
+ * infrun.c (handle_inferior_event): Assume that catchpoints
+ are not affected by DECR_PC_AFTER_BREAK.
+
+2002-12-15 Daniel Jacobowitz <drow@mvista.com>
+
* target.c (update_current_target): Don't inherit DONT_USE.
* target.h (struct target_ops): Remove DONT_USE.
(target_next): Remove macro.
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 664351e..2aaab67 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1335,17 +1335,15 @@ handle_inferior_event (struct execution_control_state *ecs)
stop_pc = read_pc_pid (ecs->ptid);
ecs->saved_inferior_ptid = inferior_ptid;
inferior_ptid = ecs->ptid;
- /* The second argument of bpstat_stop_status is meant to help
- distinguish between a breakpoint trap and a singlestep trap.
- This is only important on targets where DECR_PC_AFTER_BREAK
- is non-zero. The prev_pc test is meant to distinguish between
- singlestepping a trap instruction, and singlestepping thru a
- jump to the instruction following a trap instruction. */
-
- stop_bpstat = bpstat_stop_status (&stop_pc,
- currently_stepping (ecs) &&
- prev_pc !=
- stop_pc - DECR_PC_AFTER_BREAK);
+
+ /* Assume that catchpoints are not really software breakpoints. If
+ some future target implements them using software breakpoints then
+ that target is responsible for fudging DECR_PC_AFTER_BREAK. Thus
+ we pass 1 for the NOT_A_SW_BREAKPOINT argument, so that
+ bpstat_stop_status will not decrement the PC. */
+
+ stop_bpstat = bpstat_stop_status (&stop_pc, 1);
+
ecs->random_signal = !bpstat_explains_signal (stop_bpstat);
inferior_ptid = ecs->saved_inferior_ptid;
goto process_event_stop_test;
@@ -1386,17 +1384,15 @@ handle_inferior_event (struct execution_control_state *ecs)
}
stop_pc = read_pc ();
- /* The second argument of bpstat_stop_status is meant to help
- distinguish between a breakpoint trap and a singlestep trap.
- This is only important on targets where DECR_PC_AFTER_BREAK
- is non-zero. The prev_pc test is meant to distinguish between
- singlestepping a trap instruction, and singlestepping thru a
- jump to the instruction following a trap instruction. */
-
- stop_bpstat = bpstat_stop_status (&stop_pc,
- currently_stepping (ecs) &&
- prev_pc !=
- stop_pc - DECR_PC_AFTER_BREAK);
+
+ /* Assume that catchpoints are not really software breakpoints. If
+ some future target implements them using software breakpoints then
+ that target is responsible for fudging DECR_PC_AFTER_BREAK. Thus
+ we pass 1 for the NOT_A_SW_BREAKPOINT argument, so that
+ bpstat_stop_status will not decrement the PC. */
+
+ stop_bpstat = bpstat_stop_status (&stop_pc, 1);
+
ecs->random_signal = !bpstat_explains_signal (stop_bpstat);
goto process_event_stop_test;
@@ -1435,17 +1431,15 @@ handle_inferior_event (struct execution_control_state *ecs)
stop_pc = read_pc_pid (ecs->ptid);
ecs->saved_inferior_ptid = inferior_ptid;
inferior_ptid = ecs->ptid;
- /* The second argument of bpstat_stop_status is meant to help
- distinguish between a breakpoint trap and a singlestep trap.
- This is only important on targets where DECR_PC_AFTER_BREAK
- is non-zero. The prev_pc test is meant to distinguish between
- singlestepping a trap instruction, and singlestepping thru a
- jump to the instruction following a trap instruction. */
-
- stop_bpstat = bpstat_stop_status (&stop_pc,
- currently_stepping (ecs) &&
- prev_pc !=
- stop_pc - DECR_PC_AFTER_BREAK);
+
+ /* Assume that catchpoints are not really software breakpoints. If
+ some future target implements them using software breakpoints then
+ that target is responsible for fudging DECR_PC_AFTER_BREAK. Thus
+ we pass 1 for the NOT_A_SW_BREAKPOINT argument, so that
+ bpstat_stop_status will not decrement the PC. */
+
+ stop_bpstat = bpstat_stop_status (&stop_pc, 1);
+
ecs->random_signal = !bpstat_explains_signal (stop_bpstat);
inferior_ptid = ecs->saved_inferior_ptid;
goto process_event_stop_test;