This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[pushed] infrun.c:resume: currently_stepping after clearing stepped_breakpoint
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 1 Apr 2015 15:40:10 +0100
- Subject: [pushed] infrun.c:resume: currently_stepping after clearing stepped_breakpoint
- Authentication-results: sourceware.org; auth=none
My all-stop-on-top-of-non-stop series manages to shows regressions due
to this latent bug. currently_stepping returns true if
stepped_breakpoint is set. Obviously we should clear
it before checking currently_stepping, not after.
Tested on x86_64 Fedora 20.
gdb/ChangeLog:
2015-04-01 Pedro Alves <palves@redhat.com>
* infrun.c (resume): Check currently_stepping after clearing
stepped_breakpoint, not before.
---
gdb/ChangeLog | 5 +++++
gdb/infrun.c | 5 ++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7f9cc43..b85b437 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2015-04-01 Pedro Alves <palves@redhat.com>
+ * infrun.c (resume): Check currently_stepping after clearing
+ stepped_breakpoint, not before.
+
+2015-04-01 Pedro Alves <palves@redhat.com>
+
* infrun.c (print_target_wait_results): Print all the ptid
elements.
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 4b38fce..f5faa0a 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2084,12 +2084,15 @@ resume (enum gdb_signal sig)
This can decay from a step to a continue, if e.g., we need to
implement single-stepping with breakpoints (software
single-step). */
- int step = currently_stepping (tp);
+ int step;
tp->stepped_breakpoint = 0;
QUIT;
+ /* Depends on stepped_breakpoint. */
+ step = currently_stepping (tp);
+
if (current_inferior ()->waiting_for_vfork_done)
{
/* Don't try to single-step a vfork parent that is waiting for
--
1.9.3