From 5f4b6c7c9e1f8d1fbda62ea3729284e7c3db27f1 Mon Sep 17 00:00:00 2001 From: Robert Flack Date: Wed, 11 Mar 2015 21:14:22 +0000 Subject: Initialize ProcessGDBRemoteLog for LLGS to fix remote platform logging This was previously initialized by ProcessGDBRemote::Initialize but lldb-server does not contain ProcessGDBRemote anymore so this needs to be initialized directly. Differential Revision: http://reviews.llvm.org/D8186 llvm-svn: 231966 --- .../Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp') diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp index 15b861f..0f73e44 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp @@ -9,6 +9,8 @@ #include "ProcessGDBRemoteLog.h" +#include + #include "lldb/Interpreter/Args.h" #include "lldb/Core/StreamFile.h" @@ -32,6 +34,22 @@ GetLog () return g_log; } +void +ProcessGDBRemoteLog::Initialize() +{ + static ConstString g_name("gdb-remote"); + static std::once_flag g_once_flag; + + std::call_once(g_once_flag, [](){ + Log::Callbacks log_callbacks = { + DisableLog, + EnableLog, + ListLogCategories + }; + + Log::RegisterLogChannel (g_name, log_callbacks); + }); +} Log * ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (uint32_t mask) -- cgit v1.1