mirror of
https://github.com/intel/llvm.git
synced 2026-01-14 11:57:39 +08:00
[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
This commit is contained in:
12
lldb/lit/Commands/command-source.test
Normal file
12
lldb/lit/Commands/command-source.test
Normal file
@@ -0,0 +1,12 @@
|
||||
# Check that stop command source on error.
|
||||
|
||||
# RUN: %lldb -x -b -o "command source -e 1 %s" 2>&1 | FileCheck %s --check-prefix STOP
|
||||
# RUN: %lldb -x -b -o "command source -e 0 %s" 2>&1 | FileCheck %s --check-prefix CONTINUE
|
||||
# RUN: %lldb -x -b -o 'settings set interpreter.stop-command-source-on-error true' -o "command source %s" 2>&1 | FileCheck %s --check-prefix STOP
|
||||
# RUN: %lldb -x -b -o 'settings set interpreter.stop-command-source-on-error false' -o "command source %s" 2>&1 | FileCheck %s --check-prefix CONTINUE
|
||||
|
||||
bogus
|
||||
p 10+1
|
||||
|
||||
# CONTINUE: 11
|
||||
# STOP-NOT: 11
|
||||
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user