diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-02-05 18:04:23 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2022-02-05 18:05:05 +0000 |
commit | ecbca9f5fb7d7613d2b94982c4825eb0d33d6842 (patch) | |
tree | 3a4038f3b7bafaeade9fd6146ea8021237616657 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp | |
parent | 6f8fc217eaa12bf657be1c6468ed9938d10168b3 (diff) |
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp index 803e5842cd7d..8364ffeef46f 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp @@ -40,7 +40,7 @@ StateType GDBRemoteClientBase::SendContinuePacketAndWaitForResponse( ContinueDelegate &delegate, const UnixSignals &signals, llvm::StringRef payload, std::chrono::seconds interrupt_timeout, StringExtractorGDBRemote &response) { - Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS)); + Log *log = GetLog(GDBRLog::Process); response.Clear(); { @@ -184,8 +184,7 @@ GDBRemoteClientBase::SendPacketAndWaitForResponse( std::chrono::seconds interrupt_timeout) { Lock lock(*this, interrupt_timeout); if (!lock) { - if (Log *log = - ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS)) + if (Log *log = GetLog(GDBRLog::Process)) LLDB_LOGF(log, "GDBRemoteClientBase::%s failed to get mutex, not sending " "packet '%.*s'", @@ -203,8 +202,7 @@ GDBRemoteClientBase::SendPacketAndReceiveResponseWithOutputSupport( llvm::function_ref<void(llvm::StringRef)> output_callback) { Lock lock(*this, interrupt_timeout); if (!lock) { - if (Log *log = - ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS)) + if (Log *log = GetLog(GDBRLog::Process)) LLDB_LOGF(log, "GDBRemoteClientBase::%s failed to get mutex, not sending " "packet '%.*s'", @@ -237,7 +235,7 @@ GDBRemoteClientBase::SendPacketAndWaitForResponseNoLock( if (response.ValidateResponse()) return packet_result; // Response says it wasn't valid - Log *log = ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PACKETS); + Log *log = GetLog(GDBRLog::Packets); LLDB_LOGF( log, "error: packet with payload \"%.*s\" got invalid response \"%s\": %s", @@ -311,7 +309,7 @@ void GDBRemoteClientBase::ContinueLock::unlock() { GDBRemoteClientBase::ContinueLock::LockResult GDBRemoteClientBase::ContinueLock::lock() { - Log *log = ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS); + Log *log = GetLog(GDBRLog::Process); LLDB_LOGF(log, "GDBRemoteClientBase::ContinueLock::%s() resuming with %s", __FUNCTION__, m_comm.m_continue_packet.c_str()); @@ -349,7 +347,7 @@ GDBRemoteClientBase::Lock::Lock(GDBRemoteClientBase &comm, } void GDBRemoteClientBase::Lock::SyncWithContinueThread() { - Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS)); + Log *log = GetLog(GDBRLog::Process); std::unique_lock<std::mutex> lock(m_comm.m_mutex); if (m_comm.m_is_running && m_interrupt_timeout == std::chrono::seconds(0)) return; // We were asked to avoid interrupting the sender. Lock is not |