diff options
author | Martin Storsjö <martin@martin.st> | 2019-11-18 12:31:33 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2019-11-19 09:12:50 +0200 |
commit | 926d283893ae764cfba0360badcd7cc9fef4dfe5 (patch) | |
tree | 73730a36d76437c8f6031d2e24c45ab911cf0c7d /lldb/source/Plugins/Process/gdb-remote | |
parent | d044dcc5e492181b1517347013a780d9eda6c3c3 (diff) | |
download | bcm5719-llvm-926d283893ae764cfba0360badcd7cc9fef4dfe5.tar.gz bcm5719-llvm-926d283893ae764cfba0360badcd7cc9fef4dfe5.zip |
[lldb-server] Use LLDB_LOG_ERROR to consume Error<> even if logging is disabled
Differential Revision: https://reviews.llvm.org/D70386
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote')
3 files changed, 12 insertions, 12 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.cpp index 3a01df0fc82..15c73e78bd4 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.cpp @@ -211,9 +211,9 @@ bool GDBRemoteCommunicationReplayServer::StartAsyncThread() { "<lldb.gdb-replay.async>", GDBRemoteCommunicationReplayServer::AsyncThread, this); if (!async_thread) { - LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST), - "failed to launch host thread: {}", - llvm::toString(async_thread.takeError())); + LLDB_LOG_ERROR(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST), + async_thread.takeError(), + "failed to launch host thread: {}"); return false; } m_async_thread = *async_thread; diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp index ad1a39b5796..ddfae7e7d12 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -669,9 +669,9 @@ GDBRemoteCommunicationServerLLGS::SendStopReplyPacketForThread( response.PutStringAsRawHex8(unescaped_response.GetData()); response.PutChar(';'); } else { - LLDB_LOG(log, "failed to prepare a jstopinfo field for pid {0}:", - m_debugged_process_up->GetID(), - llvm::toString(threads_info.takeError())); + LLDB_LOG_ERROR(log, threads_info.takeError(), + "failed to prepare a jstopinfo field for pid {1}: {0}", + m_debugged_process_up->GetID()); } } @@ -3087,9 +3087,9 @@ GDBRemoteCommunicationServerLLGS::Handle_jThreadsInfo( llvm::Expected<json::Value> threads_info = GetJSONThreadsInfo( *m_debugged_process_up, threads_with_valid_stop_info_only); if (!threads_info) { - LLDB_LOG(log, "failed to prepare a packet for pid {0}: {1}", - m_debugged_process_up->GetID(), - llvm::toString(threads_info.takeError())); + LLDB_LOG_ERROR(log, threads_info.takeError(), + "failed to prepare a packet for pid {1}: {0}", + m_debugged_process_up->GetID()); return SendErrorResponse(52); } diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 9e459cf3382..5d1dd79c2ff 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -3635,9 +3635,9 @@ bool ProcessGDBRemote::StartAsyncThread() { llvm::Expected<HostThread> async_thread = ThreadLauncher::LaunchThread( "<lldb.process.gdb-remote.async>", ProcessGDBRemote::AsyncThread, this); if (!async_thread) { - LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST), - "failed to launch host thread: {}", - llvm::toString(async_thread.takeError())); + LLDB_LOG_ERROR(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST), + async_thread.takeError(), + "failed to launch host thread: {}"); return false; } m_async_thread = *async_thread; |