diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java index d1ce72b90d9..98e43c98481 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java @@ -551,8 +551,13 @@ public class GDBProcesses_7_2 extends GDBProcesses_7_1 implements IMultiTerminat ILaunchTarget target = ((ITargetedLaunch) launch).getLaunchTarget(); if (target != null) { attributes.putAll(target.getAttributes()); - attributes.put(IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP, - target.getTypeId().equals(GDBRemoteTCPLaunchTargetProvider.TYPE_ID)); + 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)); + } } } diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java index 590e71bbe4b..16c45b0a9b5 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java @@ -443,8 +443,13 @@ public class GDBControl extends AbstractMIControl implements IGDBControl { ILaunchTarget target = ((ITargetedLaunch) launch).getLaunchTarget(); if (target != null) { attributes.putAll(target.getAttributes()); - attributes.put(IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP, - target.getTypeId().equals(GDBRemoteTCPLaunchTargetProvider.TYPE_ID)); + 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)); + } } }