aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp14
-rw-r--r--lldb/source/Commands/CommandObjectExpression.cpp14
-rw-r--r--lldb/source/Commands/CommandObjectProcess.cpp1
-rw-r--r--lldb/source/Commands/CommandObjectRegexCommand.cpp4
-rw-r--r--lldb/source/Commands/CommandObjectSettings.cpp3
-rw-r--r--lldb/source/Commands/CommandObjectWatchpointCommand.cpp2
6 files changed, 11 insertions, 27 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();
}
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 58eaa3f..c7866f9 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -292,18 +292,12 @@ void CommandObjectExpression::HandleCompletion(CompletionRequest &request) {
options.SetAutoApplyFixIts(false);
options.SetGenerateDebugInfo(false);
- // We need a valid execution context with a frame pointer for this
- // completion, so if we don't have one we should try to make a valid
- // execution context.
- if (m_interpreter.GetExecutionContext().GetFramePtr() == nullptr)
- m_interpreter.UpdateExecutionContext(nullptr);
-
- // This didn't work, so let's get out before we start doing things that
- // expect a valid frame pointer.
- if (m_interpreter.GetExecutionContext().GetFramePtr() == nullptr)
+ ExecutionContext exe_ctx(m_interpreter.GetExecutionContext());
+
+ // Get out before we start doing things that expect a valid frame pointer.
+ if (exe_ctx.GetFramePtr() == nullptr)
return;
- ExecutionContext exe_ctx(m_interpreter.GetExecutionContext());
Target *exe_target = exe_ctx.GetTargetPtr();
Target &target = exe_target ? *exe_target : GetDummyTarget();
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp
index 35835f6..c21c499 100644
--- a/lldb/source/Commands/CommandObjectProcess.cpp
+++ b/lldb/source/Commands/CommandObjectProcess.cpp
@@ -381,7 +381,6 @@ protected:
return false;
}
- m_interpreter.UpdateExecutionContext(nullptr);
StreamString stream;
const auto error = target->Attach(m_options.attach_info, &stream);
if (error.Success()) {
diff --git a/lldb/source/Commands/CommandObjectRegexCommand.cpp b/lldb/source/Commands/CommandObjectRegexCommand.cpp
index 1bf29d3..dcd05a12 100644
--- a/lldb/source/Commands/CommandObjectRegexCommand.cpp
+++ b/lldb/source/Commands/CommandObjectRegexCommand.cpp
@@ -53,8 +53,8 @@ bool CommandObjectRegexCommand::DoExecute(llvm::StringRef command,
// Pass in true for "no context switching". The command that called us
// should have set up the context appropriately, we shouldn't have to
// redo that.
- return m_interpreter.HandleCommand(
- new_command.c_str(), eLazyBoolCalculate, result, nullptr, true, true);
+ return m_interpreter.HandleCommand(new_command.c_str(),
+ eLazyBoolCalculate, result);
}
}
result.SetStatus(eReturnStatusFailed);
diff --git a/lldb/source/Commands/CommandObjectSettings.cpp b/lldb/source/Commands/CommandObjectSettings.cpp
index 87e0352..d869377 100644
--- a/lldb/source/Commands/CommandObjectSettings.cpp
+++ b/lldb/source/Commands/CommandObjectSettings.cpp
@@ -469,14 +469,13 @@ protected:
bool DoExecute(Args &command, CommandReturnObject &result) override {
FileSpec file(m_options.m_filename);
FileSystem::Instance().Resolve(file);
- ExecutionContext clean_ctx;
CommandInterpreterRunOptions options;
options.SetAddToHistory(false);
options.SetEchoCommands(false);
options.SetPrintResults(true);
options.SetPrintErrors(true);
options.SetStopOnError(false);
- m_interpreter.HandleCommandsFromFile(file, &clean_ctx, options, result);
+ m_interpreter.HandleCommandsFromFile(file, options, result);
return result.Succeeded();
}
diff --git a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
index fe3052a..3df17a0 100644
--- a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
@@ -301,7 +301,7 @@ are no syntax errors may indicate that a function was declared but never called.
options.SetPrintErrors(true);
options.SetAddToHistory(false);
- debugger.GetCommandInterpreter().HandleCommands(commands, &exe_ctx,
+ debugger.GetCommandInterpreter().HandleCommands(commands, exe_ctx,
options, result);
result.GetImmediateOutputStream()->Flush();
result.GetImmediateErrorStream()->Flush();