@@ -145,15 +145,15 @@ struct InitializePythonRAII {
145
145
m_was_already_initialized = true ;
146
146
m_gil_state = PyGILState_Ensure ();
147
147
LLDB_LOGV (GetLog (LLDBLog::Script),
148
- " Ensured PyGILState. Previous state = {0}locked \n " ,
149
- m_gil_state == PyGILState_UNLOCKED ? " un " : " " );
148
+ " Ensured PyGILState. Previous state = {0}" ,
149
+ m_gil_state == PyGILState_UNLOCKED ? " unlocked " : " locked " );
150
150
}
151
151
152
152
~InitializePythonRAII () {
153
153
if (m_was_already_initialized) {
154
- Log *log = GetLog (LLDBLog::Script);
155
- LLDB_LOGV (log, " Releasing PyGILState. Returning to state = {0}locked " ,
156
- m_gil_state == PyGILState_UNLOCKED ? " un " : " " );
154
+ LLDB_LOGV ( GetLog (LLDBLog::Script),
155
+ " Releasing PyGILState. Returning to state = {0}" ,
156
+ m_gil_state == PyGILState_UNLOCKED ? " unlocked " : " locked " );
157
157
PyGILState_Release (m_gil_state);
158
158
} else {
159
159
// We initialized the threads in this function, just unlock the GIL.
@@ -328,10 +328,9 @@ ScriptInterpreterPythonImpl::Locker::Locker(
328
328
}
329
329
330
330
bool ScriptInterpreterPythonImpl::Locker::DoAcquireLock () {
331
- Log *log = GetLog (LLDBLog::Script);
332
331
m_GILState = PyGILState_Ensure ();
333
- LLDB_LOGV (log , " Ensured PyGILState. Previous state = {0}locked " ,
334
- m_GILState == PyGILState_UNLOCKED ? " un " : " " );
332
+ LLDB_LOGV (GetLog (LLDBLog::Script) , " Ensured PyGILState. Previous state = {0}" ,
333
+ m_GILState == PyGILState_UNLOCKED ? " unlocked " : " locked " );
335
334
336
335
// we need to save the thread state when we first start the command because
337
336
// we might decide to interrupt it while some action is taking place outside
@@ -352,9 +351,9 @@ bool ScriptInterpreterPythonImpl::Locker::DoInitSession(uint16_t on_entry_flags,
352
351
}
353
352
354
353
bool ScriptInterpreterPythonImpl::Locker::DoFreeLock () {
355
- Log *log = GetLog (LLDBLog::Script);
356
- LLDB_LOGV (log, " Releasing PyGILState. Returning to state = {0}locked " ,
357
- m_GILState == PyGILState_UNLOCKED ? " un " : " " );
354
+ LLDB_LOGV ( GetLog (LLDBLog::Script),
355
+ " Releasing PyGILState. Returning to state = {0}" ,
356
+ m_GILState == PyGILState_UNLOCKED ? " unlocked " : " locked " );
358
357
PyGILState_Release (m_GILState);
359
358
m_python_interpreter->DecrementLockCount ();
360
359
return true ;
0 commit comments