summaryrefslogtreecommitdiffstats
path: root/lldb/tools
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/tools')
-rw-r--r--lldb/tools/lldb-server/lldb-gdbserver.cpp24
1 files changed, 19 insertions, 5 deletions
diff --git a/lldb/tools/lldb-server/lldb-gdbserver.cpp b/lldb/tools/lldb-server/lldb-gdbserver.cpp
index 076c7c4fe2f..dc3f6fa4531 100644
--- a/lldb/tools/lldb-server/lldb-gdbserver.cpp
+++ b/lldb/tools/lldb-server/lldb-gdbserver.cpp
@@ -40,6 +40,7 @@
#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"
@@ -481,11 +482,8 @@ ConnectToRemote (GDBRemoteCommunicationServerLLGS &gdb_server, bool reverse_conn
}
}
-//----------------------------------------------------------------------
-// main
-//----------------------------------------------------------------------
-int
-main_gdbserver (int argc, char *argv[])
+static void
+initialize ()
{
#ifndef _WIN32
// Setup signal handlers first thing.
@@ -493,6 +491,22 @@ main_gdbserver (int argc, char *argv[])
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--;
OpenPOWER on IntegriCloud