diff options
Diffstat (limited to 'source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp')
-rw-r--r-- | source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp b/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp index c1fe0cc8dddaf..b777a53191042 100644 --- a/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp +++ b/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp @@ -120,10 +120,10 @@ DynamicRegisterInfo *OperatingSystemPython::GetDynamicRegisterInfo() { return nullptr; Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OS)); - if (log) - log->Printf("OperatingSystemPython::GetDynamicRegisterInfo() fetching " - "thread register definitions from python for pid %" PRIu64, - m_process->GetID()); + LLDB_LOGF(log, + "OperatingSystemPython::GetDynamicRegisterInfo() fetching " + "thread register definitions from python for pid %" PRIu64, + m_process->GetID()); StructuredData::DictionarySP dictionary = m_interpreter->OSPlugin_RegisterInfo(m_python_object_sp); @@ -169,12 +169,12 @@ bool OperatingSystemPython::UpdateThreadList(ThreadList &old_thread_list, api_lock.try_lock(); auto interpreter_lock = m_interpreter->AcquireInterpreterLock(); - if (log) - log->Printf("OperatingSystemPython::UpdateThreadList() fetching thread " - "data from python for pid %" PRIu64, - m_process->GetID()); + LLDB_LOGF(log, + "OperatingSystemPython::UpdateThreadList() fetching thread " + "data from python for pid %" PRIu64, + m_process->GetID()); - // The threads that are in "new_thread_list" upon entry are the threads from + // The threads that are in "core_thread_list" upon entry are the threads from // the lldb_private::Process subclass, no memory threads will be in this // list. StructuredData::ArraySP threads_list = @@ -190,7 +190,7 @@ bool OperatingSystemPython::UpdateThreadList(ThreadList &old_thread_list, if (log) { StreamString strm; threads_list->Dump(strm); - log->Printf("threads_list = %s", strm.GetData()); + LLDB_LOGF(log, "threads_list = %s", strm.GetData()); } const uint32_t num_threads = threads_list->GetSize(); @@ -316,21 +316,21 @@ OperatingSystemPython::CreateRegisterContextForThread(Thread *thread, if (reg_data_addr != LLDB_INVALID_ADDRESS) { // The registers data is in contiguous memory, just create the register // context using the address provided - if (log) - log->Printf("OperatingSystemPython::CreateRegisterContextForThread (tid " - "= 0x%" PRIx64 ", 0x%" PRIx64 ", reg_data_addr = 0x%" PRIx64 - ") creating memory register context", - thread->GetID(), thread->GetProtocolID(), reg_data_addr); + LLDB_LOGF(log, + "OperatingSystemPython::CreateRegisterContextForThread (tid " + "= 0x%" PRIx64 ", 0x%" PRIx64 ", reg_data_addr = 0x%" PRIx64 + ") creating memory register context", + thread->GetID(), thread->GetProtocolID(), reg_data_addr); reg_ctx_sp = std::make_shared<RegisterContextMemory>( *thread, 0, *GetDynamicRegisterInfo(), reg_data_addr); } else { // No register data address is provided, query the python plug-in to let it // make up the data as it sees fit - if (log) - log->Printf("OperatingSystemPython::CreateRegisterContextForThread (tid " - "= 0x%" PRIx64 ", 0x%" PRIx64 - ") fetching register data from python", - thread->GetID(), thread->GetProtocolID()); + LLDB_LOGF(log, + "OperatingSystemPython::CreateRegisterContextForThread (tid " + "= 0x%" PRIx64 ", 0x%" PRIx64 + ") fetching register data from python", + thread->GetID(), thread->GetProtocolID()); StructuredData::StringSP reg_context_data = m_interpreter->OSPlugin_RegisterContextData(m_python_object_sp, @@ -351,10 +351,10 @@ OperatingSystemPython::CreateRegisterContextForThread(Thread *thread, // if we still have no register data, fallback on a dummy context to avoid // crashing if (!reg_ctx_sp) { - if (log) - log->Printf("OperatingSystemPython::CreateRegisterContextForThread (tid " - "= 0x%" PRIx64 ") forcing a dummy register context", - thread->GetID()); + LLDB_LOGF(log, + "OperatingSystemPython::CreateRegisterContextForThread (tid " + "= 0x%" PRIx64 ") forcing a dummy register context", + thread->GetID()); reg_ctx_sp = std::make_shared<RegisterContextDummy>( *thread, 0, target.GetArchitecture().GetAddressByteSize()); } @@ -375,10 +375,10 @@ lldb::ThreadSP OperatingSystemPython::CreateThread(lldb::tid_t tid, addr_t context) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD)); - if (log) - log->Printf("OperatingSystemPython::CreateThread (tid = 0x%" PRIx64 - ", context = 0x%" PRIx64 ") fetching register data from python", - tid, context); + LLDB_LOGF(log, + "OperatingSystemPython::CreateThread (tid = 0x%" PRIx64 + ", context = 0x%" PRIx64 ") fetching register data from python", + tid, context); if (m_interpreter && m_python_object_sp) { // First thing we have to do is to try to get the API lock, and the |