diff options
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp index 123a819..495498e 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -241,7 +241,7 @@ void GDBRemoteCommunicationServerLLGS::SetLaunchInfo(const ProcessLaunchInfo &in } Status GDBRemoteCommunicationServerLLGS::LaunchProcess() { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); if (!m_process_launch_info.GetArguments().GetArgumentCount()) return Status("%s: no process command line specified to launch", @@ -323,7 +323,7 @@ Status GDBRemoteCommunicationServerLLGS::LaunchProcess() { } Status GDBRemoteCommunicationServerLLGS::AttachToProcess(lldb::pid_t pid) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); LLDB_LOGF(log, "GDBRemoteCommunicationServerLLGS::%s pid %" PRIu64, __FUNCTION__, pid); @@ -370,7 +370,7 @@ Status GDBRemoteCommunicationServerLLGS::AttachToProcess(lldb::pid_t pid) { Status GDBRemoteCommunicationServerLLGS::AttachWaitProcess( llvm::StringRef process_name, bool include_existing) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); std::chrono::milliseconds polling_interval = std::chrono::milliseconds(1); @@ -440,7 +440,7 @@ Status GDBRemoteCommunicationServerLLGS::AttachWaitProcess( void GDBRemoteCommunicationServerLLGS::InitializeDelegate( NativeProcessProtocol *process) { assert(process && "process cannot be NULL"); - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); if (log) { LLDB_LOGF(log, "GDBRemoteCommunicationServerLLGS::%s called with " @@ -454,7 +454,7 @@ GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::SendWResponse( NativeProcessProtocol *process) { assert(process && "process cannot be NULL"); - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); // send W notification auto wait_status = process->GetExitStatus(); @@ -608,7 +608,7 @@ static void WriteRegisterValueInHexFixedWidth( static llvm::Optional<json::Object> GetRegistersAsJSON(NativeThreadProtocol &thread) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Thread); NativeRegisterContext& reg_ctx = thread.GetRegisterContext(); @@ -693,7 +693,7 @@ static const char *GetStopReasonString(StopReason stop_reason) { static llvm::Expected<json::Array> GetJSONThreadsInfo(NativeProcessProtocol &process, bool abridged) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Process | LLDBLog::Thread); json::Array threads_array; @@ -766,7 +766,7 @@ GetJSONThreadsInfo(NativeProcessProtocol &process, bool abridged) { GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::SendStopReplyPacketForThread( lldb::tid_t tid) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Process | LLDBLog::Thread); // Ensure we have a debugged process. if (!m_current_process || @@ -979,7 +979,7 @@ void GDBRemoteCommunicationServerLLGS::HandleInferiorState_Exited( NativeProcessProtocol *process) { assert(process && "process cannot be NULL"); - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); LLDB_LOGF(log, "GDBRemoteCommunicationServerLLGS::%s called", __FUNCTION__); PacketResult result = SendStopReasonForState(StateType::eStateExited); @@ -1003,7 +1003,7 @@ void GDBRemoteCommunicationServerLLGS::HandleInferiorState_Stopped( NativeProcessProtocol *process) { assert(process && "process cannot be NULL"); - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); LLDB_LOGF(log, "GDBRemoteCommunicationServerLLGS::%s called", __FUNCTION__); // Send the stop reason unless this is the stop after the launch or attach. @@ -1028,7 +1028,7 @@ void GDBRemoteCommunicationServerLLGS::HandleInferiorState_Stopped( void GDBRemoteCommunicationServerLLGS::ProcessStateChanged( NativeProcessProtocol *process, lldb::StateType state) { assert(process && "process cannot be NULL"); - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); if (log) { LLDB_LOGF(log, "GDBRemoteCommunicationServerLLGS::%s called with " @@ -1171,7 +1171,7 @@ void GDBRemoteCommunicationServerLLGS::StartSTDIOForwarding() { if (!m_stdio_handle_up) { // Not much we can do about the failure. Log it and continue without // forwarding. - if (Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)) + if (Log *log = GetLog(LLDBLog::Process)) LLDB_LOGF(log, "GDBRemoteCommunicationServerLLGS::%s Failed to set up stdio " "forwarding: %s", @@ -1198,7 +1198,7 @@ void GDBRemoteCommunicationServerLLGS::SendProcessOutput() { case eConnectionStatusEndOfFile: case eConnectionStatusError: case eConnectionStatusNoConnection: - if (Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)) + if (Log *log = GetLog(LLDBLog::Process)) LLDB_LOGF(log, "GDBRemoteCommunicationServerLLGS::%s Stopping stdio " "forwarding as communication returned status %d (error: " @@ -1356,7 +1356,7 @@ GDBRemoteCommunicationServerLLGS::Handle_qC(StringExtractorGDBRemote &packet) { GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_k(StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); StopSTDIOForwarding(); @@ -1425,7 +1425,7 @@ GDBRemoteCommunicationServerLLGS::Handle_QListThreadsInStopReply( GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_C(StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Process | LLDBLog::Thread); LLDB_LOGF(log, "GDBRemoteCommunicationServerLLGS::%s called", __FUNCTION__); // Ensure we have a native process. @@ -1506,7 +1506,7 @@ GDBRemoteCommunicationServerLLGS::Handle_C(StringExtractorGDBRemote &packet) { GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_c(StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Process | LLDBLog::Thread); LLDB_LOGF(log, "GDBRemoteCommunicationServerLLGS::%s called", __FUNCTION__); packet.SetFilePos(packet.GetFilePos() + ::strlen("c")); @@ -1556,7 +1556,7 @@ GDBRemoteCommunicationServerLLGS::Handle_vCont_actions( GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_vCont( StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); LLDB_LOGF(log, "GDBRemoteCommunicationServerLLGS::%s handling vCont packet", __FUNCTION__); @@ -1661,7 +1661,7 @@ GDBRemoteCommunicationServerLLGS::Handle_vCont( } void GDBRemoteCommunicationServerLLGS::SetCurrentThreadID(lldb::tid_t tid) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Thread); LLDB_LOG(log, "setting current thread id to {0}", tid); m_current_tid = tid; @@ -1670,7 +1670,7 @@ void GDBRemoteCommunicationServerLLGS::SetCurrentThreadID(lldb::tid_t tid) { } void GDBRemoteCommunicationServerLLGS::SetContinueThreadID(lldb::tid_t tid) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Thread); LLDB_LOG(log, "setting continue thread id to {0}", tid); m_continue_tid = tid; @@ -1691,7 +1691,7 @@ GDBRemoteCommunicationServerLLGS::Handle_stop_reason( GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::SendStopReasonForState( lldb::StateType process_state) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); switch (process_state) { case eStateAttaching: @@ -1822,7 +1822,7 @@ GDBRemoteCommunicationServerLLGS::Handle_qRegisterInfo( GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_qfThreadInfo( StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Thread); // Fail if we don't have a current process. if (!m_current_process || @@ -1864,7 +1864,7 @@ GDBRemoteCommunicationServerLLGS::Handle_qsThreadInfo( GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_g(StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Thread); // Move past packet name. packet.SetFilePos(strlen("g")); @@ -1919,7 +1919,7 @@ GDBRemoteCommunicationServerLLGS::Handle_g(StringExtractorGDBRemote &packet) { GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_p(StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Thread); // Parse out the register number from the request. packet.SetFilePos(strlen("p")); @@ -1995,7 +1995,7 @@ GDBRemoteCommunicationServerLLGS::Handle_p(StringExtractorGDBRemote &packet) { GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_P(StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Thread); // Ensure there is more content. if (packet.GetBytesLeft() < 1) @@ -2075,7 +2075,7 @@ GDBRemoteCommunicationServerLLGS::Handle_P(StringExtractorGDBRemote &packet) { GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_H(StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Thread); // Parse out which variant of $H is requested. packet.SetFilePos(strlen("H")); @@ -2166,7 +2166,7 @@ GDBRemoteCommunicationServerLLGS::Handle_H(StringExtractorGDBRemote &packet) { GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_I(StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Thread); // Fail if we don't have a current process. if (!m_current_process || @@ -2202,7 +2202,7 @@ GDBRemoteCommunicationServerLLGS::Handle_I(StringExtractorGDBRemote &packet) { GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_interrupt( StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Process | LLDBLog::Thread); // Fail if we don't have a current process. if (!m_current_process || @@ -2228,7 +2228,7 @@ GDBRemoteCommunicationServerLLGS::Handle_interrupt( GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_memory_read( StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); if (!m_current_process || (m_current_process->GetID() == LLDB_INVALID_PROCESS_ID)) { @@ -2308,7 +2308,7 @@ GDBRemoteCommunicationServerLLGS::Handle_memory_read( GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle__M(StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); if (!m_current_process || (m_current_process->GetID() == LLDB_INVALID_PROCESS_ID)) { @@ -2357,7 +2357,7 @@ GDBRemoteCommunicationServerLLGS::Handle__M(StringExtractorGDBRemote &packet) { GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle__m(StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); if (!m_current_process || (m_current_process->GetID() == LLDB_INVALID_PROCESS_ID)) { @@ -2385,7 +2385,7 @@ GDBRemoteCommunicationServerLLGS::Handle__m(StringExtractorGDBRemote &packet) { GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_M(StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); if (!m_current_process || (m_current_process->GetID() == LLDB_INVALID_PROCESS_ID)) { @@ -2465,7 +2465,7 @@ GDBRemoteCommunicationServerLLGS::Handle_M(StringExtractorGDBRemote &packet) { GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_qMemoryRegionInfoSupported( StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); // Currently only the NativeProcessProtocol knows if it can handle a // qMemoryRegionInfoSupported request, but we're not guaranteed to be @@ -2498,7 +2498,7 @@ GDBRemoteCommunicationServerLLGS::Handle_qMemoryRegionInfoSupported( GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_qMemoryRegionInfo( StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); // Ensure we have a process. if (!m_current_process || @@ -2580,7 +2580,7 @@ GDBRemoteCommunicationServerLLGS::Handle_Z(StringExtractorGDBRemote &packet) { // Ensure we have a process. if (!m_current_process || (m_current_process->GetID() == LLDB_INVALID_PROCESS_ID)) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); LLDB_LOG(log, "failed, no process available"); return SendErrorResponse(0x15); } @@ -2652,7 +2652,7 @@ GDBRemoteCommunicationServerLLGS::Handle_Z(StringExtractorGDBRemote &packet) { m_current_process->SetBreakpoint(addr, size, want_hardware); if (error.Success()) return SendOKResponse(); - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_BREAKPOINTS)); + Log *log = GetLog(LLDBLog::Breakpoints); LLDB_LOG(log, "pid {0} failed to set breakpoint: {1}", m_current_process->GetID(), error); return SendErrorResponse(0x09); @@ -2662,7 +2662,7 @@ GDBRemoteCommunicationServerLLGS::Handle_Z(StringExtractorGDBRemote &packet) { addr, size, watch_flags, want_hardware); if (error.Success()) return SendOKResponse(); - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_WATCHPOINTS)); + Log *log = GetLog(LLDBLog::Watchpoints); LLDB_LOG(log, "pid {0} failed to set watchpoint: {1}", m_current_process->GetID(), error); return SendErrorResponse(0x09); @@ -2674,7 +2674,7 @@ GDBRemoteCommunicationServerLLGS::Handle_z(StringExtractorGDBRemote &packet) { // Ensure we have a process. if (!m_current_process || (m_current_process->GetID() == LLDB_INVALID_PROCESS_ID)) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); LLDB_LOG(log, "failed, no process available"); return SendErrorResponse(0x15); } @@ -2740,7 +2740,7 @@ GDBRemoteCommunicationServerLLGS::Handle_z(StringExtractorGDBRemote &packet) { m_current_process->RemoveBreakpoint(addr, want_hardware); if (error.Success()) return SendOKResponse(); - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_BREAKPOINTS)); + Log *log = GetLog(LLDBLog::Breakpoints); LLDB_LOG(log, "pid {0} failed to remove breakpoint: {1}", m_current_process->GetID(), error); return SendErrorResponse(0x09); @@ -2749,7 +2749,7 @@ GDBRemoteCommunicationServerLLGS::Handle_z(StringExtractorGDBRemote &packet) { const Status error = m_current_process->RemoveWatchpoint(addr); if (error.Success()) return SendOKResponse(); - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_WATCHPOINTS)); + Log *log = GetLog(LLDBLog::Watchpoints); LLDB_LOG(log, "pid {0} failed to remove watchpoint: {1}", m_current_process->GetID(), error); return SendErrorResponse(0x09); @@ -2758,7 +2758,7 @@ GDBRemoteCommunicationServerLLGS::Handle_z(StringExtractorGDBRemote &packet) { GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_s(StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Process | LLDBLog::Thread); // Ensure we have a process. if (!m_continue_process || @@ -2815,7 +2815,7 @@ GDBRemoteCommunicationServerLLGS::BuildTargetXml() { return llvm::createStringError(llvm::inconvertibleErrorCode(), "No thread available"); - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Process | LLDBLog::Thread); // Get the register context for the first thread. NativeRegisterContext ®_context = thread->GetRegisterContext(); @@ -3032,7 +3032,7 @@ GDBRemoteCommunicationServerLLGS::Handle_qXfer( GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_QSaveRegisterState( StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Thread); // Move past packet name. packet.SetFilePos(strlen("QSaveRegisterState")); @@ -3080,7 +3080,7 @@ GDBRemoteCommunicationServerLLGS::Handle_QSaveRegisterState( GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_QRestoreRegisterState( StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Thread); // Parse out save id. packet.SetFilePos(strlen("QRestoreRegisterState:")); @@ -3141,7 +3141,7 @@ GDBRemoteCommunicationServerLLGS::Handle_QRestoreRegisterState( GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_vAttach( StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); // Consume the ';' after vAttach. packet.SetFilePos(strlen("vAttach")); @@ -3177,7 +3177,7 @@ GDBRemoteCommunicationServerLLGS::Handle_vAttach( GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_vAttachWait( StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); // Consume the ';' after the identifier. packet.SetFilePos(strlen("vAttachWait")); @@ -3213,7 +3213,7 @@ GDBRemoteCommunicationServerLLGS::Handle_qVAttachOrWaitSupported( GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_vAttachOrWait( StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); // Consume the ';' after the identifier. packet.SetFilePos(strlen("vAttachOrWait")); @@ -3243,7 +3243,7 @@ GDBRemoteCommunicationServerLLGS::Handle_vAttachOrWait( GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_vRun( StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); llvm::StringRef s = packet.GetStringRef(); if (!s.consume_front("vRun;")) @@ -3322,7 +3322,7 @@ GDBRemoteCommunicationServerLLGS::Handle_D(StringExtractorGDBRemote &packet) { GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_qThreadStopInfo( StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Thread); packet.SetFilePos(strlen("qThreadStopInfo")); const lldb::tid_t tid = packet.GetHexMaxU64(false, LLDB_INVALID_THREAD_ID); @@ -3339,7 +3339,7 @@ GDBRemoteCommunicationServerLLGS::Handle_qThreadStopInfo( GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_jThreadsInfo( StringExtractorGDBRemote &) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Process | LLDBLog::Thread); // Ensure we have a debugged process. if (!m_current_process || @@ -3455,7 +3455,7 @@ GDBRemoteCommunicationServerLLGS::Handle_QPassSignals( GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_qMemTags( StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); // Ensure we have a process. if (!m_current_process || @@ -3536,7 +3536,7 @@ GDBRemoteCommunicationServerLLGS::Handle_qMemTags( GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_QMemTags( StringExtractorGDBRemote &packet) { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); // Ensure we have a process. if (!m_current_process || @@ -3657,7 +3657,7 @@ GDBRemoteCommunicationServerLLGS::Handle_qSaveCore( } void GDBRemoteCommunicationServerLLGS::MaybeCloseInferiorTerminalConnection() { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); // Tell the stdio connection to shut down. if (m_stdio_communication.IsConnected()) { @@ -3701,7 +3701,7 @@ NativeThreadProtocol *GDBRemoteCommunicationServerLLGS::GetThreadFromSuffix( return m_current_process->GetThreadByID(current_tid); } - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_THREAD)); + Log *log = GetLog(LLDBLog::Thread); // Parse out the ';'. if (packet.GetBytesLeft() < 1 || packet.GetChar() != ';') { @@ -3752,7 +3752,7 @@ uint32_t GDBRemoteCommunicationServerLLGS::GetNextSavedRegistersID() { } void GDBRemoteCommunicationServerLLGS::ClearProcessSpecificData() { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); + Log *log = GetLog(LLDBLog::Process); LLDB_LOG(log, "clearing {0} xfer buffers", m_xfer_buffer_map.size()); m_xfer_buffer_map.clear(); |