summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2016-01-08 00:20:47 +0000
committerJim Ingham <jingham@apple.com>2016-01-08 00:20:47 +0000
commit962260c852c945d529ac32dced2c456b6f58097f (patch)
tree17a0701cf8db9fcf8b896811e530898378d1ea0f /lldb/source/Interpreter
parent3a7c2f6f44627ab325a0af706760e53d3f491c76 (diff)
downloadbcm5719-llvm-962260c852c945d529ac32dced2c456b6f58097f.tar.gz
bcm5719-llvm-962260c852c945d529ac32dced2c456b6f58097f.zip
Fix a glitch in the Driver's batch mode when used with "attach".
Batch mode is supposed to stop execution and return control to the user when an exceptional stop occurs (crash, signal or instrumentation). But attach always stops with a SIGSTOP on OSX (maybe on Linux too?) which would short circuit the rest of the commands given. This change allows a command result object to indicate that it expected to leave the process stopped with an exceptional stop reason, and it is okay for batch mode to keep going. <rdar://problem/22243143> llvm-svn: 257120
Diffstat (limited to 'lldb/source/Interpreter')
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp5
-rw-r--r--lldb/source/Interpreter/CommandReturnObject.cpp3
2 files changed, 6 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index b7cc607e807..fd88f0d6b4b 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -3038,7 +3038,10 @@ CommandInterpreter::IOHandlerInputComplete (IOHandler &io_handler, std::string &
for (ThreadSP thread_sp : process_sp->GetThreadList().Threads())
{
StopReason reason = thread_sp->GetStopReason();
- if (reason == eStopReasonSignal || reason == eStopReasonException || reason == eStopReasonInstrumentation)
+ if ((reason == eStopReasonSignal
+ || reason == eStopReasonException
+ || reason == eStopReasonInstrumentation)
+ && !result.GetAbnormalStopWasExpected())
{
should_stop = true;
break;
diff --git a/lldb/source/Interpreter/CommandReturnObject.cpp b/lldb/source/Interpreter/CommandReturnObject.cpp
index 1b541873506..b083c7f69f1 100644
--- a/lldb/source/Interpreter/CommandReturnObject.cpp
+++ b/lldb/source/Interpreter/CommandReturnObject.cpp
@@ -47,7 +47,8 @@ CommandReturnObject::CommandReturnObject () :
m_err_stream (),
m_status (eReturnStatusStarted),
m_did_change_process_state (false),
- m_interactive (true)
+ m_interactive (true),
+ m_abnormal_stop_was_expected(false)
{
}
OpenPOWER on IntegriCloud