From 1c19b74cef3ce49ae081986f0fc6d6a23faa9bca Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 2 May 2019 01:54:02 +0000 Subject: [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 --- lldb/source/Commands/CommandObjectCommands.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lldb/source/Commands/CommandObjectCommands.cpp') diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp index cd0c2f1..7025171 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()) { -- cgit v1.1