Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: gdb-patches@sourceware.org
Subject: [PATCH] Don't set random_signal for single step breakpoint
Date: Mon, 26 Sep 2016 11:16:00 -0000	[thread overview]
Message-ID: <1474866074-21720-1-git-send-email-yao.qi@linaro.org> (raw)

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


             reply	other threads:[~2016-09-26  5:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-26 11:16 Yao Qi [this message]
2016-09-26 12:43 ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1474866074-21720-1-git-send-email-yao.qi@linaro.org \
    --to=qiyaoltc@gmail.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox