summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/Target/Process.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index e844138a8fd..1a4383eb13a 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -1731,15 +1731,17 @@ Process::ResumeSynchronous (Stream *stream)
HijackProcessEvents(listener_sp.get());
Error error = PrivateResume();
-
- StateType state = WaitForProcessToStop (NULL, NULL, true, listener_sp.get(), stream);
+ if (error.Success())
+ {
+ StateType state = WaitForProcessToStop (NULL, NULL, true, listener_sp.get(), stream);
+ const bool must_be_alive = false; // eStateExited is ok, so this must be false
+ if (!StateIsStoppedState(state, must_be_alive))
+ error.SetErrorStringWithFormat("process not in stopped state after synchronous resume: %s", StateAsCString(state));
+ }
// Undo the hijacking of process events...
RestoreProcessEvents();
- if (error.Success() && !StateIsStoppedState(state, false))
- error.SetErrorStringWithFormat("process not in stopped state after synchronous resume: %s", StateAsCString(state));
-
return error;
}
OpenPOWER on IntegriCloud