summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
diff options
context:
space:
mode:
authorTamas Berghammer <tberghammer@google.com>2015-02-18 15:39:41 +0000
committerTamas Berghammer <tberghammer@google.com>2015-02-18 15:39:41 +0000
commitc2c3d7185d3438826a1aa38a9774557958b41ae3 (patch)
treef75ef155291876e9ab103ad927d9bb200d90ffe0 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
parente8b362a885cdb72eba9b6e8d54f49001cd1d2bc0 (diff)
downloadbcm5719-llvm-c2c3d7185d3438826a1aa38a9774557958b41ae3.tar.gz
bcm5719-llvm-c2c3d7185d3438826a1aa38a9774557958b41ae3.zip
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 <flackr@google.com> Differential revision: http://reviews.llvm.org/D7545 llvm-svn: 229683
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp9
1 files changed, 7 insertions, 2 deletions
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)
OpenPOWER on IntegriCloud