From a007a6d84471bb956abe10974cac3066799f583f Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Mon, 31 Jan 2022 15:57:48 +0100 Subject: [lldb] Convert "LLDB" log channel to the new API --- .../ScriptInterpreter/Python/ScriptInterpreterPython.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp index 1bf647e..f64effe 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp @@ -131,7 +131,7 @@ public: ~InitializePythonRAII() { if (m_was_already_initialized) { - Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SCRIPT)); + Log *log = GetLog(LLDBLog::Script); LLDB_LOGV(log, "Releasing PyGILState. Returning to state = {0}locked", m_gil_state == PyGILState_UNLOCKED ? "un" : ""); PyGILState_Release(m_gil_state); @@ -201,7 +201,7 @@ private: #endif if (PyEval_ThreadsInitialized()) { - Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SCRIPT)); + Log *log = GetLog(LLDBLog::Script); m_was_already_initialized = true; m_gil_state = PyGILState_Ensure(); @@ -380,7 +380,7 @@ ScriptInterpreterPythonImpl::Locker::Locker( } bool ScriptInterpreterPythonImpl::Locker::DoAcquireLock() { - Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SCRIPT)); + Log *log = GetLog(LLDBLog::Script); m_GILState = PyGILState_Ensure(); LLDB_LOGV(log, "Ensured PyGILState. Previous state = {0}locked", m_GILState == PyGILState_UNLOCKED ? "un" : ""); @@ -404,7 +404,7 @@ bool ScriptInterpreterPythonImpl::Locker::DoInitSession(uint16_t on_entry_flags, } bool ScriptInterpreterPythonImpl::Locker::DoFreeLock() { - Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SCRIPT)); + Log *log = GetLog(LLDBLog::Script); LLDB_LOGV(log, "Releasing PyGILState. Returning to state = {0}locked", m_GILState == PyGILState_UNLOCKED ? "un" : ""); PyGILState_Release(m_GILState); @@ -590,7 +590,7 @@ ScriptInterpreterPythonImpl::CreateInstance(Debugger &debugger) { } void ScriptInterpreterPythonImpl::LeaveSession() { - Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SCRIPT)); + Log *log = GetLog(LLDBLog::Script); if (log) log->PutCString("ScriptInterpreterPythonImpl::LeaveSession()"); @@ -660,7 +660,7 @@ bool ScriptInterpreterPythonImpl::EnterSession(uint16_t on_entry_flags, FileSP err_sp) { // If we have already entered the session, without having officially 'left' // it, then there is no need to 'enter' it again. - Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SCRIPT)); + Log *log = GetLog(LLDBLog::Script); if (m_session_is_active) { LLDB_LOGF( log, @@ -962,7 +962,7 @@ bool ScriptInterpreterPythonImpl::Interrupt() { // just our (hardcoded) input signal code SIGINT, so that's not useful at all. return true; #else - Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SCRIPT)); + Log *log = GetLog(LLDBLog::Script); if (IsExecutingPython()) { PyThreadState *state = PyThreadState_GET(); -- cgit v1.1