Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h =================================================================== --- source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h @@ -74,6 +74,12 @@ }; //------------------------------------------------------------------ + // Public Static Methods + //------------------------------------------------------------------ + static void + Initialize(); + + //------------------------------------------------------------------ // Constructors and Destructors //------------------------------------------------------------------ GDBRemoteCommunication(const char *comm_name, Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp =================================================================== --- source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -138,6 +138,26 @@ } } +void +GDBRemoteCommunication::Initialize() +{ + static ConstString g_name("gdb-remote"); + static bool g_initialized = false; + + if (g_initialized == false) + { + g_initialized = true; + + Log::Callbacks log_callbacks = { + ProcessGDBRemoteLog::DisableLog, + ProcessGDBRemoteLog::EnableLog, + ProcessGDBRemoteLog::ListLogCategories + }; + + Log::RegisterLogChannel (g_name, log_callbacks); + } +} + //---------------------------------------------------------------------- // GDBRemoteCommunication constructor //---------------------------------------------------------------------- Index: tools/lldb-server/lldb-server.cpp =================================================================== --- tools/lldb-server/lldb-server.cpp +++ tools/lldb-server/lldb-server.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "lldb/lldb-private.h" +#include "Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp" #include #include @@ -30,6 +31,7 @@ initialize () { lldb_private::InitializeForLLGS(); + GDBRemoteCommunication::Initialize(); } static void