Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jtag
diff options
context:
space:
mode:
authorJohn Dallaway2017-10-20 08:02:16 -0400
committerJohn Dallaway2017-10-20 08:02:16 -0400
commita80f50a7259485586097ba1d987feefde1643d9c (patch)
treeb729126584c02adb2330006e8e504c9caaaca910 /jtag
parent50756f3f18138b33f0b004461503c77c12e85096 (diff)
downloadorg.eclipse.cdt-a80f50a7259485586097ba1d987feefde1643d9c.tar.gz
org.eclipse.cdt-a80f50a7259485586097ba1d987feefde1643d9c.tar.xz
org.eclipse.cdt-a80f50a7259485586097ba1d987feefde1643d9c.zip
Bug 334110: Ensure correct SessionType enabled
The DSF-GDB LaunchUtils rely on ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE for correct behaviour. Change-Id: I12ae2dea6918233dc09848b7bbbedc6304294d1a Signed-off-by: John Dallaway <john@dallaway.org.uk>
Diffstat (limited to 'jtag')
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.ui/META-INF/MANIFEST.MF2
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagDSFDebuggerTab.java14
2 files changed, 14 insertions, 2 deletions
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/META-INF/MANIFEST.MF b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/META-INF/MANIFEST.MF
index 9ae45d0171..46a2d0ff44 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/META-INF/MANIFEST.MF
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.debug.gdbjtag.ui;singleton:=true
-Bundle-Version: 8.0.0.qualifier
+Bundle-Version: 8.0.1.qualifier
Bundle-Activator: org.eclipse.cdt.debug.gdbjtag.ui.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagDSFDebuggerTab.java b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagDSFDebuggerTab.java
index 016fda1f7c..58113a42d6 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagDSFDebuggerTab.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagDSFDebuggerTab.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2014 QNX Software Systems and others.
+ * Copyright (c) 2007, 2017 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@
* Bruce Griffith, Sage Electronic Engineering, LLC - bug 305943
* - API generalization to become transport-independent (e.g. to
* allow connections via serial ports and pipes).
+ * John Dallaway - Ensure correct SessionType enabled, bug 334110
*******************************************************************************/
package org.eclipse.cdt.debug.gdbjtag.ui;
@@ -23,6 +24,7 @@ import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
+import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.debug.gdbjtag.core.Activator;
import org.eclipse.cdt.debug.gdbjtag.core.IGDBJtagConnection;
import org.eclipse.cdt.debug.gdbjtag.core.IGDBJtagConstants;
@@ -442,6 +444,14 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
savedJtagDevice = jtagDevice.getText();
configuration.setAttribute(IGDBJtagConstants.ATTR_JTAG_DEVICE, savedJtagDevice);
configuration.setAttribute(IGDBJtagConstants.ATTR_USE_REMOTE_TARGET, useRemote.getSelection());
+ if (useRemote.getSelection()) {
+ // ensure LaunchUtils.getSessionType() returns SessionType.REMOTE (bug 334110)
+ configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
+ IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
+ } else {
+ // ensure LaunchUtils.getSessionType() returns the default session type
+ configuration.removeAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE);
+ }
if (savedJtagDevice.length() > 0) {
try {
IGDBJtagDevice device = findJtagDeviceByName(jtagDevice.getText()).getDevice();
@@ -473,6 +483,8 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
configuration.setAttribute(IGDBJtagConstants.ATTR_USE_REMOTE_TARGET,
IGDBJtagConstants.DEFAULT_USE_REMOTE_TARGET);
+ configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
+ IGDBLaunchConfigurationConstants.DEBUGGER_MODE_REMOTE);
configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_UPDATE_THREADLIST_ON_SUSPEND,
IGDBLaunchConfigurationConstants.DEBUGGER_UPDATE_THREADLIST_ON_SUSPEND_DEFAULT);
}

Back to the top