summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectCommands.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-05-02 01:54:02 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-05-02 01:54:02 +0000
commit1c19b74cef3ce49ae081986f0fc6d6a23faa9bca (patch)
treea2f43945d4295a2c9667e846c1402e54f7ebd968 /lldb/source/Commands/CommandObjectCommands.cpp
parent413517ecfe7886a212d65123a74a8f6434998698 (diff)
downloadbcm5719-llvm-1c19b74cef3ce49ae081986f0fc6d6a23faa9bca.tar.gz
bcm5719-llvm-1c19b74cef3ce49ae081986f0fc6d6a23faa9bca.zip
[CommandObjectCommands] Honor stop-command-source-on-error
This patch ensures that we honor the stop-command-source-on-error setting from `command source`. The problem is that we didn't differentiate between the boolean value being true or false, or not being set. For the latter scenario, we should calculate the value in the command interpreter based on the global options. Differential revision: https://reviews.llvm.org/D61406 llvm-svn: 359750
Diffstat (limited to 'lldb/source/Commands/CommandObjectCommands.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index cd0c2f1007d..70251717c23 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -309,8 +309,13 @@ protected:
m_options.m_stop_on_continue.OptionWasSet()) {
// Use user set settings
CommandInterpreterRunOptions options;
- options.SetStopOnContinue(m_options.m_stop_on_continue.GetCurrentValue());
- options.SetStopOnError(m_options.m_stop_on_error.GetCurrentValue());
+
+ if (m_options.m_stop_on_continue.OptionWasSet())
+ options.SetStopOnContinue(
+ m_options.m_stop_on_continue.GetCurrentValue());
+
+ if (m_options.m_stop_on_error.OptionWasSet())
+ options.SetStopOnError(m_options.m_stop_on_error.GetCurrentValue());
// Individual silent setting is override for global command echo settings.
if (m_options.m_silent_run.GetCurrentValue()) {
OpenPOWER on IntegriCloud