From cb95f348184363679c9c918b9d156922c0fe6437 Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Wed, 5 Sep 2012 21:13:56 +0000 Subject: If the ThreadList ShouldStop restarts the target, don't resume it again. llvm-svn: 163245 --- lldb/source/Target/Process.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lldb/source/Target/Process.cpp') diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index b7cda542cbd..2de68183926 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -3283,6 +3283,9 @@ Process::ShouldBroadcastEvent (Event *event_ptr) if (m_thread_list.ShouldStop (event_ptr) == false) { + // ShouldStop may have restarted the target already. If so, don't + // resume it twice. + bool was_restarted = ProcessEventData::GetRestartedFromEvent (event_ptr); switch (m_thread_list.ShouldReportStop (event_ptr)) { case eVoteYes: @@ -3296,7 +3299,8 @@ Process::ShouldBroadcastEvent (Event *event_ptr) if (log) log->Printf ("Process::ShouldBroadcastEvent (%p) Restarting process from state: %s", event_ptr, StateAsCString(state)); - PrivateResume (); + if (!was_restarted) + PrivateResume (); } else { -- cgit v1.2.3