[Lldb-commits] [lldb] 858a286 - [lldb] Remove outdated comment and radar link (NFC)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Sun Jul 30 13:51:54 PDT 2023


Author: Jonas Devlieghere
Date: 2023-07-30T13:51:49-07:00
New Revision: 858a2865d3008b35f22597a411b2b4f7110aaa15

URL: https://github.com/llvm/llvm-project/commit/858a2865d3008b35f22597a411b2b4f7110aaa15
DIFF: https://github.com/llvm/llvm-project/commit/858a2865d3008b35f22597a411b2b4f7110aaa15.diff

LOG: [lldb] Remove outdated comment and radar link (NFC)

The comment and radar referenced PyThreadState_Get which is no longer
used there and instead has been replaced to a call to
PyThreadState_GetDict which has different semantics. Unlike
PyThreadState_Get, it can return NULL and it is okay to call this
function when no current thread state is available.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
index 55b7a73712c4fc..3fbab6bacec7db 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -582,10 +582,6 @@ void ScriptInterpreterPythonImpl::LeaveSession() {
   // up believing we have no thread state and PyImport_AddModule will crash if
   // that is the case - since that seems to only happen when destroying the
   // SBDebugger, we can make do without clearing up stdout and stderr
-
-  // rdar://problem/11292882
-  // When the current thread state is NULL, PyThreadState_Get() issues a fatal
-  // error.
   if (PyThreadState_GetDict()) {
     PythonDictionary &sys_module_dict = GetSysModuleDictionary();
     if (sys_module_dict.IsValid()) {
@@ -1783,7 +1779,7 @@ lldb::StateType ScriptInterpreterPythonImpl::ScriptedThreadPlanGetRunState(
 
 bool
 ScriptInterpreterPythonImpl::ScriptedThreadPlanGetStopDescription(
-    StructuredData::ObjectSP implementor_sp, lldb_private::Stream *stream, 
+    StructuredData::ObjectSP implementor_sp, lldb_private::Stream *stream,
     bool &script_error) {
   StructuredData::Generic *generic = nullptr;
   if (implementor_sp)


        


More information about the lldb-commits mailing list