diff options
author | Greg Clayton <gclayton@apple.com> | 2014-10-21 01:00:42 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2014-10-21 01:00:42 +0000 |
commit | dc6224e0a3ce2b097f0a631de9ae1960f175dfe6 (patch) | |
tree | 7364aee6be1c2bddee56bcabeab0ca59de7fb2c5 /lldb/source/Target/StopInfo.cpp | |
parent | f16a66973c04f56eb5068fe407ad75a3e09ee00a (diff) | |
download | bcm5719-llvm-dc6224e0a3ce2b097f0a631de9ae1960f175dfe6.tar.gz bcm5719-llvm-dc6224e0a3ce2b097f0a631de9ae1960f175dfe6.zip |
Make the "synchronous" mode actually work without race conditions.
There were many issues with synchronous mode that we discovered when started to try and add a "batch" mode. There was a race condition where the event handling thread might consume events when in sync mode and other times the Process::WaitForProcessToStop() would consume them. This also led to places where the Process IO handler might or might not get popped when it needed to be.
llvm-svn: 220254
Diffstat (limited to 'lldb/source/Target/StopInfo.cpp')
-rw-r--r-- | lldb/source/Target/StopInfo.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lldb/source/Target/StopInfo.cpp b/lldb/source/Target/StopInfo.cpp index b7cf11cfb7d..99b1ac1f3e3 100644 --- a/lldb/source/Target/StopInfo.cpp +++ b/lldb/source/Target/StopInfo.cpp @@ -690,14 +690,13 @@ protected: assert (stored_stop_info_sp.get() == this); ThreadPlanSP new_plan_sp(thread_sp->QueueThreadPlanForStepSingleInstruction(false, // step-over - false, // abort_other_plans - true)); // stop_other_threads + false, // abort_other_plans + true)); // stop_other_threads new_plan_sp->SetIsMasterPlan (true); new_plan_sp->SetOkayToDiscard (false); new_plan_sp->SetPrivate (true); process->GetThreadList().SetSelectedThreadByID (thread_sp->GetID()); - process->Resume (); - process->WaitForProcessToStop (NULL); + process->ResumeSynchronous(NULL); process->GetThreadList().SetSelectedThreadByID (thread_sp->GetID()); thread_sp->SetStopInfo(stored_stop_info_sp); } |