[Lldb-commits] [PATCH] Initialize ProcessGDBRemoteLog for LLGS to fix remote platform logging
Robert Flack
flackr at gmail.com
Tue Mar 10 18:37:52 PDT 2015
REPOSITORY
rL LLVM
================
Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp:142
@@ +141,3 @@
+void
+GDBRemoteCommunication::Initialize()
+{
----------------
tberghammer wrote:
> ovyalov wrote:
> > Maybe introduce ProcessGDBRemoteLog::Initialize() instead of this method?
> >
> > We can put
> >
> >
> > ```
> > Log::Callbacks log_callbacks = {
> > ProcessGDBRemoteLog::DisableLog,
> > ProcessGDBRemoteLog::EnableLog,
> > ProcessGDBRemoteLog::ListLogCategories
> > };
> >
> > Log::RegisterLogChannel (g_name, log_callbacks);
> > ```
> >
> > inside of ProcessGDBRemoteLog::Initialize and call it from ProcessGDBRemote::Initialize and lldb-server.cpp.
> I like your idea about creating ProcessGDBRemoteLog::Initialize, but I would prefer to call it from lldb.cpp:initializeLLGS().
Done, for ProcessPOSIXLog as well.
================
Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp:147
@@ +146,3 @@
+
+ if (g_initialized == false)
+ {
----------------
ovyalov wrote:
> Could you use std::call_once here?
Done.
================
Comment at: tools/lldb-server/lldb-server.cpp:11
@@ -10,2 +10,3 @@
#include "lldb/lldb-private.h"
+#include "Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp"
----------------
ovyalov wrote:
> GDBRemoteCommunication.h ?
Oops, done.
http://reviews.llvm.org/D8186
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the lldb-commits
mailing list