This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 5/9] Switch back to stepped thread: clear step-over info


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]