This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Don't set random_signal for single step breakpoint
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 26 Sep 2016 06:01:14 +0100
- Subject: [PATCH] Don't set random_signal for single step breakpoint
- Authentication-results: sourceware.org; auth=none
I happen to see the code, and find the comments are out of date,
because single-step breakpoint is not transparent to the breakpoint
module. If one thread hits another thread's single-step breakpoint,
random_signal should be zero. IOW, if random_signal is one, the
thread shouldn't hit any single-step breakpoints. This patch is to
remove this piece of code.
gdb:
2016-09-26 Yao Qi <yao.qi@linaro.org>
* infrun.c (handle_signal_stop): Don't set random_signal
by ecs->hit_singlestep_breakpoint.
---
gdb/infrun.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 648e2b6..b133f04 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -6056,12 +6056,6 @@ handle_signal_stop (struct execution_control_state *ecs)
random_signal = !(ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP
&& currently_stepping (ecs->event_thread));
- /* Perhaps the thread hit a single-step breakpoint of _another_
- thread. Single-step breakpoints are transparent to the
- breakpoints module. */
- if (random_signal)
- random_signal = !ecs->hit_singlestep_breakpoint;
-
/* No? Perhaps we got a moribund watchpoint. */
if (random_signal)
random_signal = !stopped_by_watchpoint;
--
1.9.1