[Lldb-commits] [lldb] r170153 - /lldb/trunk/source/Target/Process.cpp
Jim Ingham
jingham at apple.com
Thu Dec 13 14:24:15 PST 2012
Author: jingham
Date: Thu Dec 13 16:24:15 2012
New Revision: 170153
URL: http://llvm.org/viewvc/llvm-project?rev=170153&view=rev
Log:
Fixed a thinko in the handling of the case where more than one thread had stopped with real stop reasons at the same time.
Should be that if any of the threads wants to stop, we should stop. The opposite was what was actually happening
<rdar://problem/12869725>
Modified:
lldb/trunk/source/Target/Process.cpp
Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=170153&r1=170152&r2=170153&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Thu Dec 13 16:24:15 2012
@@ -3792,7 +3792,11 @@
for (idx = 0; idx < num_threads; ++idx)
thread_index_array[idx] = curr_thread_list.GetThreadAtIndex(idx)->GetIndexID();
- bool still_should_stop = true;
+ // Use this to track whether we should continue from here. We will only continue the target running if
+ // no thread says we should stop. Of course if some thread's PerformAction actually sets the target running,
+ // then it doesn't matter what the other threads say...
+
+ bool still_should_stop = false;
for (idx = 0; idx < num_threads; ++idx)
{
@@ -3833,10 +3837,10 @@
SetRestarted (true);
break;
}
- else if (!stop_info_sp->ShouldStop(event_ptr))
- {
- still_should_stop = false;
- }
+
+ bool this_thread_wants_to_stop = stop_info_sp->ShouldStop(event_ptr);
+ if (still_should_stop == false)
+ still_should_stop = this_thread_wants_to_stop;
}
}
More information about the lldb-commits
mailing list