diff options
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r-- | lldb/source/Target/Process.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 6cbe289ef26..16f56881dcb 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -1621,7 +1621,12 @@ Status Process::Resume() { log->Printf("Process::Resume: -- TrySetRunning failed, not resuming."); return error; } - return PrivateResume(); + Status error = PrivateResume(); + if (!error.Success()) { + // Undo running state change + m_public_run_lock.SetStopped(); + } + return error; } Status Process::ResumeSynchronous(Stream *stream) { @@ -1650,6 +1655,9 @@ Status Process::ResumeSynchronous(Stream *stream) { error.SetErrorStringWithFormat( "process not in stopped state after synchronous resume: %s", StateAsCString(state)); + } else { + // Undo running state change + m_public_run_lock.SetStopped(); } // Undo the hijacking of process events... |