[Lldb-commits] [lldb] 59a39c2 - [LLDB][REPL] Destroy the repl instances correctly
walter erquinigo via lldb-commits
lldb-commits at lists.llvm.org
Tue Apr 25 13:09:15 PDT 2023
Author: walter erquinigo
Date: 2023-04-25T15:09:08-05:00
New Revision: 59a39c2fc91ed5b750083bc51dc43b6510a501b6
URL: https://github.com/llvm/llvm-project/commit/59a39c2fc91ed5b750083bc51dc43b6510a501b6
DIFF: https://github.com/llvm/llvm-project/commit/59a39c2fc91ed5b750083bc51dc43b6510a501b6.diff
LOG: [LLDB][REPL] Destroy the repl instances correctly
This change ensures that the REPL map inside Target is destroyed correctly when `Target::Destroy()` is invoked. Not doing so results in the REPL not finishing its job when the debugger is initialized in REPL mode reading from a file. In my particular case, my REPL doesn't print the stdout of the last expression in the input file unless I include this change.
Differential Revision: https://reviews.llvm.org/D149180
Added:
Modified:
lldb/source/Target/Target.cpp
Removed:
################################################################################
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index c5946d15a6bc3..4f3c644e82889 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -293,6 +293,7 @@ void Target::Destroy() {
m_stop_hooks.clear();
m_stop_hook_next_id = 0;
m_suppress_stop_hooks = false;
+ m_repl_map.clear();
Args signal_args;
ClearDummySignals(signal_args);
}
More information about the lldb-commits
mailing list