diff options
author | Tatyana Krasnukha <tatyana@synopsys.com> | 2020-12-18 16:36:15 +0300 |
---|---|---|
committer | Tatyana Krasnukha <tatyana@synopsys.com> | 2021-02-08 15:09:09 +0300 |
commit | 36de94cf54efbad967a9a0fa41329a8b59bc35c4 (patch) | |
tree | 247b40f741e8a9e43cffda9ab5b0ac595a0b130e /lldb/source/Commands/CommandObjectExpression.cpp | |
parent | a39bcbca92e169baeb8b2c55dff90141ddd53888 (diff) | |
download | llvm-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/CommandObjectExpression.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectExpression.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
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(); |