aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2022-01-31 15:57:48 +0100
committerPavel Labath <pavel@labath.sk>2022-02-02 14:13:08 +0100
commita007a6d84471bb956abe10974cac3066799f583f (patch)
treebfa09e71cc1ce894d3a1e7cab572c21eeaaf4117 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parent574ad2a84626ffb0e7a64559e9862f20aadc013a (diff)
downloadllvm-a007a6d84471bb956abe10974cac3066799f583f.zip
llvm-a007a6d84471bb956abe10974cac3066799f583f.tar.gz
llvm-a007a6d84471bb956abe10974cac3066799f583f.tar.bz2
[lldb] Convert "LLDB" log channel to the new API
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp14
1 files changed, 7 insertions, 7 deletions
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();