Check that RestartedFromEvent flag before processing the state changed event.
authorHafiz Abid Qadeer <hafiz_abid@mentor.com>
Mon, 16 Mar 2015 11:47:24 +0000 (11:47 +0000)
committerHafiz Abid Qadeer <hafiz_abid@mentor.com>
Mon, 16 Mar 2015 11:47:24 +0000 (11:47 +0000)
Not checking for this flags caused lldb-mi to issue stop notification when target
has started running again. It also tried to get stack when target was running and
this caused randon failure.

Approved in http://lists.cs.uiuc.edu/pipermail/lldb-dev/2015-March/006953.html

llvm-svn: 232370

lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp

index 69746f1..edefc44 100644 (file)
@@ -800,6 +800,8 @@ CMICmnLLDBDebuggerHandleEvents::HandleEventSBCommandInterpreter(const lldb::SBEv
 bool
 CMICmnLLDBDebuggerHandleEvents::HandleProcessEventBroadcastBitStateChanged(const lldb::SBEvent &vEvent)
 {
+    if (lldb::SBProcess::GetRestartedFromEvent (vEvent))
+        return true;
     bool bOk = ChkForStateChanges();
     bOk = bOk && GetProcessStdout();
     bOk = bOk && GetProcessStderr();