From c2c3d7185d3438826a1aa38a9774557958b41ae3 Mon Sep 17 00:00:00 2001 From: Tamas Berghammer Date: Wed, 18 Feb 2015 15:39:41 +0000 Subject: Merge lldb-platform and lldb-gdbserver into a single binary This commit merges lldb-platform and lldb-gdbserver into a single binary of the same size as each of the previous individual binaries. Execution mode is controlled by the first argument being either platform or gdbserver. Patch from: flackr Differential revision: http://reviews.llvm.org/D7545 llvm-svn: 229683 --- .../source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp') diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp index ab27eb00ebd..ecf581b2fab 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -38,7 +38,7 @@ #if defined(__APPLE__) # define DEBUGSERVER_BASENAME "debugserver" #else -# define DEBUGSERVER_BASENAME "lldb-gdbserver" +# define DEBUGSERVER_BASENAME "lldb-server" #endif using namespace lldb; @@ -739,10 +739,15 @@ GDBRemoteCommunication::StartDebugserverProcess (const char *hostname, Args &debugserver_args = launch_info.GetArguments(); debugserver_args.Clear(); char arg_cstr[PATH_MAX]; - + // Start args with "debugserver /file/path -r --" debugserver_args.AppendArgument(debugserver_path); +#if !defined(__APPLE__) + // First argument to lldb-server must be mode in which to run. + debugserver_args.AppendArgument("gdbserver"); +#endif + // If a host and port is supplied then use it char host_and_port[128]; if (hostname) -- cgit v1.2.3