// Public Static Methods
// -----------------------------------------------------------------------------
+void
+NativeProcessLinux::Initialize()
+{
+ static ConstString g_name("linux");
+ static bool g_initialized = false;
+
+ if (!g_initialized)
+ {
+ g_initialized = true;
+
+ Log::Callbacks log_callbacks = {
+ ProcessPOSIXLog::DisableLog,
+ ProcessPOSIXLog::EnableLog,
+ ProcessPOSIXLog::ListLogCategories
+ };
+
+ Log::RegisterLogChannel (g_name, log_callbacks);
+ ProcessPOSIXLog::RegisterPluginName (g_name);
+ }
+}
+
lldb_private::Error
NativeProcessLinux::LaunchProcess (
lldb_private::Module *exe_module,
#include "lldb/Interpreter/CommandReturnObject.h"
#include "Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h"
#include "Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h"
+#include "Plugins/Process/Linux/NativeProcessLinux.h"
#ifndef LLGS_PROGRAM_NAME
#define LLGS_PROGRAM_NAME "lldb-server"
}
}
-//----------------------------------------------------------------------
-// main
-//----------------------------------------------------------------------
-int
-main_gdbserver (int argc, char *argv[])
+static void
+initialize ()
{
#ifndef _WIN32
// Setup signal handlers first thing.
signal (SIGHUP, signal_handler);
#endif
+#if defined (__linux__)
+ //----------------------------------------------------------------------
+ // Linux hosted plugins
+ //----------------------------------------------------------------------
+ NativeProcessLinux::Initialize();
+#endif
+}
+
+//----------------------------------------------------------------------
+// main
+//----------------------------------------------------------------------
+int
+main_gdbserver (int argc, char *argv[])
+{
+ initialize ();
+
const char *progname = argv[0];
const char *subcommand = argv[1];
argc--;