mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Bug 566462: Eliminate deprecated network-oriented API
Device contributions should now extend DefaultGDBJtagConnectionImpl and provide default connection details in the JTagDevice extension declaration. Launch configurations providing legacy connection data (ipAddress and portNumber) are accommodated at launch and upgraded to use connection URIs when edited. Change-Id: I36b5d3e49f1d8f0becf1b898b7a48eb239453f1b
This commit is contained in:
parent
4376632208
commit
eee4440071
15 changed files with 88 additions and 231 deletions
|
@ -213,23 +213,27 @@ public class DapGdbJtagLaunchDelegate extends DapLaunchDelegate {
|
||||||
IGDBJtagConstants.DEFAULT_USE_REMOTE_TARGET)) {
|
IGDBJtagConstants.DEFAULT_USE_REMOTE_TARGET)) {
|
||||||
List<String> commands = new ArrayList<>();
|
List<String> commands = new ArrayList<>();
|
||||||
if (jtagDevice instanceof IGDBJtagConnection) {
|
if (jtagDevice instanceof IGDBJtagConnection) {
|
||||||
URI uri;
|
String connection = IGDBJtagConstants.DEFAULT_CONNECTION;
|
||||||
try {
|
String connectionUri = CDebugUtils.getAttribute(attributes, IGDBJtagConstants.ATTR_CONNECTION,
|
||||||
uri = new URI(CDebugUtils.getAttribute(attributes, IGDBJtagConstants.ATTR_CONNECTION,
|
IGDBJtagConstants.DEFAULT_CONNECTION);
|
||||||
IGDBJtagConstants.DEFAULT_CONNECTION));
|
if (!IGDBJtagConstants.DEFAULT_CONNECTION.equals(connectionUri)) {
|
||||||
} catch (URISyntaxException e) {
|
try {
|
||||||
throw newCoreException("Invalid remote target connection syntax", e);
|
connection = new URI(connectionUri).getSchemeSpecificPart();
|
||||||
|
} catch (URISyntaxException e) {
|
||||||
|
throw newCoreException("Invalid remote target connection syntax", e);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Handle legacy launch configurations
|
||||||
|
String ipAddress = CDebugUtils.getAttribute(attributes, IGDBJtagConstants.ATTR_IP_ADDRESS,
|
||||||
|
IGDBJtagConstants.DEFAULT_IP_ADDRESS);
|
||||||
|
int portNumber = CDebugUtils.getAttribute(attributes, IGDBJtagConstants.ATTR_PORT_NUMBER,
|
||||||
|
IGDBJtagConstants.DEFAULT_PORT_NUMBER);
|
||||||
|
if (!IGDBJtagConstants.DEFAULT_IP_ADDRESS.equals(ipAddress)) {
|
||||||
|
connection = String.format("%s:%d", ipAddress, portNumber); //$NON-NLS-1$
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IGDBJtagConnection device = (IGDBJtagConnection) jtagDevice;
|
IGDBJtagConnection device = (IGDBJtagConnection) jtagDevice;
|
||||||
device.doRemote(uri.getSchemeSpecificPart(), commands);
|
device.doRemote(connection, commands);
|
||||||
} else {
|
|
||||||
// Handle legacy network device contributions that don't understand URIs
|
|
||||||
String ipAddress = CDebugUtils.getAttribute(attributes, IGDBJtagConstants.ATTR_IP_ADDRESS,
|
|
||||||
IGDBJtagConstants.DEFAULT_IP_ADDRESS);
|
|
||||||
int portNumber = CDebugUtils.getAttribute(attributes, IGDBJtagConstants.ATTR_PORT_NUMBER,
|
|
||||||
IGDBJtagConstants.DEFAULT_PORT_NUMBER);
|
|
||||||
jtagDevice.doRemote(ipAddress, portNumber, commands);
|
|
||||||
}
|
}
|
||||||
target.put(CONNECT_COMMANDS, commands);
|
target.put(CONNECT_COMMANDS, commands);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,16 +27,19 @@
|
||||||
point="org.eclipse.cdt.debug.gdbjtag.core.JTagDevice">
|
point="org.eclipse.cdt.debug.gdbjtag.core.JTagDevice">
|
||||||
<device
|
<device
|
||||||
class="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.GenericDevice"
|
class="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.GenericDevice"
|
||||||
|
default_connection="localhost:10000"
|
||||||
id="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.genericDevice"
|
id="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.genericDevice"
|
||||||
name="%Generic.name">
|
name="%Generic.name">
|
||||||
</device>
|
</device>
|
||||||
<device
|
<device
|
||||||
class="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.AbatronBDI2000"
|
class="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.AbatronBDI2000"
|
||||||
|
default_connection="bdi2000:2001"
|
||||||
id="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.AbatronBDI2000"
|
id="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.AbatronBDI2000"
|
||||||
name="%AbatronBDI2000.name">
|
name="%AbatronBDI2000.name">
|
||||||
</device>
|
</device>
|
||||||
<device
|
<device
|
||||||
class="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.MacraigorUsb2Demon"
|
class="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.MacraigorUsb2Demon"
|
||||||
|
default_connection="localhost:8888"
|
||||||
id="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.MacraigorUsb2Demon"
|
id="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.MacraigorUsb2Demon"
|
||||||
name="%MacraigorUsb2Demon.name">
|
name="%MacraigorUsb2Demon.name">
|
||||||
</device>
|
</device>
|
||||||
|
@ -54,21 +57,25 @@
|
||||||
</device>
|
</device>
|
||||||
<device
|
<device
|
||||||
class="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.OpenOCDSocket"
|
class="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.OpenOCDSocket"
|
||||||
|
default_connection="localhost:3333"
|
||||||
id="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.OpenOCDSocket"
|
id="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.OpenOCDSocket"
|
||||||
name="%OpenOCDSocket.name">
|
name="%OpenOCDSocket.name">
|
||||||
</device>
|
</device>
|
||||||
<device
|
<device
|
||||||
class="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.PEMicro"
|
class="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.PEMicro"
|
||||||
|
default_connection="localhost:7224"
|
||||||
id="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.PEMicro"
|
id="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.PEMicro"
|
||||||
name="%PEMicro.name">
|
name="%PEMicro.name">
|
||||||
</device>
|
</device>
|
||||||
<device
|
<device
|
||||||
class="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.SeggerJLink"
|
class="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.SeggerJLink"
|
||||||
|
default_connection="localhost:2331"
|
||||||
id="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.SeggerJLink"
|
id="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.SeggerJLink"
|
||||||
name="%SeggerJLink.name">
|
name="%SeggerJLink.name">
|
||||||
</device>
|
</device>
|
||||||
<device
|
<device
|
||||||
class="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.STLink"
|
class="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.STLink"
|
||||||
|
default_connection="localhost:61234"
|
||||||
id="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.STLink"
|
id="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.STLink"
|
||||||
name="%STLink.name">
|
name="%STLink.name">
|
||||||
</device>
|
</device>
|
||||||
|
|
|
@ -378,7 +378,6 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
|
||||||
* Hook up to remote target
|
* Hook up to remote target
|
||||||
*/
|
*/
|
||||||
/** @since 8.2 */
|
/** @since 8.2 */
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Execute
|
@Execute
|
||||||
public void stepConnectToTarget(final RequestMonitor rm) {
|
public void stepConnectToTarget(final RequestMonitor rm) {
|
||||||
try {
|
try {
|
||||||
|
@ -386,19 +385,27 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
|
||||||
IGDBJtagConstants.DEFAULT_USE_REMOTE_TARGET)) {
|
IGDBJtagConstants.DEFAULT_USE_REMOTE_TARGET)) {
|
||||||
List<String> commands = new ArrayList<>();
|
List<String> commands = new ArrayList<>();
|
||||||
if (fGdbJtagDevice instanceof IGDBJtagConnection) {
|
if (fGdbJtagDevice instanceof IGDBJtagConnection) {
|
||||||
URI uri = new URI(CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_CONNECTION,
|
String connection = IGDBJtagConstants.DEFAULT_CONNECTION;
|
||||||
IGDBJtagConstants.DEFAULT_CONNECTION));
|
String connectionUri = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_CONNECTION,
|
||||||
|
IGDBJtagConstants.DEFAULT_CONNECTION);
|
||||||
|
if (!IGDBJtagConstants.DEFAULT_CONNECTION.equals(connectionUri)) {
|
||||||
|
connection = new URI(connectionUri).getSchemeSpecificPart();
|
||||||
|
} else {
|
||||||
|
// Handle legacy launch configurations
|
||||||
|
String ipAddress = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_IP_ADDRESS,
|
||||||
|
IGDBJtagConstants.DEFAULT_IP_ADDRESS);
|
||||||
|
int portNumber = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_PORT_NUMBER,
|
||||||
|
IGDBJtagConstants.DEFAULT_PORT_NUMBER);
|
||||||
|
if (!IGDBJtagConstants.DEFAULT_IP_ADDRESS.equals(ipAddress)) {
|
||||||
|
connection = String.format("%s:%d", ipAddress, portNumber); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
}
|
||||||
IGDBJtagConnection device = (IGDBJtagConnection) fGdbJtagDevice;
|
IGDBJtagConnection device = (IGDBJtagConnection) fGdbJtagDevice;
|
||||||
device.doRemote(uri.getSchemeSpecificPart(), commands);
|
device.doRemote(connection, commands);
|
||||||
|
queueCommands(commands, rm);
|
||||||
} else {
|
} else {
|
||||||
// Handle legacy network device contributions that don't understand URIs
|
rm.done();
|
||||||
String ipAddress = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_IP_ADDRESS,
|
|
||||||
IGDBJtagConstants.DEFAULT_IP_ADDRESS);
|
|
||||||
int portNumber = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_PORT_NUMBER,
|
|
||||||
IGDBJtagConstants.DEFAULT_PORT_NUMBER);
|
|
||||||
fGdbJtagDevice.doRemote(ipAddress, portNumber, commands);
|
|
||||||
}
|
}
|
||||||
queueCommands(commands, rm);
|
|
||||||
} else {
|
} else {
|
||||||
rm.done();
|
rm.done();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008, 2019 QNX Software Systems and others.
|
* Copyright (c) 2008, 2020 QNX Software Systems and others.
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials
|
* This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License 2.0
|
* are made available under the terms of the Eclipse Public License 2.0
|
||||||
|
@ -12,22 +12,13 @@
|
||||||
* QNX Software Systems - Initial API and implementation
|
* QNX Software Systems - Initial API and implementation
|
||||||
* Andy Jin - Hardware debugging UI improvements, bug 229946
|
* Andy Jin - Hardware debugging UI improvements, bug 229946
|
||||||
* John Dallaway - Provide 'reset and halt' command, bug 550963
|
* John Dallaway - Provide 'reset and halt' command, bug 550963
|
||||||
|
* John Dallaway - Eliminate deprecated API, bug 566462
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
public class AbatronBDI2000 extends DefaultGDBJtagDeviceImpl {
|
public class AbatronBDI2000 extends DefaultGDBJtagConnectionImpl {
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDefaultIpAddress() {
|
|
||||||
return "bdi2000"; //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDefaultPortNumber() {
|
|
||||||
return "2001"; //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doResetAndHalt(Collection<String> commands) {
|
public void doResetAndHalt(Collection<String> commands) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2010, 2012 Sage Electronic Engineering and others.
|
* Copyright (c) 2010, 2020 Sage Electronic Engineering and others.
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials
|
* This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License 2.0
|
* are made available under the terms of the Eclipse Public License 2.0
|
||||||
|
@ -12,6 +12,7 @@
|
||||||
* Bruce Griffith,Sage Electronic Engineering, LLC - bug 305943
|
* Bruce Griffith,Sage Electronic Engineering, LLC - bug 305943
|
||||||
* - API generalization to become transport-independent (e.g. to
|
* - API generalization to become transport-independent (e.g. to
|
||||||
* allow connections via serial ports and pipes).
|
* allow connections via serial ports and pipes).
|
||||||
|
* John Dallaway - Eliminate deprecated API - bug 566462
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
||||||
|
@ -51,14 +52,4 @@ public class DefaultGDBJtagConnectionImpl extends DefaultGDBJtagDeviceImpl imple
|
||||||
return connection;
|
return connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDefaultIpAddress() {
|
|
||||||
throw new UnsupportedOperationException();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDefaultPortNumber() {
|
|
||||||
throw new UnsupportedOperationException();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008, 2017 QNX Software Systems and others.
|
* Copyright (c) 2008, 2020 QNX Software Systems and others.
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials
|
* This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License 2.0
|
* are made available under the terms of the Eclipse Public License 2.0
|
||||||
|
@ -12,6 +12,7 @@
|
||||||
* QNX Software Systems - Initial API and implementation
|
* QNX Software Systems - Initial API and implementation
|
||||||
* Andy Jin - Hardware debugging UI improvements, bug 229946
|
* Andy Jin - Hardware debugging UI improvements, bug 229946
|
||||||
* John Dallaway - Use GDB/MI for temporary breakpoint, bug 525726
|
* John Dallaway - Use GDB/MI for temporary breakpoint, bug 525726
|
||||||
|
* John Dallaway - Eliminate deprecated API, bug 566462
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
||||||
|
@ -46,17 +47,6 @@ public class DefaultGDBJtagDeviceImpl implements IGDBJtagDevice {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void doRemote(String ip, int port, Collection<String> commands) {
|
|
||||||
// The CLI version (target remote) does not let us know
|
|
||||||
// that we have properly connected. For older GDBs (<= 6.8)
|
|
||||||
// we need this information for a DSF session.
|
|
||||||
// The MI version does tell us, which is why we must use it
|
|
||||||
// Bug 348043
|
|
||||||
String cmd = "-target-select remote " + ip + ":" + String.valueOf(port); //$NON-NLS-1$ //$NON-NLS-2$
|
|
||||||
addCmd(commands, cmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doHalt(Collection<String> commands) {
|
public void doHalt(Collection<String> commands) {
|
||||||
String cmd = "monitor halt"; //$NON-NLS-1$
|
String cmd = "monitor halt"; //$NON-NLS-1$
|
||||||
|
@ -116,14 +106,4 @@ public class DefaultGDBJtagDeviceImpl implements IGDBJtagDevice {
|
||||||
commands.add(cmd + LINESEP);
|
commands.add(cmd + LINESEP);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDefaultIpAddress() {
|
|
||||||
return "localhost"; //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDefaultPortNumber() {
|
|
||||||
return "10000"; //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008 - 2010 QNX Software Systems and others.
|
* Copyright (c) 2008 - 2020 QNX Software Systems and others.
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials
|
* This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License 2.0
|
* are made available under the terms of the Eclipse Public License 2.0
|
||||||
|
@ -14,6 +14,7 @@
|
||||||
* Bruce Griffith, Sage Electronic Engineering, LLC - bug 305943
|
* Bruce Griffith, Sage Electronic Engineering, LLC - bug 305943
|
||||||
* - API generalization to become transport-independent (allow
|
* - API generalization to become transport-independent (allow
|
||||||
* connections via serial ports and pipes).
|
* connections via serial ports and pipes).
|
||||||
|
* John Dallaway - Eliminate deprecated API - bug 566462
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
||||||
|
|
||||||
|
@ -95,7 +96,7 @@ public class GDBJtagDeviceContribution {
|
||||||
return device;
|
return device;
|
||||||
Object o = null;
|
Object o = null;
|
||||||
try {
|
try {
|
||||||
o = Platform.getBundle(deviceClassBundleName).loadClass(deviceClassName).newInstance();
|
o = Platform.getBundle(deviceClassBundleName).loadClass(deviceClassName).getConstructor().newInstance();
|
||||||
if (o instanceof IGDBJtagConnection) {
|
if (o instanceof IGDBJtagConnection) {
|
||||||
((IGDBJtagConnection) o).setDefaultDeviceConnection(deviceDefaultConnection);
|
((IGDBJtagConnection) o).setDefaultDeviceConnection(deviceDefaultConnection);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008, 2012 QNX Software Systems and others.
|
* Copyright (c) 2008, 2020 QNX Software Systems and others.
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials
|
* This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License 2.0
|
* are made available under the terms of the Eclipse Public License 2.0
|
||||||
|
@ -11,12 +11,13 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* QNX Software Systems - Initial API and implementation
|
* QNX Software Systems - Initial API and implementation
|
||||||
* Andy Jin - Hardware debugging UI improvements, bug 229946
|
* Andy Jin - Hardware debugging UI improvements, bug 229946
|
||||||
|
* John Dallaway - Eliminate deprecated API, bug 566462
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
public class GenericDevice extends DefaultGDBJtagDeviceImpl {
|
public class GenericDevice extends DefaultGDBJtagConnectionImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doDelay(int delay, Collection<String> commands) {
|
public void doDelay(int delay, Collection<String> commands) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008, 2019 QNX Software Systems and others.
|
* Copyright (c) 2008, 2020 QNX Software Systems and others.
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials
|
* This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License 2.0
|
* are made available under the terms of the Eclipse Public License 2.0
|
||||||
|
@ -12,6 +12,7 @@
|
||||||
* QNX Software Systems - Initial API and implementation
|
* QNX Software Systems - Initial API and implementation
|
||||||
* Andy Jin - Hardware debugging UI improvements, bug 229946
|
* Andy Jin - Hardware debugging UI improvements, bug 229946
|
||||||
* John Dallaway - Support 'reset and halt' command, bug 535163
|
* John Dallaway - Support 'reset and halt' command, bug 535163
|
||||||
|
* John Dallaway - Eliminate deprecated API, bug 566462
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
||||||
|
@ -83,25 +84,6 @@ public interface IGDBJtagDevice {
|
||||||
/* override where supported by debugger */
|
/* override where supported by debugger */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Commands to connect to remote JTAG device
|
|
||||||
*
|
|
||||||
* @param ip
|
|
||||||
* host name of IP address of JTAG device
|
|
||||||
* @param port
|
|
||||||
* TCP socket port number of JTAG device
|
|
||||||
* @param commands
|
|
||||||
* implementation should populate the collection with the gdb
|
|
||||||
* commands that will connect to the device, or leave the
|
|
||||||
* collection as-is if that operation is either unsupported or
|
|
||||||
* not applicable
|
|
||||||
* @deprecated an implementor should adapt to IGDBJtagConnection instead of
|
|
||||||
* implementing this method (implementation should throw
|
|
||||||
* UnsupportedOperationException)
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public void doRemote(String ip, int port, Collection<String> commands);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Commands to download the executable binary to target
|
* Commands to download the executable binary to target
|
||||||
*
|
*
|
||||||
|
@ -169,25 +151,4 @@ public interface IGDBJtagDevice {
|
||||||
*/
|
*/
|
||||||
public void doContinue(Collection<String> commands);
|
public void doContinue(Collection<String> commands);
|
||||||
|
|
||||||
/**
|
|
||||||
* Device specific default hostname of IP address
|
|
||||||
*
|
|
||||||
* @return default hostname of IP address
|
|
||||||
* @deprecated an implementor should adapt to IGDBJtagConnection instead of
|
|
||||||
* implementing this method (implementation should throw
|
|
||||||
* UnsupportedOperationException)
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public String getDefaultIpAddress();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Device specific default port number
|
|
||||||
*
|
|
||||||
* @return default port number
|
|
||||||
* @deprecated an implementor should adapt to IGDBJtagConnection instead of
|
|
||||||
* implementing this method (implementation should throw
|
|
||||||
* UnsupportedOperationException)
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public String getDefaultPortNumber();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008, 2019 QNX Software Systems and others.
|
* Copyright (c) 2008, 2020 QNX Software Systems and others.
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials
|
* This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License 2.0
|
* are made available under the terms of the Eclipse Public License 2.0
|
||||||
|
@ -12,6 +12,7 @@
|
||||||
* QNX Software Systems - Initial API and implementation
|
* QNX Software Systems - Initial API and implementation
|
||||||
* Andy Jin - Hardware debugging UI improvements, bug 229946
|
* Andy Jin - Hardware debugging UI improvements, bug 229946
|
||||||
* John Dallaway - Provide 'reset and halt' command, bug 550963
|
* John Dallaway - Provide 'reset and halt' command, bug 550963
|
||||||
|
* John Dallaway - Eliminate deprecated API, bug 566462
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
||||||
|
|
||||||
|
@ -21,12 +22,7 @@ import java.util.Collection;
|
||||||
* @author ajin
|
* @author ajin
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class MacraigorUsb2Demon extends DefaultGDBJtagDeviceImpl {
|
public class MacraigorUsb2Demon extends DefaultGDBJtagConnectionImpl {
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDefaultPortNumber() {
|
|
||||||
return "8888"; //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doDelay(int delay, Collection<String> commands) {
|
public void doDelay(int delay, Collection<String> commands) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008, 2019 QNX Software Systems and others.
|
* Copyright (c) 2008, 2020 QNX Software Systems and others.
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials
|
* This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License 2.0
|
* are made available under the terms of the Eclipse Public License 2.0
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
* Andy Jin - Hardware debugging UI improvements, bug 229946
|
* Andy Jin - Hardware debugging UI improvements, bug 229946
|
||||||
* John Dallaway - OpenOCD extensions, bug 494059
|
* John Dallaway - OpenOCD extensions, bug 494059
|
||||||
* John Dallaway - Provide 'reset and halt' command, bug 550963
|
* John Dallaway - Provide 'reset and halt' command, bug 550963
|
||||||
|
* John Dallaway - Eliminate deprecated API, bug 566462
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
||||||
|
|
||||||
|
@ -21,12 +22,7 @@ import java.util.Collection;
|
||||||
/**
|
/**
|
||||||
* @since 9.2
|
* @since 9.2
|
||||||
*/
|
*/
|
||||||
public class OpenOCDSocket extends DefaultGDBJtagDeviceImpl {
|
public class OpenOCDSocket extends DefaultGDBJtagConnectionImpl {
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDefaultPortNumber() {
|
|
||||||
return "3333"; //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doDelay(int delay, Collection<String> commands) {
|
public void doDelay(int delay, Collection<String> commands) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008, 2019 QNX Software Systems and others.
|
* Copyright (c) 2008, 2020 QNX Software Systems and others.
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials
|
* This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License 2.0
|
* are made available under the terms of the Eclipse Public License 2.0
|
||||||
|
@ -12,6 +12,7 @@
|
||||||
* QNX Software Systems - Initial API and implementation
|
* QNX Software Systems - Initial API and implementation
|
||||||
* Andy Jin - Hardware debugging UI improvements, bug 229946
|
* Andy Jin - Hardware debugging UI improvements, bug 229946
|
||||||
* John Dallaway - PEmicro extension, bug 552597
|
* John Dallaway - PEmicro extension, bug 552597
|
||||||
|
* John Dallaway - Eliminate deprecated API, bug 566462
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
||||||
|
|
||||||
|
@ -20,12 +21,7 @@ import java.util.Collection;
|
||||||
/**
|
/**
|
||||||
* @since 9.4
|
* @since 9.4
|
||||||
*/
|
*/
|
||||||
public class PEMicro extends DefaultGDBJtagDeviceImpl {
|
public class PEMicro extends DefaultGDBJtagConnectionImpl {
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDefaultPortNumber() {
|
|
||||||
return "7224"; //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doDelay(int delay, Collection<String> commands) {
|
public void doDelay(int delay, Collection<String> commands) {
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
* QNX Software Systems - Initial API and implementation
|
* QNX Software Systems - Initial API and implementation
|
||||||
* Andy Jin - Hardware debugging UI improvements, bug 229946
|
* Andy Jin - Hardware debugging UI improvements, bug 229946
|
||||||
* John Dallaway - ST-LINK extension, bug 558266
|
* John Dallaway - ST-LINK extension, bug 558266
|
||||||
|
* John Dallaway - Eliminate deprecated API, bug 566462
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
||||||
|
|
||||||
|
@ -20,12 +21,7 @@ import java.util.Collection;
|
||||||
/**
|
/**
|
||||||
* @since 9.5
|
* @since 9.5
|
||||||
*/
|
*/
|
||||||
public class STLink extends DefaultGDBJtagDeviceImpl {
|
public class STLink extends DefaultGDBJtagConnectionImpl {
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDefaultPortNumber() {
|
|
||||||
return "61234"; //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doDelay(int delay, Collection<String> commands) {
|
public void doDelay(int delay, Collection<String> commands) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008, 2019 QNX Software Systems and others.
|
* Copyright (c) 2008, 2020 QNX Software Systems and others.
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials
|
* This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License 2.0
|
* are made available under the terms of the Eclipse Public License 2.0
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
* Andy Jin - Hardware debugging UI improvements, bug 229946
|
* Andy Jin - Hardware debugging UI improvements, bug 229946
|
||||||
* John Dallaway - SEGGER J-Link extension, bug 548281
|
* John Dallaway - SEGGER J-Link extension, bug 548281
|
||||||
* John Dallaway - Provide 'reset and halt' command, bug 550963
|
* John Dallaway - Provide 'reset and halt' command, bug 550963
|
||||||
|
* John Dallaway - Eliminate deprecated API, bug 566462
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
|
||||||
|
|
||||||
|
@ -21,12 +22,7 @@ import java.util.Collection;
|
||||||
/**
|
/**
|
||||||
* @since 9.3
|
* @since 9.3
|
||||||
*/
|
*/
|
||||||
public class SeggerJLink extends DefaultGDBJtagDeviceImpl {
|
public class SeggerJLink extends DefaultGDBJtagConnectionImpl {
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDefaultPortNumber() {
|
|
||||||
return "2331"; //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doDelay(int delay, Collection<String> commands) {
|
public void doDelay(int delay, Collection<String> commands) {
|
||||||
|
|
|
@ -57,8 +57,6 @@ import org.eclipse.swt.events.ModifyEvent;
|
||||||
import org.eclipse.swt.events.ModifyListener;
|
import org.eclipse.swt.events.ModifyListener;
|
||||||
import org.eclipse.swt.events.SelectionAdapter;
|
import org.eclipse.swt.events.SelectionAdapter;
|
||||||
import org.eclipse.swt.events.SelectionEvent;
|
import org.eclipse.swt.events.SelectionEvent;
|
||||||
import org.eclipse.swt.events.VerifyEvent;
|
|
||||||
import org.eclipse.swt.events.VerifyListener;
|
|
||||||
import org.eclipse.swt.graphics.Image;
|
import org.eclipse.swt.graphics.Image;
|
||||||
import org.eclipse.swt.layout.GridData;
|
import org.eclipse.swt.layout.GridData;
|
||||||
import org.eclipse.swt.layout.GridLayout;
|
import org.eclipse.swt.layout.GridLayout;
|
||||||
|
@ -86,9 +84,6 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
|
||||||
private Combo jtagDevice;
|
private Combo jtagDevice;
|
||||||
private Composite remoteConnectionParameters;
|
private Composite remoteConnectionParameters;
|
||||||
private StackLayout remoteConnectParmsLayout;
|
private StackLayout remoteConnectParmsLayout;
|
||||||
private Composite remoteTcpipBox;
|
|
||||||
private Text ipAddress;
|
|
||||||
private Text portNumber;
|
|
||||||
private Composite remoteConnectionBox;
|
private Composite remoteConnectionBox;
|
||||||
private Text connection;
|
private Text connection;
|
||||||
private String savedJtagDevice;
|
private String savedJtagDevice;
|
||||||
|
@ -277,32 +272,6 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
|
||||||
remoteConnectionParameters.setLayout(remoteConnectParmsLayout);
|
remoteConnectionParameters.setLayout(remoteConnectParmsLayout);
|
||||||
remoteConnectionParameters.setLayoutData(GridDataFactory.swtDefaults().span(2, 1).create());
|
remoteConnectionParameters.setLayoutData(GridDataFactory.swtDefaults().span(2, 1).create());
|
||||||
|
|
||||||
//
|
|
||||||
// Create entry fields for TCP/IP connections
|
|
||||||
//
|
|
||||||
|
|
||||||
{
|
|
||||||
remoteTcpipBox = new Composite(remoteConnectionParameters, SWT.NO_TRIM | SWT.NO_FOCUS);
|
|
||||||
layout = new GridLayout();
|
|
||||||
layout.numColumns = 2;
|
|
||||||
remoteTcpipBox.setLayout(layout);
|
|
||||||
remoteTcpipBox.setBackground(remoteConnectionParameters.getParent().getBackground());
|
|
||||||
|
|
||||||
label = new Label(remoteTcpipBox, SWT.NONE);
|
|
||||||
label.setText(Messages.getString("GDBJtagDebuggerTab.ipAddressLabel")); //$NON-NLS-1$
|
|
||||||
ipAddress = new Text(remoteTcpipBox, SWT.BORDER);
|
|
||||||
gd = new GridData();
|
|
||||||
gd.widthHint = 125;
|
|
||||||
ipAddress.setLayoutData(gd);
|
|
||||||
|
|
||||||
label = new Label(remoteTcpipBox, SWT.NONE);
|
|
||||||
label.setText(Messages.getString("GDBJtagDebuggerTab.portNumberLabel")); //$NON-NLS-1$
|
|
||||||
portNumber = new Text(remoteTcpipBox, SWT.BORDER);
|
|
||||||
gd = new GridData();
|
|
||||||
gd.widthHint = 125;
|
|
||||||
portNumber.setLayoutData(gd);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create entry fields for other types of connections
|
// Create entry fields for other types of connections
|
||||||
//
|
//
|
||||||
|
@ -325,26 +294,6 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
|
||||||
//
|
//
|
||||||
// Add watchers for user data entry
|
// Add watchers for user data entry
|
||||||
//
|
//
|
||||||
|
|
||||||
ipAddress.addModifyListener(new ModifyListener() {
|
|
||||||
@Override
|
|
||||||
public void modifyText(ModifyEvent e) {
|
|
||||||
scheduleUpdateJob(); // provides much better performance for Text listeners
|
|
||||||
}
|
|
||||||
});
|
|
||||||
portNumber.addVerifyListener(new VerifyListener() {
|
|
||||||
@Override
|
|
||||||
public void verifyText(VerifyEvent e) {
|
|
||||||
e.doit = Character.isDigit(e.character) || Character.isISOControl(e.character);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
portNumber.addModifyListener(new ModifyListener() {
|
|
||||||
@Override
|
|
||||||
public void modifyText(ModifyEvent e) {
|
|
||||||
scheduleUpdateJob(); // provides much better performance for Text listeners
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
connection.addModifyListener(new ModifyListener() {
|
connection.addModifyListener(new ModifyListener() {
|
||||||
@Override
|
@Override
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
|
@ -356,7 +305,6 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
|
||||||
/**
|
/**
|
||||||
* @param text
|
* @param text
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
protected void updateDeviceIpPort(String selectedDeviceName) {
|
protected void updateDeviceIpPort(String selectedDeviceName) {
|
||||||
if (selectedDeviceName.equals(savedJtagDevice)) {
|
if (selectedDeviceName.equals(savedJtagDevice)) {
|
||||||
return;
|
return;
|
||||||
|
@ -372,10 +320,6 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
|
||||||
if (selectedDevice instanceof IGDBJtagConnection) {
|
if (selectedDevice instanceof IGDBJtagConnection) {
|
||||||
IGDBJtagConnection connectionDevice = (IGDBJtagConnection) selectedDevice;
|
IGDBJtagConnection connectionDevice = (IGDBJtagConnection) selectedDevice;
|
||||||
connection.setText(connectionDevice.getDefaultDeviceConnection());
|
connection.setText(connectionDevice.getDefaultDeviceConnection());
|
||||||
} else {
|
|
||||||
// support for deprecated TCP/IP based methods
|
|
||||||
ipAddress.setText(selectedDevice.getDefaultIpAddress());
|
|
||||||
portNumber.setText(selectedDevice.getDefaultPortNumber());
|
|
||||||
}
|
}
|
||||||
useRemoteChanged();
|
useRemoteChanged();
|
||||||
updateLaunchConfigurationDialog();
|
updateLaunchConfigurationDialog();
|
||||||
|
@ -394,8 +338,6 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
|
||||||
remoteTimeoutEnabled.setEnabled(enabled);
|
remoteTimeoutEnabled.setEnabled(enabled);
|
||||||
remoteTimeoutValue.setEnabled(remoteTimeoutEnabled.getSelection());
|
remoteTimeoutValue.setEnabled(remoteTimeoutEnabled.getSelection());
|
||||||
jtagDevice.setEnabled(enabled);
|
jtagDevice.setEnabled(enabled);
|
||||||
ipAddress.setEnabled(enabled);
|
|
||||||
portNumber.setEnabled(enabled);
|
|
||||||
connection.setEnabled(enabled);
|
connection.setEnabled(enabled);
|
||||||
GDBJtagDeviceContribution selectedDeviceEntry = GDBJtagDeviceContributionFactory.getInstance()
|
GDBJtagDeviceContribution selectedDeviceEntry = GDBJtagDeviceContributionFactory.getInstance()
|
||||||
.findByDeviceName(jtagDevice.getText());
|
.findByDeviceName(jtagDevice.getText());
|
||||||
|
@ -408,8 +350,8 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
|
||||||
remoteConnectParmsLayout.topControl = remoteConnectionBox;
|
remoteConnectParmsLayout.topControl = remoteConnectionBox;
|
||||||
remoteConnectionBox.getParent().layout();
|
remoteConnectionBox.getParent().layout();
|
||||||
} else {
|
} else {
|
||||||
remoteConnectParmsLayout.topControl = remoteTcpipBox;
|
remoteConnectParmsLayout.topControl = null;
|
||||||
remoteTcpipBox.getParent().layout();
|
remoteConnectionParameters.layout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -495,34 +437,30 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
|
||||||
jtagDevice.select(index);
|
jtagDevice.select(index);
|
||||||
} else {
|
} else {
|
||||||
String storedAddress = ""; //$NON-NLS-1$
|
String storedAddress = ""; //$NON-NLS-1$
|
||||||
int storedPort = 0;
|
int storedPort = -1;
|
||||||
String storedConnection = ""; //$NON-NLS-1$
|
String storedConnection = null;
|
||||||
|
|
||||||
for (int i = 0; i < jtagDevice.getItemCount(); i++) {
|
for (int i = 0; i < jtagDevice.getItemCount(); i++) {
|
||||||
if (jtagDevice.getItem(i).equals(savedJtagDevice)) {
|
if (jtagDevice.getItem(i).equals(savedJtagDevice)) {
|
||||||
storedAddress = configuration.getAttribute(IGDBJtagConstants.ATTR_IP_ADDRESS, ""); //$NON-NLS-1$
|
storedAddress = configuration.getAttribute(IGDBJtagConstants.ATTR_IP_ADDRESS, ""); //$NON-NLS-1$
|
||||||
storedPort = configuration.getAttribute(IGDBJtagConstants.ATTR_PORT_NUMBER, 0);
|
storedPort = configuration.getAttribute(IGDBJtagConstants.ATTR_PORT_NUMBER, -1);
|
||||||
storedConnection = configuration.getAttribute(IGDBJtagConstants.ATTR_CONNECTION, ""); //$NON-NLS-1$
|
storedConnection = configuration.getAttribute(IGDBJtagConstants.ATTR_CONNECTION, (String) null);
|
||||||
jtagDevice.select(i);
|
jtagDevice.select(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (storedConnection != null) {
|
String connectionText = IGDBJtagConstants.DEFAULT_CONNECTION;
|
||||||
|
if (null != storedConnection) { // if a connection URI
|
||||||
try {
|
try {
|
||||||
connection.setText(new URI(storedConnection).getSchemeSpecificPart());
|
connectionText = new URI(storedConnection).getSchemeSpecificPart();
|
||||||
} catch (URISyntaxException e) {
|
} catch (URISyntaxException e) {
|
||||||
Activator.log(e);
|
Activator.log(e);
|
||||||
}
|
}
|
||||||
|
} else if (storedPort != -1) { // if a legacy address:port
|
||||||
|
connectionText = String.format("%s:%d", storedAddress, storedPort); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
if (storedAddress != null) {
|
connection.setText(connectionText);
|
||||||
// Treat as legacy network probe
|
|
||||||
ipAddress.setText(storedAddress);
|
|
||||||
String portString = (0 < storedPort) && (storedPort <= 65535)
|
|
||||||
? Integer.valueOf(storedPort).toString()
|
|
||||||
: ""; //$NON-NLS-1$
|
|
||||||
portNumber.setText(portString);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
boolean updateThreadsOnSuspend = configuration.getAttribute(
|
boolean updateThreadsOnSuspend = configuration.getAttribute(
|
||||||
IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_UPDATE_THREADLIST_ON_SUSPEND,
|
IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_UPDATE_THREADLIST_ON_SUSPEND,
|
||||||
|
@ -573,14 +511,10 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
|
||||||
String conn = connection.getText().trim();
|
String conn = connection.getText().trim();
|
||||||
URI uri = new URI("gdb", conn, ""); //$NON-NLS-1$ //$NON-NLS-2$
|
URI uri = new URI("gdb", conn, ""); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
configuration.setAttribute(IGDBJtagConstants.ATTR_CONNECTION, uri.toString());
|
configuration.setAttribute(IGDBJtagConstants.ATTR_CONNECTION, uri.toString());
|
||||||
|
configuration.removeAttribute(IGDBJtagConstants.ATTR_IP_ADDRESS);
|
||||||
|
configuration.removeAttribute(IGDBJtagConstants.ATTR_PORT_NUMBER);
|
||||||
} else {
|
} else {
|
||||||
String ip = ipAddress.getText().trim();
|
configuration.removeAttribute(IGDBJtagConstants.ATTR_CONNECTION);
|
||||||
configuration.setAttribute(IGDBJtagConstants.ATTR_IP_ADDRESS, ip);
|
|
||||||
String port = portNumber.getText().trim();
|
|
||||||
if (!port.isEmpty()) {
|
|
||||||
configuration.setAttribute(IGDBJtagConstants.ATTR_PORT_NUMBER,
|
|
||||||
Integer.valueOf(port).intValue());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (URISyntaxException e) {
|
} catch (URISyntaxException e) {
|
||||||
Activator.log(e);
|
Activator.log(e);
|
||||||
|
|
Loading…
Add table
Reference in a new issue