* Launch GDB. The launch attributes must have been set already.
*/
protected void doLaunch() throws Exception {
- boolean remote = launchAttributes.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE).equals(IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
+ boolean remote = isRemoteSession();
if (GdbDebugOptions.DEBUG) {
GdbDebugOptions.trace("===============================================================================================\n");
return;
}
- if (launchAttributes.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE)
- .equals(IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE)) {
+ if (isRemoteSession()) {
if (launchAttributes.get(IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP).equals(Boolean.TRUE)) {
String server = (String)launchAttributes.get(ATTR_DEBUG_SERVER_NAME);
String port = (String)launchAttributes.get(IGDBLaunchConfigurationConstants.ATTR_PORT);
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.IBreakpointManager;
import org.eclipse.debug.core.model.IBreakpoint;
+import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
// ------------------------------------------------------------------------
@Test
public void updateBreakpoint_AfterRestart() throws Throwable {
- try {
+ // Restart is not supported for a remote session
+ if (isRemoteSession()) {
+ Assert.assertFalse("Restart operation should not be allowed for a remote session",
+ SyncUtil.canRestart());
+ return;
+ }
+
+ try {
// Create a line breakpoint in the platform. To do that, create a bp from
// the gdb console and let CDT create the corresponding platform bp.
queueConsoleCommand(String.format("break %s:%d", SOURCE_NAME, LINE_NUMBER_5));