[Lldb-commits] [PATCH] D93926: [lldb] Don't remove the lldb.debugger var after exiting the interpreter

Nathan Lanza via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 29 15:59:52 PST 2020


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

The debugger itself doesn't get stale between script prompt usages.
Setting this to `None` also breaks users of the scripting API that used
this property in the background.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93926

Files:
  lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp


Index: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
===================================================================
--- lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -670,8 +670,7 @@
     log->PutCString("ScriptInterpreterPythonImpl::LeaveSession()");
 
   // Unset the LLDB global variables.
-  PyRun_SimpleString("lldb.debugger = None; lldb.target = None; lldb.process "
-                     "= None; lldb.thread = None; lldb.frame = None");
+  PyRun_SimpleString("lldb.debugger = None;");
 
   // checking that we have a valid thread state - since we use our own
   // threading and locking in some (rare) cases during cleanup Python may end


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93926.314036.patch
Type: text/x-patch
Size: 785 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201229/6503ba13/attachment.bin>


More information about the lldb-commits mailing list