1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-10 12:03:16 +02:00

Bug 547881 - Allow targets to set ATTR_REMOTE_TCP

Adds support for this attribute in the ILaunchTarget attributes and
then convert it to the boolean attribute on the launch config.

Change-Id: Ieefa6892641517ff0fa6a0a04f63a6a8dbc35bf4
This commit is contained in:
Doug Schaefer 2019-06-03 14:15:22 -04:00
parent 6a27da170f
commit 83792f71bd
2 changed files with 14 additions and 4 deletions

View file

@ -551,10 +551,15 @@ public class GDBProcesses_7_2 extends GDBProcesses_7_1 implements IMultiTerminat
ILaunchTarget target = ((ITargetedLaunch) launch).getLaunchTarget();
if (target != null) {
attributes.putAll(target.getAttributes());
String tcp = target.getAttribute(IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP, ""); //$NON-NLS-1$
if (!tcp.isEmpty()) {
attributes.put(IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP, Boolean.parseBoolean(tcp));
} else {
attributes.put(IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP,
target.getTypeId().equals(GDBRemoteTCPLaunchTargetProvider.TYPE_ID));
}
}
}
boolean isTcpConnection = CDebugUtils.getAttribute(attributes,
IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP, false);

View file

@ -443,10 +443,15 @@ public class GDBControl extends AbstractMIControl implements IGDBControl {
ILaunchTarget target = ((ITargetedLaunch) launch).getLaunchTarget();
if (target != null) {
attributes.putAll(target.getAttributes());
String tcp = target.getAttribute(IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP, ""); //$NON-NLS-1$
if (!tcp.isEmpty()) {
attributes.put(IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP, Boolean.parseBoolean(tcp));
} else {
attributes.put(IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP,
target.getTypeId().equals(GDBRemoteTCPLaunchTargetProvider.TYPE_ID));
}
}
}
// We need a RequestMonitorWithProgress, if we don't have one, we create one.
IProgressMonitor monitor = (rm instanceof RequestMonitorWithProgress)