[Lldb-commits] [PATCH] D111209: Don't push null ExecutionContext on CommandInterpreter exectx stack
Jason Molenda via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Apr 26 18:32:27 PDT 2022
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa2681c43308c: Don't push null ExecutionContext on CommandInterp exectx stack (authored by jasonmolenda).
Changed prior to commit:
https://reviews.llvm.org/D111209?vs=377452&id=425381#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111209/new/
https://reviews.llvm.org/D111209
Files:
lldb/source/Interpreter/CommandInterpreter.cpp
Index: lldb/source/Interpreter/CommandInterpreter.cpp
===================================================================
--- lldb/source/Interpreter/CommandInterpreter.cpp
+++ lldb/source/Interpreter/CommandInterpreter.cpp
@@ -3050,9 +3050,15 @@
StartHandlingCommand();
- OverrideExecutionContext(m_debugger.GetSelectedExecutionContext());
- auto finalize = llvm::make_scope_exit([this]() {
- RestoreExecutionContext();
+ ExecutionContext exe_ctx = m_debugger.GetSelectedExecutionContext();
+ bool pushed_exe_ctx = false;
+ if (exe_ctx.HasTargetScope()) {
+ OverrideExecutionContext(exe_ctx);
+ pushed_exe_ctx = true;
+ }
+ auto finalize = llvm::make_scope_exit([this, pushed_exe_ctx]() {
+ if (pushed_exe_ctx)
+ RestoreExecutionContext();
});
lldb_private::CommandReturnObject result(m_debugger.GetUseColor());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111209.425381.patch
Type: text/x-patch
Size: 852 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220427/86298b16/attachment.bin>
More information about the lldb-commits
mailing list