[Lldb-commits] [PATCH] D61406: [CommandObjectCommands] Honor stop-command-source-on-error
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed May 1 18:53:43 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rLLDB359750: [CommandObjectCommands] Honor stop-command-source-on-error (authored by JDevlieghere, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D61406?vs=197662&id=197689#toc
Repository:
rLLDB LLDB
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61406/new/
https://reviews.llvm.org/D61406
Files:
lit/Commands/command-source.test
source/Commands/CommandObjectCommands.cpp
Index: source/Commands/CommandObjectCommands.cpp
===================================================================
--- source/Commands/CommandObjectCommands.cpp
+++ source/Commands/CommandObjectCommands.cpp
@@ -309,8 +309,13 @@
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()) {
Index: lit/Commands/command-source.test
===================================================================
--- lit/Commands/command-source.test
+++ lit/Commands/command-source.test
@@ -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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61406.197689.patch
Type: text/x-patch
Size: 1724 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190502/bbfb1bea/attachment.bin>
More information about the lldb-commits
mailing list