Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/jtag
diff options
context:
space:
mode:
Diffstat (limited to 'jtag')
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/META-INF/MANIFEST.MF2
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence.java32
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/Message.properties6
3 files changed, 33 insertions, 7 deletions
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/META-INF/MANIFEST.MF b/jtag/org.eclipse.cdt.debug.gdbjtag.core/META-INF/MANIFEST.MF
index 9bef93d8361..941e4bdb3b8 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/META-INF/MANIFEST.MF
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/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.core;singleton:=true
-Bundle-Version: 9.1.0.qualifier
+Bundle-Version: 9.1.1.qualifier
Bundle-Activator: org.eclipse.cdt.debug.gdbjtag.core.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence.java
index c94e436aa96..4316b4d5f9f 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence.java
@@ -16,6 +16,7 @@
* William Riley (Renesas) - Memory viewing broken (Bug 413483)
* Marc Khouzam (Ericsson) - Cannot disable Delay command (bug 413437)
* John Dallaway - Execute run commands before resume (Bug 525692)
+ * John Dallaway - Test for reset/delay/halt command not defined (Bug 361881)
*******************************************************************************/
package org.eclipse.cdt.debug.gdbjtag.core;
@@ -341,7 +342,11 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_DO_RESET, IGDBJtagConstants.DEFAULT_DO_RESET)) {
List<String> commands = new ArrayList<String>();
fGdbJtagDevice.doReset(commands);
- queueCommands(commands, rm);
+ if (commands.isEmpty()) {
+ setError(String.format(Messages.getString("GDBJtagDebugger.reset_not_defined"), getGDBJtagDeviceName()), rm); //$NON-NLS-1$
+ } else {
+ queueCommands(commands, rm);
+ }
} else {
rm.done();
}
@@ -357,8 +362,13 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_DO_RESET, IGDBJtagConstants.DEFAULT_DO_RESET)) {
int defaultDelay = fGdbJtagDevice.getDefaultDelay();
List<String> commands = new ArrayList<String>();
- fGdbJtagDevice.doDelay(CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_DELAY, defaultDelay), commands);
- queueCommands(commands, rm);
+ int delay = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_DELAY, defaultDelay);
+ fGdbJtagDevice.doDelay(delay, commands);
+ if (commands.isEmpty() && (delay != 0)) {
+ setError(String.format(Messages.getString("GDBJtagDebugger.delay_not_defined"), getGDBJtagDeviceName()), rm); //$NON-NLS-1$
+ } else {
+ queueCommands(commands, rm);
+ }
} else {
rm.done();
}
@@ -373,7 +383,11 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_DO_HALT, IGDBJtagConstants.DEFAULT_DO_HALT)) {
List<String> commands = new ArrayList<String>();
fGdbJtagDevice.doHalt(commands);
- queueCommands(commands, rm);
+ if (commands.isEmpty()) {
+ setError(String.format(Messages.getString("GDBJtagDebugger.halt_not_defined"), getGDBJtagDeviceName()), rm); //$NON-NLS-1$
+ } else {
+ queueCommands(commands, rm);
+ }
} else {
rm.done();
}
@@ -611,9 +625,17 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
}
}
+ private void setError(String message, RequestMonitor rm) {
+ rm.done(new Status(IStatus.ERROR, Activator.PLUGIN_ID, message));
+ }
+
+ private String getGDBJtagDeviceName() {
+ return CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_JTAG_DEVICE, IGDBJtagConstants.DEFAULT_JTAG_DEVICE);
+ }
+
private IGDBJtagDevice getGDBJtagDevice () {
IGDBJtagDevice gdbJtagDevice = null;
- String jtagDeviceName = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_JTAG_DEVICE, IGDBJtagConstants.DEFAULT_JTAG_DEVICE);
+ String jtagDeviceName = getGDBJtagDeviceName();
GDBJtagDeviceContribution[] availableDevices = GDBJtagDeviceContributionFactory.getInstance().getGDBJtagDeviceContribution();
for (GDBJtagDeviceContribution availableDevice : availableDevices) {
if (jtagDeviceName.equals(availableDevice.getDeviceName())) {
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/Message.properties b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/Message.properties
index 5eb05951eb0..3af47425193 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/Message.properties
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/Message.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2008 - 2010 QNX Software Systems and others.
+# Copyright (c) 2008 - 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
@@ -7,6 +7,7 @@
#
# Contributors:
# QNX Software Systems - initial API and implementation
+# John Dallaway - Test for reset/delay/halt command not defined (Bug 361881)
###############################################################################
GDBJtagDebugger.0=Starting debug session
GDBJtagDebugger.1=Error getting debug target
@@ -21,3 +22,6 @@ src.common.No_answer=No answer
GDBJtagDebugger.err_no_sym_file=Symbolics loading was requested but file was not specified or not found.
GDBJtagDebugger.err_no_img_file=Image loading was requested but file was not specified or not found.
+GDBJtagDebugger.delay_not_defined=Delay command not defined for device '%s'
+GDBJtagDebugger.halt_not_defined=Halt command not defined for device '%s'
+GDBJtagDebugger.reset_not_defined=Reset command not defined for device '%s'

Back to the top