summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
authorAdrian McCarthy <amccarth@google.com>2017-09-13 22:57:11 +0000
committerAdrian McCarthy <amccarth@google.com>2017-09-13 22:57:11 +0000
commit5fc4fa54db8b736607f2fdb6939c7ede14486af5 (patch)
tree633498434613a0b423f2f65128038409649e3182 /lldb/source/Target/Process.cpp
parentc113801489ddc71d6b4011bd411c68d5b58f265c (diff)
downloadbcm5719-llvm-5fc4fa54db8b736607f2fdb6939c7ede14486af5.tar.gz
bcm5719-llvm-5fc4fa54db8b736607f2fdb6939c7ede14486af5.zip
Fix for bug 34532 - A few rough corners related to post-mortem debugging (core/minidump)
The main change is to avoid setting the process state as running when debugging core/minidumps (details in the bug). Also included a few small, related fixes around how the errors propagate in this case. patch by lemo Bug: https://bugs.llvm.org/show_bug.cgi?id=34532 Differential Revision: https://reviews.llvm.org/D37651 llvm-svn: 313210
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp10
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...
OpenPOWER on IntegriCloud