[Lldb-commits] [PATCH] D149180: [LLDB][REPL] Destroy the repl instances correctly

walter erquinigo via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 25 13:01:53 PDT 2023


wallace created this revision.
Herald added a project: All.
wallace requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149180

Files:
  lldb/source/Target/Target.cpp


Index: lldb/source/Target/Target.cpp
===================================================================
--- lldb/source/Target/Target.cpp
+++ lldb/source/Target/Target.cpp
@@ -293,6 +293,7 @@
   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);
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149180.516867.patch
Type: text/x-patch
Size: 362 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230425/a7eb0986/attachment-0001.bin>


More information about the lldb-commits mailing list