summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2014-07-30 17:38:47 +0000
committerGreg Clayton <gclayton@apple.com>2014-07-30 17:38:47 +0000
commit06357c930cc13f084e20fe1950a2c849aad22e39 (patch)
tree8abf5867fdcbc3795ec772495161d49d769726bd /lldb/source/Target
parenta12e023c8af35d5f9029d7484e180521e50f4a1f (diff)
downloadbcm5719-llvm-06357c930cc13f084e20fe1950a2c849aad22e39.tar.gz
bcm5719-llvm-06357c930cc13f084e20fe1950a2c849aad22e39.zip
(no commit message)
llvm-svn: 214319
Diffstat (limited to 'lldb/source/Target')
-rw-r--r--lldb/source/Target/Process.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 7e09e7e79af..cdbbe8df129 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -3243,6 +3243,7 @@ Process::Halt (bool clear_thread_plans)
EventSP event_sp;
Error error (WillHalt());
+ bool restored_process_events = false;
if (error.Success())
{
@@ -3254,6 +3255,10 @@ Process::Halt (bool clear_thread_plans)
{
if (m_public_state.GetValue() == eStateAttaching)
{
+ // Don't hijack and eat the eStateExited as the code that was doing
+ // the attach will be waiting for this event...
+ RestorePrivateProcessEvents();
+ restored_process_events = true;
SetExitStatus(SIGKILL, "Cancelled async attach.");
Destroy ();
}
@@ -3302,7 +3307,8 @@ Process::Halt (bool clear_thread_plans)
}
}
// Resume our private state thread before we post the event (if any)
- RestorePrivateProcessEvents();
+ if (!restored_process_events)
+ RestorePrivateProcessEvents();
// Post any event we might have consumed. If all goes well, we will have
// stopped the process, intercepted the event and set the interrupted
OpenPOWER on IntegriCloud