This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 5/9] Switch back to stepped thread: clear step-over info
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 26 Sep 2014 01:39:38 +0100
- Subject: [PATCH 5/9] Switch back to stepped thread: clear step-over info
- Authentication-results: sourceware.org; auth=none
- References: <1411691982-10744-1-git-send-email-palves at redhat dot com>
This path misses clearing the step-over info, because it bypasses
keep_going.
The testsuite caught this while I was working on making software
single-step breakpoints per-thread. Unfortunately, I didn't keep the
logs around and I don't recall ATM which test tripped on this.
gdb/
2014-09-25 Pedro Alves <palves@redhat.com>
* infrun.c (switch_back_to_stepped_thread) <expect thread advanced
also>: Clear step-over info.
---
gdb/infrun.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 94a58b2..e0df9bf 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -5275,6 +5275,13 @@ switch_back_to_stepped_thread (struct execution_control_state *ecs)
fprintf_unfiltered (gdb_stdlog,
"infrun: expected thread advanced also\n");
+ /* Clear this before trying to insert the sss
+ breakpoint, in case we were previously trying to step
+ over this location in another thread, otherwise the
+ breakpoint ends up _not_ installed. It's what
+ keep_going would do too, if we called it. */
+ clear_step_over_info ();
+
insert_single_step_breakpoint (get_frame_arch (frame),
get_frame_address_space (frame),
stop_pc);
--
1.9.3