summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectCommands.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2014-10-11 00:38:27 +0000
committerJim Ingham <jingham@apple.com>2014-10-11 00:38:27 +0000
commit26c7bf9312939025f710bd4c4e0174488da25c7c (patch)
treea4c57cdaba6967e417a24316a9d92f932dbf01f9 /lldb/source/Commands/CommandObjectCommands.cpp
parent41c79d934ba10ba61beef70534ec3fed410f5ab0 (diff)
downloadbcm5719-llvm-26c7bf9312939025f710bd4c4e0174488da25c7c.tar.gz
bcm5719-llvm-26c7bf9312939025f710bd4c4e0174488da25c7c.zip
Rework the way we pass "run multiple command" options to the various API's that
do that (RunCommandInterpreter, HandleCommands, HandleCommandsFromFile) to gather the options into an options class. Also expose that to the SB API's. Change the way the "-o" options to the lldb driver are processed so: 1) They are run synchronously - didn't really make any sense to run the asynchronously. 2) The stop on error 3) "quit" in one of the -o commands will not quit lldb - not the command interpreter that was running the -o commands. I added an entry to the run options to stop-on-crash, but I haven't implemented that yet. llvm-svn: 219553
Diffstat (limited to 'lldb/source/Commands/CommandObjectCommands.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index 836d2a18e35..c7341c27d8f 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -387,14 +387,15 @@ protected:
m_options.m_stop_on_continue.OptionWasSet())
{
// Use user set settings
- LazyBool print_command = m_options.m_silent_run.GetCurrentValue() ? eLazyBoolNo : eLazyBoolYes;
+ CommandInterpreterRunOptions options;
+ options.SetStopOnContinue(m_options.m_stop_on_continue.GetCurrentValue());
+ options.SetStopOnError (m_options.m_stop_on_error.GetCurrentValue());
+ options.SetEchoCommands (m_options.m_silent_run.GetCurrentValue());
+ options.SetPrintResults (m_options.m_silent_run.GetCurrentValue());
+
m_interpreter.HandleCommandsFromFile (cmd_file,
exe_ctx,
- m_options.m_stop_on_continue.GetCurrentValue() ? eLazyBoolYes : eLazyBoolNo, // Stop on continue
- m_options.m_stop_on_error.GetCurrentValue() ? eLazyBoolYes : eLazyBoolNo, // Stop on error
- print_command, // Echo command
- print_command, // Print command output
- eLazyBoolCalculate, // Add to history
+ options,
result);
}
@@ -402,13 +403,10 @@ protected:
{
// No options were set, inherit any settings from nested "command source" commands,
// or set to sane default settings...
+ CommandInterpreterRunOptions options;
m_interpreter.HandleCommandsFromFile (cmd_file,
exe_ctx,
- eLazyBoolCalculate, // Stop on continue
- eLazyBoolCalculate, // Stop on error
- eLazyBoolCalculate, // Echo command
- eLazyBoolCalculate, // Print command output
- eLazyBoolCalculate, // Add to history
+ options,
result);
}
OpenPOWER on IntegriCloud