diff options
author | Jim Ingham <jingham@apple.com> | 2011-01-29 01:57:31 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2011-01-29 01:57:31 +0000 |
commit | 2a5fdd4729f922969f694f30096ea46880303a21 (patch) | |
tree | 5028abf8e8f6fd4e6bfa10170b0e3a2dcfe157ee /lldb/source/Target/Process.cpp | |
parent | bb3a283b3e8bc2cc4157ef1b73b7d5e6cda40775 (diff) | |
download | bcm5719-llvm-2a5fdd4729f922969f694f30096ea46880303a21.tar.gz bcm5719-llvm-2a5fdd4729f922969f694f30096ea46880303a21.zip |
Handle the case where the "NextEventAction" wants to kill us on some event other than eStateExited.
llvm-svn: 124521
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r-- | lldb/source/Target/Process.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 9f5a63ae9ce..9b0194951c1 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -2153,8 +2153,17 @@ Process::HandlePrivateEvent (EventSP &event_sp) case NextEventAction::eEventActionRetry: break; case NextEventAction::eEventActionExit: - // Handle Exiting Here... - + // Handle Exiting Here. If we already got an exited event, + // we should just propagate it. Otherwise, swallow this event, + // and set our state to exit so the next event will kill us. + if (new_state != eStateExited) + { + // FIXME: should cons up an exited event, and discard this one. + SetExitStatus(0, m_next_event_action->GetExitString()); + SetNextEventAction(NULL); + return; + } + SetNextEventAction(NULL); break; } } |