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
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
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits