1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-06 17:26:01 +02:00

Fix for Bug 467930

- creating a Container launch configuration in Debug Launch
  Configurations View does not work
- problem is that the ContainerTab was not setting the connectionUri
  by default
- also set Remote Attribute which is needed for Container launch
  to properly connect with gdbserver in Docker Container

Change-Id: Ifb25b1cfcc8d4e3ac2c67b60a0072463774b108f
This commit is contained in:
Jeff Johnston 2015-05-21 17:33:26 -04:00
parent 021fc9cc0e
commit 7215298c66
2 changed files with 19 additions and 0 deletions

View file

@ -246,6 +246,9 @@ public class ContainerLaunchConfigurationDelegate extends GdbLaunchDelegate
wc.setAttribute( wc.setAttribute(
IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP, IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP,
true); true);
wc.setAttribute(
ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
wc.setAttribute(IGDBLaunchConfigurationConstants.ATTR_HOST, wc.setAttribute(IGDBLaunchConfigurationConstants.ATTR_HOST,
job.getIpAddress()); job.getIpAddress());
wc.setAttribute(IGDBLaunchConfigurationConstants.ATTR_PORT, wc.setAttribute(IGDBLaunchConfigurationConstants.ATTR_PORT,

View file

@ -410,6 +410,22 @@ public class ContainerTab extends AbstractLaunchConfigurationTab implements
directoriesList.setItems(additionalDirs.toArray(new String[0])); directoriesList.setItems(additionalDirs.toArray(new String[0]));
connectionUri = configuration.getAttribute( connectionUri = configuration.getAttribute(
ILaunchConstants.ATTR_CONNECTION_URI, (String) ""); ILaunchConstants.ATTR_CONNECTION_URI, (String) "");
int defaultIndex = 0;
connections = DockerConnectionManager.getInstance()
.getConnections();
if (connections.length > 0) {
if (!connectionUri.equals("")) { //$NON-NLS-1$
String[] connectionNames = new String[connections.length];
for (int i = 0; i < connections.length; ++i) {
connectionNames[i] = connections[i].getName();
if (connections[i].getUri().equals(connectionUri))
defaultIndex = i;
}
connectionSelector.select(defaultIndex);
} else {
connectionUri = connections[0].getUri();
}
}
imageName = configuration.getAttribute(ILaunchConstants.ATTR_IMAGE, imageName = configuration.getAttribute(ILaunchConstants.ATTR_IMAGE,
""); "");
imageCombo.setText(imageName); imageCombo.setText(imageName);