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

[575317] CDT Debugger fails to start in Eclipse Flatpak

'/tcp' suffix is not supported anymore with 'gdb',
so an IP address should be in form of HOST:PORT
(and not of HOST:PORT/PROTOCOL)

See: https://github.com/flathub/org.eclipse.Java/issues/36

Change-Id: I9eedc450da0d39305fc5d4cde851eb991c3c31f0
Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
This commit is contained in:
Victor Rubezhny 2021-08-09 17:25:29 +02:00
parent 0092d1cb4d
commit 8fa72d559f

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020 Red Hat and others.
* Copyright (c) 2020, 2021 Red Hat and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@ -140,7 +140,12 @@ public class FlatpakLaunch {
String gdbserverPortNumber = configuration.getAttribute(IGDBFlatpakLaunchConstants.ATTR_GDBSERVER_PORT,
IGDBFlatpakLaunchConstants.ATTR_GDBSERVER_PORT_DEFAULT);
String gdbserverPort = gdbserverPortNumber + "/tcp"; //$NON-NLS-1$
// Do not modify port string value by adding any suffix like `/tcp`, to the port string,
// keeping it clean port number value on order to make NODE:PORT-like address string later
// when a DGB launch is created
// See: https://github.com/flathub/org.eclipse.Java/issues/36
String gdbserverPort = gdbserverPortNumber;
String gdbserverCommand = configuration.getAttribute(IGDBFlatpakLaunchConstants.ATTR_GDBSERVER_COMMAND,
IGDBFlatpakLaunchConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);