From 73c1e5e2248432ac6740d2d033f4eb8cb7c4e26e Mon Sep 17 00:00:00 2001
From: Marc Khouzam
Date: Thu, 20 Nov 2014 10:57:54 -0500
Subject: [PATCH] Bug 450080 - Add option for remote launch to stand-alone
debugger
Change-Id: Ifcbfd598d90305ac24bddf96893d4170201858c9
Signed-off-by: Marc Khouzam
Reviewed-on: https://git.eclipse.org/r/36700
Tested-by: Hudson CI
Reviewed-by: Jeff Johnston
Tested-by: Jeff Johnston
---
.../tasks/cdt_t_standalone_startup.htm | 17 +-
.../plugin.properties | 4 +
.../plugin.xml | 7 +
.../scripts/README | 15 +-
.../scripts/cdtdebug.sh | 5 +-
.../ApplicationActionBarAdvisor.java | 33 +++
.../ApplicationWorkbenchWindowAdvisor.java | 84 +++++-
.../cdt/debug/application/CoreFileDialog.java | 6 +-
.../cdt/debug/application/Messages.java | 18 +-
.../application/NewExecutableDialog.java | 6 +-
.../application/RemoteExecutableDialog.java | 251 ++++++++++++++++++
.../application/RemoteExecutableInfo.java | 70 +++++
.../cdt/debug/application/messages.properties | 21 +-
.../application/DebugRemoteExecutable.java | 86 ++++++
.../DebugRemoteExecutableHandler.java | 67 +++++
15 files changed, 671 insertions(+), 19 deletions(-)
create mode 100644 debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/RemoteExecutableDialog.java
create mode 100644 debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/RemoteExecutableInfo.java
create mode 100644 debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/internal/debug/application/DebugRemoteExecutable.java
create mode 100644 debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/internal/debug/application/DebugRemoteExecutableHandler.java
diff --git a/debug/org.eclipse.cdt.debug.application.doc/tasks/cdt_t_standalone_startup.htm b/debug/org.eclipse.cdt.debug.application.doc/tasks/cdt_t_standalone_startup.htm
index d88f34d9313..faaf1261120 100644
--- a/debug/org.eclipse.cdt.debug.application.doc/tasks/cdt_t_standalone_startup.htm
+++ b/debug/org.eclipse.cdt.debug.application.doc/tasks/cdt_t_standalone_startup.htm
@@ -49,6 +49,21 @@ as desired. If the executable location you specify is invalid or no executable
a dialog will be brought up to allow you to enter the required information. The dialog will be appropriate to whether
you have selected to debug a core file (-c specified) or not.
+-r <addr:port>
+This option specified a hostname or IP address and and IP port to connect to to perform remote debugging.
+The gdbserver must be running on the target and waiting for a connection on the specified port.
+This option can be used at the same time as the -a option. In such a case
+a Remote-Attach session will be started allowing the user to attach to
+different processes on the remote target. The user will need to press
+the 'connect' button or use the context-menu of the Debug view to choose one or more processes
+to attach to. In this case the -e flag is optional, and when not specified,
+a dialog will be used instead to prompt for the binary's location.
+This option, when used without -a, will trigger a manual Remote debugging session towards
+a single, pre-selected binary and therefore requires the use of the -e option
+to specify the location of the binary on the local machine that matches the one on the
+remote target.
+
+
Automated Set-up
As mentioned, the Stand-alone Debugger will initialize Eclipse objects on your behalf on
@@ -99,4 +114,4 @@ View such as gdb settings (e.g. gdb path, reverse debugging) and environment var