aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectCommands.cpp
diff options
context:
space:
mode:
authorTatyana Krasnukha <tatyana@synopsys.com>2020-12-18 16:36:15 +0300
committerTatyana Krasnukha <tatyana@synopsys.com>2021-02-08 15:09:09 +0300
commit36de94cf54efbad967a9a0fa41329a8b59bc35c4 (patch)
tree247b40f741e8a9e43cffda9ab5b0ac595a0b130e /lldb/source/Commands/CommandObjectCommands.cpp
parenta39bcbca92e169baeb8b2c55dff90141ddd53888 (diff)
downloadllvm-36de94cf54efbad967a9a0fa41329a8b59bc35c4.zip
llvm-36de94cf54efbad967a9a0fa41329a8b59bc35c4.tar.gz
llvm-36de94cf54efbad967a9a0fa41329a8b59bc35c4.tar.bz2
Reland "[lldb] Make CommandInterpreter's execution context the same as debugger's one"
Diffstat (limited to 'lldb/source/Commands/CommandObjectCommands.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index 3b3cdde..74b16a6 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -134,15 +134,12 @@ protected:
FileSpec cmd_file(command[0].ref());
FileSystem::Instance().Resolve(cmd_file);
- ExecutionContext *exe_ctx = nullptr; // Just use the default context.
+ CommandInterpreterRunOptions options;
// If any options were set, then use them
if (m_options.m_stop_on_error.OptionWasSet() ||
m_options.m_silent_run.OptionWasSet() ||
m_options.m_stop_on_continue.OptionWasSet()) {
- // Use user set settings
- CommandInterpreterRunOptions options;
-
if (m_options.m_stop_on_continue.OptionWasSet())
options.SetStopOnContinue(
m_options.m_stop_on_continue.GetCurrentValue());
@@ -159,14 +156,9 @@ protected:
options.SetEchoCommands(m_interpreter.GetEchoCommands());
options.SetEchoCommentCommands(m_interpreter.GetEchoCommentCommands());
}
-
- m_interpreter.HandleCommandsFromFile(cmd_file, exe_ctx, options, result);
- } else {
- // 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, options, result);
}
+
+ m_interpreter.HandleCommandsFromFile(cmd_file, options, result);
return result.Succeeded();
}