Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2015-06-19 01:38:55 -0400
committerUwe Stieber2015-06-19 01:38:55 -0400
commit0b2e63e5a6ee7e6bf59d6631c9b19f45723fe474 (patch)
treefb0b166d748317f30b14445c70d01849e76797ef /target_explorer
parent70fb3a752329858915a5fbd855bdd29e48010e3f (diff)
downloadorg.eclipse.tcf-0b2e63e5a6ee7e6bf59d6631c9b19f45723fe474.tar.gz
org.eclipse.tcf-0b2e63e5a6ee7e6bf59d6631c9b19f45723fe474.tar.xz
org.eclipse.tcf-0b2e63e5a6ee7e6bf59d6631c9b19f45723fe474.zip
Target Explorer: Improve gdbserver output terminal title
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TEGdbAbstractLaunchDelegate.java8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TERunLaunchDelegate.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TEHelper.java12
3 files changed, 13 insertions, 9 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TEGdbAbstractLaunchDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TEGdbAbstractLaunchDelegate.java
index c05e05549..78d450206 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TEGdbAbstractLaunchDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TEGdbAbstractLaunchDelegate.java
@@ -173,7 +173,7 @@ public abstract class TEGdbAbstractLaunchDelegate extends GdbLaunchDelegate {
String arguments = getProgramArguments(config);
String prelaunchCmd = config.getAttribute(IRemoteTEConfigurationConstants.ATTR_PRERUN_COMMANDS, ""); //$NON-NLS-1$
- TEHelper.launchCmd(peer, prelaunchCmd, null, new SubProgressMonitor(monitor, 2), new Callback());
+ TEHelper.launchCmd(peer, null, prelaunchCmd, null, new SubProgressMonitor(monitor, 2), new Callback());
if (arguments != null && !arguments.equals("")) { //$NON-NLS-1$
commandArguments += " " + arguments; //$NON-NLS-1$
@@ -249,7 +249,11 @@ public abstract class TEGdbAbstractLaunchDelegate extends GdbLaunchDelegate {
}
};
- launcher = TEHelper.launchCmd(peer, gdbserverCommand, commandArguments, listener, new SubProgressMonitor(monitor, 3), callback);
+ String peerName = null;
+ if (remotePID != null) {
+ peerName = peer.getName() + ", PID " + remotePID; //$NON-NLS-1$
+ }
+ launcher = TEHelper.launchCmd(peer, peerName, gdbserverCommand, commandArguments, listener, new SubProgressMonitor(monitor, 3), callback);
// Now wait until gdbserver is up and running on the remote host
while (!gdbServerReady.get() && !gdbServerExited.get()) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TERunLaunchDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TERunLaunchDelegate.java
index b8260bb79..19aa36f08 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TERunLaunchDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TERunLaunchDelegate.java
@@ -60,7 +60,7 @@ public class TERunLaunchDelegate extends AbstractCLaunchDelegate {
String arguments = getProgramArguments(config);
String prelaunchCmd = config.getAttribute(IRemoteTEConfigurationConstants.ATTR_PRERUN_COMMANDS, ""); //$NON-NLS-1$
- TEHelper.launchCmd(peer, prelaunchCmd, null, new SubProgressMonitor(monitor, 2), new Callback());
+ TEHelper.launchCmd(peer, null, prelaunchCmd, null, new SubProgressMonitor(monitor, 2), new Callback());
new TERunProcess(launch, remoteExePath, arguments, renderProcessLabel(exePath.toOSString()), peer, new SubProgressMonitor(monitor, 20));
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TEHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TEHelper.java
index e262efcab..356a75dd7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TEHelper.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TEHelper.java
@@ -170,7 +170,7 @@ public class TEHelper {
return connection;
}
- public static ProcessLauncher launchCmd(final IPeer peer, String command, Listener listener, SubProgressMonitor monitor, ICallback callback) throws CoreException {
+ public static ProcessLauncher launchCmd(final IPeer peer, String peerName, String command, Listener listener, SubProgressMonitor monitor, ICallback callback) throws CoreException {
if (command != null && !command.trim().equals("")) { //$NON-NLS-1$
String[] args = StringUtil.tokenize(command, 0, true);
if (args.length > 0) {
@@ -179,18 +179,18 @@ public class TEHelper {
if (args.length > 1) {
arguments = Arrays.copyOfRange(args, 1, args.length);
}
- return launchCmd(peer, cmd, arguments, listener, monitor, callback);
+ return launchCmd(peer, peerName, cmd, arguments, listener, monitor, callback);
}
}
return null;
}
- public static ProcessLauncher launchCmd(final IPeer peer, String remoteCommandPath, String arguments, Listener listener, SubProgressMonitor monitor, ICallback callback) throws CoreException {
+ public static ProcessLauncher launchCmd(final IPeer peer, String peerName, String remoteCommandPath, String arguments, Listener listener, SubProgressMonitor monitor, ICallback callback) throws CoreException {
String[] args = arguments != null && !"".equals(arguments.trim()) ? StringUtil.tokenize(arguments, 0, true) : null; //$NON-NLS-1$
- return launchCmd(peer, remoteCommandPath, args, listener, monitor, callback);
+ return launchCmd(peer, peerName, remoteCommandPath, args, listener, monitor, callback);
}
- public static ProcessLauncher launchCmd(final IPeer peer, String remoteCommandPath, String[] args, Listener listener, SubProgressMonitor monitor, ICallback callback) throws CoreException {
+ public static ProcessLauncher launchCmd(final IPeer peer, String peerName, String remoteCommandPath, String[] args, Listener listener, SubProgressMonitor monitor, ICallback callback) throws CoreException {
if (remoteCommandPath != null && !remoteCommandPath.trim().equals("")) { //$NON-NLS-1$
monitor.beginTask(NLS.bind(Messages.TEHelper_executing, remoteCommandPath, args), 10);
@@ -218,7 +218,7 @@ public class TEHelper {
}
}
- String name = peer.getName();
+ String name = peerName != null ? peerName : peer.getName();
if (name != null && !"".equals(name)) { //$NON-NLS-1$
title.append(" [" + name + "]"); //$NON-NLS-1$ //$NON-NLS-2$
}

Back to the top