diff options
author | Jim Ingham <jingham@apple.com> | 2012-12-13 22:24:15 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2012-12-13 22:24:15 +0000 |
commit | c7078c228a3f64e47325161879ad7920a8d064d7 (patch) | |
tree | d5ddb50a9755d7b4fcf7e3c2da13738c26dacb11 /lldb/source/Target/Process.cpp | |
parent | bf4b7be68ee9da3cc43fedee101457140d3330cd (diff) | |
download | bcm5719-llvm-c7078c228a3f64e47325161879ad7920a8d064d7.tar.gz bcm5719-llvm-c7078c228a3f64e47325161879ad7920a8d064d7.zip |
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>
llvm-svn: 170153
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r-- | lldb/source/Target/Process.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 5394923af39..38622f0aa3e 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -3792,7 +3792,11 @@ Process::ProcessEventData::DoOnRemoval (Event *event_ptr) 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 @@ Process::ProcessEventData::DoOnRemoval (Event *event_ptr) 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; } } |