Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jtag
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 11:20:42 -0500
committerJonah Graham2018-11-22 16:47:02 -0500
commit170e654b4796bad1453ae85a427b97317d67a69a (patch)
tree6ca9b8a8fedd5fd25f97eb79c408312e256ff981 /jtag
parent35996a5c5ca5c254959ba48241eaada6dbf8628d (diff)
downloadorg.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.tar.gz
org.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.tar.xz
org.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.zip
Bug 540373: Cleanup: Format & Remove trailing whitespace
This was done by selecting all projects in Eclipse then Source -> Clean Up... -> choosing: - Format source code - Remove trailing white spaces on all lines and completing the wizard Change-Id: I63685372c6bcc67719bcf145123bcb72e5b00394
Diffstat (limited to 'jtag')
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/src/org/eclipse/cdt/debug/gdbjtag/core/tests/Activator.java2
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/src/org/eclipse/cdt/debug/gdbjtag/core/tests/launch/AutomatedSuite.java4
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/src/org/eclipse/cdt/debug/gdbjtag/core/tests/launch/GDBJtagLaunchTest.java9
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/src/org/eclipse/cdt/debug/gdbjtag/core/tests/launch/SuiteGDBJtag.java4
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/Activator.java3
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence.java348
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence_7_12.java52
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence_7_2.java18
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence_7_7.java43
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFLaunchConfigurationDelegate.java9
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/IGDBJtagConnection.java6
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/IGDBJtagConstants.java69
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/Messages.java2
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl.java6
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_0.java6
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_12.java2
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_2.java6
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_4.java8
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_7.java8
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GdbJtagDebugServicesFactory.java4
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/extensions/GDBJtagControl_HEAD.java18
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/DefaultGDBJtagDeviceImpl.java23
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GDBJtagDeviceContribution.java3
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GDBJtagDeviceContributionFactory.java22
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GenericDevice.java2
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/IGDBJtagDevice.java24
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/MacraigorUsb2Demon.java1
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/OpenOCDPipe.java3
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/OpenOCDSocket.java3
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/Activator.java16
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagDSFDebuggerTab.java94
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagImages.java13
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagLaunchConfigurationTabGroup.java5
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagStartupTab.java295
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/Messages.java6
35 files changed, 616 insertions, 521 deletions
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/src/org/eclipse/cdt/debug/gdbjtag/core/tests/Activator.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/src/org/eclipse/cdt/debug/gdbjtag/core/tests/Activator.java
index 32776f58cd..70a47eb1a8 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/src/org/eclipse/cdt/debug/gdbjtag/core/tests/Activator.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/src/org/eclipse/cdt/debug/gdbjtag/core/tests/Activator.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* John Dallaway - GDB JTAG implementation (bug 538282)
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/src/org/eclipse/cdt/debug/gdbjtag/core/tests/launch/AutomatedSuite.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/src/org/eclipse/cdt/debug/gdbjtag/core/tests/launch/AutomatedSuite.java
index 2f13860790..dadb27e017 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/src/org/eclipse/cdt/debug/gdbjtag/core/tests/launch/AutomatedSuite.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/src/org/eclipse/cdt/debug/gdbjtag/core/tests/launch/AutomatedSuite.java
@@ -18,9 +18,7 @@ import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
-@Suite.SuiteClasses({
- SuiteGDBJtag.class,
-})
+@Suite.SuiteClasses({ SuiteGDBJtag.class, })
public class AutomatedSuite {
// do nothing
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/src/org/eclipse/cdt/debug/gdbjtag/core/tests/launch/GDBJtagLaunchTest.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/src/org/eclipse/cdt/debug/gdbjtag/core/tests/launch/GDBJtagLaunchTest.java
index bd431b8b00..05167246fd 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/src/org/eclipse/cdt/debug/gdbjtag/core/tests/launch/GDBJtagLaunchTest.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/src/org/eclipse/cdt/debug/gdbjtag/core/tests/launch/GDBJtagLaunchTest.java
@@ -32,10 +32,8 @@ import org.junit.runners.Parameterized;
@SuppressWarnings("restriction")
public class GDBJtagLaunchTest extends BaseParametrizedTestCase {
- private static final String TEST_LAUNCH_CONFIGURATION_TYPE_ID =
- "org.eclipse.cdt.debug.gdbjtag.launchConfigurationType"; //$NON-NLS-1$
- private static final String TEST_JTAG_DEVICE_ID =
- "org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.genericDevice"; //$NON-NLS-1$
+ private static final String TEST_LAUNCH_CONFIGURATION_TYPE_ID = "org.eclipse.cdt.debug.gdbjtag.launchConfigurationType"; //$NON-NLS-1$
+ private static final String TEST_JTAG_DEVICE_ID = "org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.genericDevice"; //$NON-NLS-1$
private static final String TEST_PROGRAM_NAME = EXEC_PATH + "Minimal.exe"; //$NON-NLS-1$
private static final String X86_64_INIT = SOURCE_PATH + "x86_64.init"; //$NON-NLS-1$
@@ -58,7 +56,8 @@ public class GDBJtagLaunchTest extends BaseParametrizedTestCase {
setLaunchAttribute(IGDBJtagConstants.ATTR_LOAD_IMAGE, false);
setLaunchAttribute(IGDBJtagConstants.ATTR_LOAD_SYMBOLS, remote);
setLaunchAttribute(IGDBJtagConstants.ATTR_SET_STOP_AT, true);
- setLaunchAttribute(IGDBJtagConstants.ATTR_STOP_AT, ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT);
+ setLaunchAttribute(IGDBJtagConstants.ATTR_STOP_AT,
+ ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT);
setLaunchAttribute(IGDBJtagConstants.ATTR_SET_RESUME, remote);
if (remote) {
setLaunchAttribute(IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_SYMBOLS, true);
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/src/org/eclipse/cdt/debug/gdbjtag/core/tests/launch/SuiteGDBJtag.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/src/org/eclipse/cdt/debug/gdbjtag/core/tests/launch/SuiteGDBJtag.java
index 04aeaf4e0e..e331dd8e3b 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/src/org/eclipse/cdt/debug/gdbjtag/core/tests/launch/SuiteGDBJtag.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core.tests/src/org/eclipse/cdt/debug/gdbjtag/core/tests/launch/SuiteGDBJtag.java
@@ -21,9 +21,7 @@ import org.junit.runners.Suite;
@SuppressWarnings("restriction")
@RunWith(Suite.class)
-@Suite.SuiteClasses({
- GDBJtagLaunchTest.class
-})
+@Suite.SuiteClasses({ GDBJtagLaunchTest.class })
public class SuiteGDBJtag {
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/Activator.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/Activator.java
index a7c23b9e27..7e786abfa4 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/Activator.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/Activator.java
@@ -73,12 +73,13 @@ public class Activator extends Plugin {
/**
* Logs the specified status with this plug-in's log.
- *
+ *
* @param status status to log
*/
public static void log(IStatus status) {
getDefault().getLog().log(status);
}
+
/**
* @since 7.0
*/
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 7d5a048bf5..cbd7cb4d25 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
@@ -14,7 +14,7 @@
* Sage Electronic Engineering, LLC - bug 305943
* - API generalization to become transport-independent (allow
* connections via serial ports and pipes).
- * John Dallaway - Wrong groupId during initialization (Bug 349736)
+ * John Dallaway - Wrong groupId during initialization (Bug 349736)
* Marc Khouzam (Ericsson) - Updated to extend FinalLaunchSequence instead of copying it (bug 324101)
* William Riley (Renesas) - Memory viewing broken (Bug 413483)
* Marc Khouzam (Ericsson) - Cannot disable Delay command (bug 413437)
@@ -90,43 +90,43 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
/** utility method; cuts down on clutter */
private void queueCommands(List<String> commands, RequestMonitor rm) {
- if (!commands.isEmpty()) {
- fCommandControl.queueCommand(
- new CLICommand<MIInfo>(fCommandControl.getContext(), composeCommand(commands)),
+ if (!commands.isEmpty()) {
+ fCommandControl.queueCommand(new CLICommand<MIInfo>(fCommandControl.getContext(), composeCommand(commands)),
new DataRequestMonitor<MIInfo>(getExecutor(), rm));
- }
- else {
+ } else {
rm.done();
}
}
private IGDBControl fCommandControl;
- private IGDBBackend fGDBBackend;
+ private IGDBBackend fGDBBackend;
private IMIProcesses fProcService;
private IGDBJtagDevice fGdbJtagDevice;
private DsfServicesTracker fTracker;
private IMIContainerDMContext fContainerCtx;
-
+
/**
* @since 8.2
*/
- public GDBJtagDSFFinalLaunchSequence(DsfSession session, Map<String, Object> attributes, RequestMonitorWithProgress rm) {
+ public GDBJtagDSFFinalLaunchSequence(DsfSession session, Map<String, Object> attributes,
+ RequestMonitorWithProgress rm) {
super(session, attributes, rm);
}
- public GDBJtagDSFFinalLaunchSequence(DsfExecutor executor, GdbLaunch launch, SessionType sessionType, boolean attach, RequestMonitorWithProgress rm) {
+ public GDBJtagDSFFinalLaunchSequence(DsfExecutor executor, GdbLaunch launch, SessionType sessionType,
+ boolean attach, RequestMonitorWithProgress rm) {
this(launch.getSession(), getAttributes(launch), rm);
- }
+ }
private static Map<String, Object> getAttributes(GdbLaunch launch) {
- try {
- return launch.getLaunchConfiguration().getAttributes();
- } catch (CoreException e) {
- }
- return new HashMap<String, Object>();
+ try {
+ return launch.getLaunchConfiguration().getAttributes();
+ } catch (CoreException e) {
+ }
+ return new HashMap<String, Object>();
}
-
+
/** @since 8.2 */
protected IMIContainerDMContext getContainerContext() {
return fContainerCtx;
@@ -148,8 +148,7 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
List<String> orderList = new ArrayList<String>(Arrays.asList(super.getExecutionOrder(GROUP_TOP_LEVEL)));
// First, remove all steps of the base class that we don't want to use.
- orderList.removeAll(Arrays.asList(new String[] {
- "stepNewProcess", //$NON-NLS-1$
+ orderList.removeAll(Arrays.asList(new String[] { "stepNewProcess", //$NON-NLS-1$
}));
// Now insert our steps before the data model initialized event is sent
@@ -160,37 +159,35 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
// Finally, deal with our groups and their steps.
if (GROUP_JTAG.equals(group)) {
- return new String[] {
- "stepInitializeJTAGFinalLaunchSequence",
- "stepRetrieveJTAGDevice", //$NON-NLS-1$
- "stepLoadSymbols", //$NON-NLS-1$
- "stepConnectToTarget", //$NON-NLS-1$
- "stepResetBoard", //$NON-NLS-1$
- "stepDelayStartup", //$NON-NLS-1$
- "stepHaltBoard", //$NON-NLS-1$
- "stepUserInitCommands", //$NON-NLS-1$
- "stepLoadImage", //$NON-NLS-1$
-
- "stepUpdateContainer", //$NON-NLS-1$
-
- "stepInitializeMemory", //$NON-NLS-1$
- "stepSetArguments", //$NON-NLS-1$
- "stepSetEnvironmentVariables", //$NON-NLS-1$
- "stepStartTrackingBreakpoints", //$NON-NLS-1$
-
- "stepSetProgramCounter", //$NON-NLS-1$
- "stepStopScript", //$NON-NLS-1$
- "stepUserDebugCommands", //$NON-NLS-1$
- "stepResumeScript", //$NON-NLS-1$
- "stepJTAGCleanup", //$NON-NLS-1$
+ return new String[] { "stepInitializeJTAGFinalLaunchSequence", "stepRetrieveJTAGDevice", //$NON-NLS-2$
+ "stepLoadSymbols", //$NON-NLS-1$
+ "stepConnectToTarget", //$NON-NLS-1$
+ "stepResetBoard", //$NON-NLS-1$
+ "stepDelayStartup", //$NON-NLS-1$
+ "stepHaltBoard", //$NON-NLS-1$
+ "stepUserInitCommands", //$NON-NLS-1$
+ "stepLoadImage", //$NON-NLS-1$
+
+ "stepUpdateContainer", //$NON-NLS-1$
+
+ "stepInitializeMemory", //$NON-NLS-1$
+ "stepSetArguments", //$NON-NLS-1$
+ "stepSetEnvironmentVariables", //$NON-NLS-1$
+ "stepStartTrackingBreakpoints", //$NON-NLS-1$
+
+ "stepSetProgramCounter", //$NON-NLS-1$
+ "stepStopScript", //$NON-NLS-1$
+ "stepUserDebugCommands", //$NON-NLS-1$
+ "stepResumeScript", //$NON-NLS-1$
+ "stepJTAGCleanup", //$NON-NLS-1$
};
}
-
+
// For any subgroups of the base class
return super.getExecutionOrder(group);
}
- /**
+ /**
* Initialize the members of the class.
* This step is mandatory for the rest of the sequence to complete.
* @since 8.2
@@ -215,25 +212,27 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
rm.done(new Status(IStatus.ERROR, Activator.PLUGIN_ID, -1, "Cannot obtain process service", null)); //$NON-NLS-1$
return;
}
-
- // When we are starting to debug a new process, the container is the default process used by GDB.
- // We don't have a pid yet, so we can simply create the container with the UNIQUE_GROUP_ID
- setContainerContext(fProcService.createContainerContextFromGroupId(fCommandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID));
+
+ // When we are starting to debug a new process, the container is the default process used by GDB.
+ // We don't have a pid yet, so we can simply create the container with the UNIQUE_GROUP_ID
+ setContainerContext(fProcService.createContainerContextFromGroupId(fCommandControl.getContext(),
+ MIProcesses.UNIQUE_GROUP_ID));
rm.done();
}
- /**
+ /**
* Rollback method for {@link #stepInitializeJTAGFinalLaunchSequence()}
- * @since 4.0
+ * @since 4.0
*/
@RollBack("stepInitializeJTAGFinalLaunchSequence")
public void rollBackInitializeFinalLaunchSequence(RequestMonitor rm) {
- if (fTracker != null) fTracker.dispose();
+ if (fTracker != null)
+ fTracker.dispose();
fTracker = null;
rm.done();
}
-
+
/*
* Retrieve the IGDBJtagDevice instance
*/
@@ -252,7 +251,7 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
}
rm.done();
}
-
+
/*
* Execute symbol loading
*/
@@ -260,43 +259,48 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
@Execute
public void stepLoadSymbols(final RequestMonitor rm) {
try {
- if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_LOAD_SYMBOLS, IGDBJtagConstants.DEFAULT_LOAD_SYMBOLS)) {
+ if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_LOAD_SYMBOLS,
+ IGDBJtagConstants.DEFAULT_LOAD_SYMBOLS)) {
String symbolsFileName = null;
// New setting in Helios. Default is true. Check for existence
// in order to support older launch configs
- if (getAttributes().containsKey(IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_SYMBOLS) &&
- CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_SYMBOLS, IGDBJtagConstants.DEFAULT_USE_PROJ_BINARY_FOR_SYMBOLS)) {
+ if (getAttributes().containsKey(IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_SYMBOLS)
+ && CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_SYMBOLS,
+ IGDBJtagConstants.DEFAULT_USE_PROJ_BINARY_FOR_SYMBOLS)) {
IPath programFile = fGDBBackend.getProgramPath();
if (programFile != null) {
symbolsFileName = programFile.toOSString();
}
- }
- else {
- symbolsFileName = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_SYMBOLS_FILE_NAME, IGDBJtagConstants.DEFAULT_SYMBOLS_FILE_NAME);
+ } else {
+ symbolsFileName = CDebugUtils.getAttribute(getAttributes(),
+ IGDBJtagConstants.ATTR_SYMBOLS_FILE_NAME, IGDBJtagConstants.DEFAULT_SYMBOLS_FILE_NAME);
if (symbolsFileName.length() > 0) {
- symbolsFileName = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(symbolsFileName);
+ symbolsFileName = VariablesPlugin.getDefault().getStringVariableManager()
+ .performStringSubstitution(symbolsFileName);
} else {
symbolsFileName = null;
}
}
if (symbolsFileName == null) {
- rm.setStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, -1, Messages.getString("GDBJtagDebugger.err_no_img_file"), null)); //$NON-NLS-1$
+ rm.setStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, -1,
+ Messages.getString("GDBJtagDebugger.err_no_img_file"), null)); //$NON-NLS-1$
rm.done();
return;
}
- // Escape windows path separator characters TWICE, once for Java and once for GDB.
+ // Escape windows path separator characters TWICE, once for Java and once for GDB.
symbolsFileName = symbolsFileName.replace("\\", "\\\\"); //$NON-NLS-1$ //$NON-NLS-2$
- String symbolsOffset = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_SYMBOLS_OFFSET, IGDBJtagConstants.DEFAULT_SYMBOLS_OFFSET);
+ String symbolsOffset = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_SYMBOLS_OFFSET,
+ IGDBJtagConstants.DEFAULT_SYMBOLS_OFFSET);
if (symbolsOffset.length() > 0) {
- symbolsOffset = "0x" + symbolsOffset;
+ symbolsOffset = "0x" + symbolsOffset;
}
List<String> commands = new ArrayList<String>();
fGdbJtagDevice.doLoadSymbol(symbolsFileName, symbolsOffset, commands);
- queueCommands(commands, rm);
+ queueCommands(commands, rm);
} else {
rm.done();
@@ -315,16 +319,20 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
@Execute
public void stepConnectToTarget(final RequestMonitor rm) {
try {
- if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_USE_REMOTE_TARGET, IGDBJtagConstants.DEFAULT_USE_REMOTE_TARGET)) {
+ if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_USE_REMOTE_TARGET,
+ IGDBJtagConstants.DEFAULT_USE_REMOTE_TARGET)) {
List<String> commands = new ArrayList<String>();
if (fGdbJtagDevice instanceof IGDBJtagConnection) {
- URI uri = new URI(CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_CONNECTION, IGDBJtagConstants.DEFAULT_CONNECTION));
- IGDBJtagConnection device = (IGDBJtagConnection)fGdbJtagDevice;
+ URI uri = new URI(CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_CONNECTION,
+ IGDBJtagConstants.DEFAULT_CONNECTION));
+ IGDBJtagConnection device = (IGDBJtagConnection) fGdbJtagDevice;
device.doRemote(uri.getSchemeSpecificPart(), commands);
} else {
// Handle legacy network device contributions that don't understand URIs
- 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);
+ 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);
@@ -332,30 +340,33 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
rm.done();
}
} catch (URISyntaxException e) {
- rm.setStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, -1, "Invalid remote target connection syntax", e)); //$NON-NLS-1$
+ rm.setStatus(
+ new Status(IStatus.ERROR, Activator.PLUGIN_ID, -1, "Invalid remote target connection syntax", e)); //$NON-NLS-1$
rm.done();
}
}
-
+
/*
* Run device-specific code to reset the board
*/
/** @since 8.2 */
@Execute
public void stepResetBoard(final RequestMonitor rm) {
- if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_DO_RESET, IGDBJtagConstants.DEFAULT_DO_RESET)) {
- List<String> commands = new ArrayList<String>();
- fGdbJtagDevice.doReset(commands);
- if (commands.isEmpty()) {
- setError(String.format(Messages.getString("GDBJtagDebugger.reset_not_defined"), getGDBJtagDeviceName()), rm); //$NON-NLS-1$
- } else {
- queueCommands(commands, rm);
- }
+ if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_DO_RESET,
+ IGDBJtagConstants.DEFAULT_DO_RESET)) {
+ List<String> commands = new ArrayList<String>();
+ fGdbJtagDevice.doReset(commands);
+ if (commands.isEmpty()) {
+ setError(String.format(Messages.getString("GDBJtagDebugger.reset_not_defined"), getGDBJtagDeviceName()), //$NON-NLS-1$
+ rm);
} else {
- rm.done();
+ queueCommands(commands, rm);
}
+ } else {
+ rm.done();
+ }
}
-
+
/*
* Run device-specific code to delay the startup
*/
@@ -363,40 +374,44 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
@Execute
public void stepDelayStartup(final RequestMonitor rm) {
// The delay is also controlled by the RESET attribute.
- if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_DO_RESET, IGDBJtagConstants.DEFAULT_DO_RESET)) {
+ if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_DO_RESET,
+ IGDBJtagConstants.DEFAULT_DO_RESET)) {
int defaultDelay = fGdbJtagDevice.getDefaultDelay();
List<String> commands = new ArrayList<String>();
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$
+ setError(String.format(Messages.getString("GDBJtagDebugger.delay_not_defined"), getGDBJtagDeviceName()), //$NON-NLS-1$
+ rm);
} else {
queueCommands(commands, rm);
}
} else {
rm.done();
- }
+ }
}
-
+
/*
* Run device-specific code to halt the board
*/
/** @since 8.2 */
@Execute
public void stepHaltBoard(final RequestMonitor rm) {
- if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_DO_HALT, IGDBJtagConstants.DEFAULT_DO_HALT)) {
- List<String> commands = new ArrayList<String>();
- fGdbJtagDevice.doHalt(commands);
- if (commands.isEmpty()) {
- setError(String.format(Messages.getString("GDBJtagDebugger.halt_not_defined"), getGDBJtagDeviceName()), rm); //$NON-NLS-1$
- } else {
- queueCommands(commands, rm);
- }
+ if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_DO_HALT,
+ IGDBJtagConstants.DEFAULT_DO_HALT)) {
+ List<String> commands = new ArrayList<String>();
+ fGdbJtagDevice.doHalt(commands);
+ if (commands.isEmpty()) {
+ setError(String.format(Messages.getString("GDBJtagDebugger.halt_not_defined"), getGDBJtagDeviceName()), //$NON-NLS-1$
+ rm);
} else {
- rm.done();
+ queueCommands(commands, rm);
}
+ } else {
+ rm.done();
+ }
}
-
+
/*
* Execute any user defined init commands
*/
@@ -404,7 +419,8 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
@Execute
public void stepUserInitCommands(final RequestMonitor rm) {
try {
- String userCmd = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_INIT_COMMANDS, IGDBJtagConstants.DEFAULT_INIT_COMMANDS);
+ String userCmd = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_INIT_COMMANDS,
+ IGDBJtagConstants.DEFAULT_INIT_COMMANDS);
userCmd = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(userCmd);
if (userCmd.length() > 0) {
String[] commands = userCmd.split("\\r?\\n"); //$NON-NLS-1$
@@ -412,20 +428,19 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
CountingRequestMonitor crm = new CountingRequestMonitor(getExecutor(), rm);
crm.setDoneCount(commands.length);
for (int i = 0; i < commands.length; ++i) {
- fCommandControl.queueCommand(
- new CLICommand<MIInfo>(fCommandControl.getContext(), commands[i]),
+ fCommandControl.queueCommand(new CLICommand<MIInfo>(fCommandControl.getContext(), commands[i]),
new DataRequestMonitor<MIInfo>(getExecutor(), crm));
}
- }
- else {
+ } else {
rm.done();
}
} catch (CoreException e) {
- rm.setStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, -1, "Cannot run user defined init commands", e)); //$NON-NLS-1$
+ rm.setStatus(
+ new Status(IStatus.ERROR, Activator.PLUGIN_ID, -1, "Cannot run user defined init commands", e)); //$NON-NLS-1$
rm.done();
}
}
-
+
/*
* Execute image loading
*/
@@ -434,43 +449,49 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
public void stepLoadImage(final RequestMonitor rm) {
try {
String imageFileName = null;
- if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_LOAD_IMAGE, IGDBJtagConstants.DEFAULT_LOAD_IMAGE)) {
+ if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_LOAD_IMAGE,
+ IGDBJtagConstants.DEFAULT_LOAD_IMAGE)) {
// New setting in Helios. Default is true. Check for existence
// in order to support older launch configs
- if (getAttributes().containsKey(IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_IMAGE) &&
- CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_IMAGE, IGDBJtagConstants.DEFAULT_USE_PROJ_BINARY_FOR_IMAGE)) {
+ if (getAttributes().containsKey(IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_IMAGE)
+ && CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_IMAGE,
+ IGDBJtagConstants.DEFAULT_USE_PROJ_BINARY_FOR_IMAGE)) {
IPath programFile = fGDBBackend.getProgramPath();
if (programFile != null) {
imageFileName = programFile.toOSString();
}
- }
- else {
- imageFileName = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_IMAGE_FILE_NAME, IGDBJtagConstants.DEFAULT_IMAGE_FILE_NAME);
+ } else {
+ imageFileName = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_IMAGE_FILE_NAME,
+ IGDBJtagConstants.DEFAULT_IMAGE_FILE_NAME);
if (imageFileName.length() > 0) {
- imageFileName = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(imageFileName);
+ imageFileName = VariablesPlugin.getDefault().getStringVariableManager()
+ .performStringSubstitution(imageFileName);
} else {
imageFileName = null;
}
}
if (imageFileName == null) {
- rm.setStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, -1, Messages.getString("GDBJtagDebugger.err_no_img_file"), null)); //$NON-NLS-1$
+ rm.setStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, -1,
+ Messages.getString("GDBJtagDebugger.err_no_img_file"), null)); //$NON-NLS-1$
rm.done();
return;
}
- // Escape windows path separator characters TWICE, once for Java and once for GDB.
+ // Escape windows path separator characters TWICE, once for Java and once for GDB.
imageFileName = imageFileName.replace("\\", "\\\\"); //$NON-NLS-1$ //$NON-NLS-2$
- String imageOffset = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_IMAGE_OFFSET, IGDBJtagConstants.DEFAULT_IMAGE_OFFSET);
+ String imageOffset = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_IMAGE_OFFSET,
+ IGDBJtagConstants.DEFAULT_IMAGE_OFFSET);
if (imageOffset.length() > 0) {
- imageOffset = (imageFileName.endsWith(".elf")) ? "" : "0x" + CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_IMAGE_OFFSET, IGDBJtagConstants.DEFAULT_IMAGE_OFFSET); //$NON-NLS-2$
+ imageOffset = (imageFileName.endsWith(".elf")) ? "" //$NON-NLS-2$
+ : "0x" + CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_IMAGE_OFFSET,
+ IGDBJtagConstants.DEFAULT_IMAGE_OFFSET);
}
List<String> commands = new ArrayList<String>();
fGdbJtagDevice.doLoadImage(imageFileName, imageOffset, commands);
- queueCommands(commands, rm);
- }
- else {
+ queueCommands(commands, rm);
+ } else {
rm.done();
}
} catch (CoreException e) {
@@ -478,7 +499,7 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
rm.done();
}
}
-
+
/**
* Now that we are connected to the target, we should update
* our container to properly fill in its pid.
@@ -487,10 +508,10 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
@Execute
public void stepUpdateContainer(RequestMonitor rm) {
String groupId = getContainerContext().getGroupId();
- setContainerContext(fProcService.createContainerContextFromGroupId(fCommandControl.getContext(), groupId));
+ setContainerContext(fProcService.createContainerContextFromGroupId(fCommandControl.getContext(), groupId));
rm.done();
}
-
+
/**
* Specify the arguments to the program that will be run.
* @since 8.2
@@ -498,16 +519,14 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
@Execute
public void stepSetArguments(RequestMonitor rm) {
try {
- String args = CDebugUtils.getAttribute(
- getAttributes(),
- ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
- ""); //$NON-NLS-1$
+ String args = CDebugUtils.getAttribute(getAttributes(),
+ ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""); //$NON-NLS-1$
if (args.length() != 0) {
args = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(args);
String[] argArray = CommandLineUtil.argumentsToArray(args);
fCommandControl.queueCommand(
- fCommandControl.getCommandFactory().createMIGDBSetArgs(getContainerContext(), argArray),
+ fCommandControl.getCommandFactory().createMIGDBSetArgs(getContainerContext(), argArray),
new ImmediateDataRequestMonitor<MIInfo>(rm));
} else {
rm.done();
@@ -515,9 +534,9 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
} catch (CoreException e) {
rm.setStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, -1, "Cannot get inferior arguments", e)); //$NON-NLS-1$
rm.done();
- }
+ }
}
-
+
/**
* Specify environment variables if needed
* @since 8.2
@@ -542,9 +561,9 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
rm.done();
}
}
-
- /*
- * Start tracking the breakpoints once we know we are connected to the target (necessary for remote debugging)
+
+ /*
+ * Start tracking the breakpoints once we know we are connected to the target (necessary for remote debugging)
*/
/** @since 8.2 */
@Execute
@@ -552,37 +571,42 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
MIBreakpointsManager bpmService = fTracker.getService(MIBreakpointsManager.class);
bpmService.startTrackingBpForProcess(getContainerContext(), rm);
}
-
+
/*
* Set the program counter
*/
/** @since 8.2 */
@Execute
public void stepSetProgramCounter(final RequestMonitor rm) {
- if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_SET_PC_REGISTER, IGDBJtagConstants.DEFAULT_SET_PC_REGISTER)) {
- String pcRegister = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_PC_REGISTER, CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_IMAGE_OFFSET, IGDBJtagConstants.DEFAULT_PC_REGISTER));
- List<String> commands = new ArrayList<String>();
- fGdbJtagDevice.doSetPC(pcRegister, commands);
- queueCommands(commands, rm);
- } else {
- rm.done();
- }
+ if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_SET_PC_REGISTER,
+ IGDBJtagConstants.DEFAULT_SET_PC_REGISTER)) {
+ String pcRegister = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_PC_REGISTER,
+ CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_IMAGE_OFFSET,
+ IGDBJtagConstants.DEFAULT_PC_REGISTER));
+ List<String> commands = new ArrayList<String>();
+ fGdbJtagDevice.doSetPC(pcRegister, commands);
+ queueCommands(commands, rm);
+ } else {
+ rm.done();
+ }
}
-
+
/*
* Execute the stop script
*/
/** @since 8.2 */
@Execute
public void stepStopScript(final RequestMonitor rm) {
- if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_SET_STOP_AT, IGDBJtagConstants.DEFAULT_SET_STOP_AT)) {
- String stopAt = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_STOP_AT, IGDBJtagConstants.DEFAULT_STOP_AT);
- List<String> commands = new ArrayList<String>();
- fGdbJtagDevice.doStopAt(stopAt, commands);
- queueCommands(commands, rm);
- } else {
- rm.done();
- }
+ if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_SET_STOP_AT,
+ IGDBJtagConstants.DEFAULT_SET_STOP_AT)) {
+ String stopAt = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_STOP_AT,
+ IGDBJtagConstants.DEFAULT_STOP_AT);
+ List<String> commands = new ArrayList<String>();
+ fGdbJtagDevice.doStopAt(stopAt, commands);
+ queueCommands(commands, rm);
+ } else {
+ rm.done();
+ }
}
/*
@@ -591,15 +615,16 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
/** @since 8.2 */
@Execute
public void stepResumeScript(final RequestMonitor rm) {
- if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_SET_RESUME, IGDBJtagConstants.DEFAULT_SET_RESUME)) {
- List<String> commands = new ArrayList<String>();
- fGdbJtagDevice.doContinue(commands);
- queueCommands(commands, rm);
- } else {
- rm.done();
- }
+ if (CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_SET_RESUME,
+ IGDBJtagConstants.DEFAULT_SET_RESUME)) {
+ List<String> commands = new ArrayList<String>();
+ fGdbJtagDevice.doContinue(commands);
+ queueCommands(commands, rm);
+ } else {
+ rm.done();
+ }
}
-
+
/*
* Run any user defined commands to start debugging
*/
@@ -607,7 +632,8 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
@Execute
public void stepUserDebugCommands(final RequestMonitor rm) {
try {
- String userCmd = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_RUN_COMMANDS, IGDBJtagConstants.DEFAULT_RUN_COMMANDS);
+ String userCmd = CDebugUtils.getAttribute(getAttributes(), IGDBJtagConstants.ATTR_RUN_COMMANDS,
+ IGDBJtagConstants.DEFAULT_RUN_COMMANDS);
if (userCmd.length() > 0) {
userCmd = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(userCmd);
String[] commands = userCmd.split("\\r?\\n"); //$NON-NLS-1$
@@ -615,12 +641,10 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
CountingRequestMonitor crm = new CountingRequestMonitor(getExecutor(), rm);
crm.setDoneCount(commands.length);
for (int i = 0; i < commands.length; ++i) {
- fCommandControl.queueCommand(
- new CLICommand<MIInfo>(fCommandControl.getContext(), commands[i]),
+ fCommandControl.queueCommand(new CLICommand<MIInfo>(fCommandControl.getContext(), commands[i]),
new DataRequestMonitor<MIInfo>(getExecutor(), crm));
}
- }
- else {
+ } else {
rm.done();
}
} catch (CoreException e) {
@@ -677,7 +701,7 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
}
return sb.toString();
}
-
+
/**
* Cleanup now that the sequence has been run.
* @since 8.2
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence_7_12.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence_7_12.java
index 581e081639..a538a8eb8a 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence_7_12.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence_7_12.java
@@ -26,7 +26,7 @@ import org.eclipse.cdt.dsf.service.DsfSession;
/**
* Subclass for GDB >= 7.12.
- *
+ *
* @since 9.1
*/
public class GDBJtagDSFFinalLaunchSequence_7_12 extends GDBJtagDSFFinalLaunchSequence_7_7 {
@@ -39,8 +39,7 @@ public class GDBJtagDSFFinalLaunchSequence_7_12 extends GDBJtagDSFFinalLaunchSeq
protected String[] getExecutionOrder(String group) {
if (GROUP_TOP_LEVEL.equals(group)) {
// Initialize the list with the steps from the base class
- List<String> orderList = new ArrayList<String>(
- Arrays.asList(super.getExecutionOrder(GROUP_TOP_LEVEL)));
+ List<String> orderList = new ArrayList<String>(Arrays.asList(super.getExecutionOrder(GROUP_TOP_LEVEL)));
// Add the new step after we source the gdbinit file to make sure the user
// cannot change this behavior
@@ -55,29 +54,30 @@ public class GDBJtagDSFFinalLaunchSequence_7_12 extends GDBJtagDSFFinalLaunchSeq
@Execute
public void stepSetTargetAsync(RequestMonitor rm) {
- // Processing this request after sourcing the gdbinit file to make sure the user
- // cannot change this behavior
- DsfServicesTracker tracker = new DsfServicesTracker(Activator.getBundleContext(),
- getSession().getId());
- IMICommandControl commandControl = tracker.getService(IMICommandControl.class);
- IGDBBackend gdbBackEnd = tracker.getService(IGDBBackend.class);
- tracker.dispose();
+ // Processing this request after sourcing the gdbinit file to make sure the user
+ // cannot change this behavior
+ DsfServicesTracker tracker = new DsfServicesTracker(Activator.getBundleContext(), getSession().getId());
+ IMICommandControl commandControl = tracker.getService(IMICommandControl.class);
+ IGDBBackend gdbBackEnd = tracker.getService(IGDBBackend.class);
+ tracker.dispose();
- if (commandControl != null && gdbBackEnd != null) {
- // Use target async when interfacing with the full GDB console (i.e. minimum GDB version 7.12)
- // otherwise explicitly set it to off.
- commandControl.queueCommand(
- commandControl.getCommandFactory().createMIGDBSetTargetAsync(commandControl.getContext(), gdbBackEnd.isFullGdbConsoleSupported()),
- new DataRequestMonitor<MIInfo>(getExecutor(), rm) {
- @Override
- protected void handleError() {
- // Accept errors for older GDBs
- rm.done();
- }
- });
- } else {
- // Should not happen
- rm.done();
- }
+ if (commandControl != null && gdbBackEnd != null) {
+ // Use target async when interfacing with the full GDB console (i.e. minimum GDB version 7.12)
+ // otherwise explicitly set it to off.
+ commandControl
+ .queueCommand(
+ commandControl.getCommandFactory().createMIGDBSetTargetAsync(commandControl.getContext(),
+ gdbBackEnd.isFullGdbConsoleSupported()),
+ new DataRequestMonitor<MIInfo>(getExecutor(), rm) {
+ @Override
+ protected void handleError() {
+ // Accept errors for older GDBs
+ rm.done();
+ }
+ });
+ } else {
+ // Should not happen
+ rm.done();
+ }
}
}
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence_7_2.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence_7_2.java
index 8455438b8d..157981ed03 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence_7_2.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence_7_2.java
@@ -13,7 +13,6 @@
\******************************************************************************/
package org.eclipse.cdt.debug.gdbjtag.core;
-
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -35,7 +34,8 @@ import org.eclipse.core.runtime.Status;
*/
public class GDBJtagDSFFinalLaunchSequence_7_2 extends GDBJtagDSFFinalLaunchSequence {
- public GDBJtagDSFFinalLaunchSequence_7_2(DsfSession session, Map<String, Object> attributes, RequestMonitorWithProgress rm) {
+ public GDBJtagDSFFinalLaunchSequence_7_2(DsfSession session, Map<String, Object> attributes,
+ RequestMonitorWithProgress rm) {
super(session, attributes, rm);
}
@@ -47,15 +47,16 @@ public class GDBJtagDSFFinalLaunchSequence_7_2 extends GDBJtagDSFFinalLaunchSequ
List<String> orderList = new ArrayList<String>(Arrays.asList(super.getExecutionOrder(GROUP_JTAG)));
// Now insert our steps right after the initialization of the base class.
- orderList.add(orderList.indexOf("stepInitializeJTAGFinalLaunchSequence") + 1, "stepInitializeJTAGSequence_7_2"); //$NON-NLS-1$ //$NON-NLS-2$
-
+ orderList.add(orderList.indexOf("stepInitializeJTAGFinalLaunchSequence") + 1, //$NON-NLS-1$
+ "stepInitializeJTAGSequence_7_2"); //$NON-NLS-1$
+
return orderList.toArray(new String[orderList.size()]);
}
return super.getExecutionOrder(group);
}
- /**
+ /**
* Initialize the members of the DebugNewProcessSequence_7_2 class.
* This step is mandatory for the rest of the sequence to complete.
*/
@@ -65,13 +66,14 @@ public class GDBJtagDSFFinalLaunchSequence_7_2 extends GDBJtagDSFFinalLaunchSequ
IGDBControl gdbControl = tracker.getService(IGDBControl.class);
IGDBProcesses procService = tracker.getService(IGDBProcesses.class);
tracker.dispose();
-
- if (gdbControl == null || procService == null) {
+
+ if (gdbControl == null || procService == null) {
rm.setStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, -1, "Cannot obtain service", null)); //$NON-NLS-1$
rm.done();
return;
}
- setContainerContext(procService.createContainerContextFromGroupId(gdbControl.getContext(), GDBProcesses_7_2.INITIAL_THREAD_GROUP_ID));
+ setContainerContext(procService.createContainerContextFromGroupId(gdbControl.getContext(),
+ GDBProcesses_7_2.INITIAL_THREAD_GROUP_ID));
rm.done();
}
}
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence_7_7.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence_7_7.java
index 213e118c15..dd9c2f48a8 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence_7_7.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence_7_7.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Marc Khouzam (Ericsson) - initial API and implementation
*******************************************************************************/
@@ -29,12 +29,13 @@ import org.eclipse.cdt.dsf.service.DsfSession;
/**
* Subclass for GDB >= 7.7.
- *
+ *
* @since 8.4
*/
public class GDBJtagDSFFinalLaunchSequence_7_7 extends GDBJtagDSFFinalLaunchSequence_7_2 {
-
- public GDBJtagDSFFinalLaunchSequence_7_7(DsfSession session, Map<String, Object> attributes, RequestMonitorWithProgress rm) {
+
+ public GDBJtagDSFFinalLaunchSequence_7_7(DsfSession session, Map<String, Object> attributes,
+ RequestMonitorWithProgress rm) {
super(session, attributes, rm);
}
@@ -62,23 +63,21 @@ public class GDBJtagDSFFinalLaunchSequence_7_7 extends GDBJtagDSFFinalLaunchSequ
DsfServicesTracker tracker = new DsfServicesTracker(Activator.getBundleContext(), getSession().getId());
IGDBControl gdbControl = tracker.getService(IGDBControl.class);
tracker.dispose();
-
- if (gdbControl != null) {
- // For hardware debug the 'call' style does not work with GDB
- // Let's use the 'gdb' style instead
- gdbControl.queueCommand(
- gdbControl.getCommandFactory().createMIGDBSetDPrintfStyle(gdbControl.getContext(),
- MIGDBSetDPrintfStyle.GDB_STYLE),
- new ImmediateDataRequestMonitor<MIInfo>(rm) {
- @Override
- protected void handleCompleted() {
- // We accept errors
- rm.done();
- }
- });
- } else {
- // Should not happen but accept errors in this case
- rm.done();
- }
+
+ if (gdbControl != null) {
+ // For hardware debug the 'call' style does not work with GDB
+ // Let's use the 'gdb' style instead
+ gdbControl.queueCommand(gdbControl.getCommandFactory().createMIGDBSetDPrintfStyle(gdbControl.getContext(),
+ MIGDBSetDPrintfStyle.GDB_STYLE), new ImmediateDataRequestMonitor<MIInfo>(rm) {
+ @Override
+ protected void handleCompleted() {
+ // We accept errors
+ rm.done();
+ }
+ });
+ } else {
+ // Should not happen but accept errors in this case
+ rm.done();
+ }
}
}
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFLaunchConfigurationDelegate.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFLaunchConfigurationDelegate.java
index 29e39b201a..fb30953eec 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFLaunchConfigurationDelegate.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFLaunchConfigurationDelegate.java
@@ -50,9 +50,10 @@ public class GDBJtagDSFLaunchConfigurationDelegate extends GdbLaunchDelegate {
protected IDsfDebugServicesFactory newServiceFactory(ILaunchConfiguration config, String version) {
return new GdbJtagDebugServicesFactory(version, config);
}
-
+
@Override
- public boolean preLaunchCheck(ILaunchConfiguration config, String mode, IProgressMonitor monitor) throws CoreException {
+ public boolean preLaunchCheck(ILaunchConfiguration config, String mode, IProgressMonitor monitor)
+ throws CoreException {
// Forcibly turn off non-stop for hardware sessions.
// Non-stop is not an option we offer for hardware launches.
// Now that we can have non-stop defaulting to enabled, it will prevent
@@ -61,9 +62,9 @@ public class GDBJtagDSFLaunchConfigurationDelegate extends GdbLaunchDelegate {
if (LaunchUtils.getIsNonStopMode(config)) {
ILaunchConfigurationWorkingCopy wcConfig = config.getWorkingCopy();
wcConfig.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, false);
- wcConfig.doSave();
+ wcConfig.doSave();
}
-
+
return super.preLaunchCheck(config, mode, monitor);
}
}
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/IGDBJtagConnection.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/IGDBJtagConnection.java
index 7ab48e4655..7f3a3c3f2d 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/IGDBJtagConnection.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/IGDBJtagConnection.java
@@ -27,7 +27,7 @@ import java.util.Collection;
* @since 7.0
*/
public interface IGDBJtagConnection {
-
+
/**
* Used during instantiation to set the device default connection string from XML
* @param connection A device specific default connection string that GDB understands
@@ -44,8 +44,8 @@ public interface IGDBJtagConnection {
/**
* Host specific default device name used by GDB to connect to a device
* @return identifier for the remote device. It is up to GDB to figure out how to interpret
- * the connection string (e.g /dev/COM1, 127.0.0.1:8888, etc.)
+ * the connection string (e.g /dev/COM1, 127.0.0.1:8888, etc.)
*/
public String getDefaultDeviceConnection();
-
+
}
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/IGDBJtagConstants.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/IGDBJtagConstants.java
index 2429673257..ba68e26b89 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/IGDBJtagConstants.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/IGDBJtagConstants.java
@@ -23,15 +23,16 @@ package org.eclipse.cdt.debug.gdbjtag.core;
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IGDBJtagConstants {
-
+
// Debugger
public static final String ATTR_USE_REMOTE_TARGET = Activator.PLUGIN_ID + ".useRemoteTarget"; //$NON-NLS-1$
public static final String ATTR_IP_ADDRESS = Activator.PLUGIN_ID + ".ipAddress"; //$NON-NLS-1$
public static final String ATTR_PORT_NUMBER = Activator.PLUGIN_ID + ".portNumber"; //$NON-NLS-1$
/** @deprecated Use {@link #ATTR_JTAG_DEVICE ID} instead */
public static final String ATTR_JTAG_DEVICE = Activator.PLUGIN_ID + ".jtagDevice"; //$NON-NLS-1$
- /** @since 9.2 */ public static final String ATTR_JTAG_DEVICE_ID = Activator.PLUGIN_ID + ".jtagDeviceId"; //$NON-NLS-1$
-
+ /** @since 9.2 */
+ public static final String ATTR_JTAG_DEVICE_ID = Activator.PLUGIN_ID + ".jtagDeviceId"; //$NON-NLS-1$
+
public static final boolean DEFAULT_USE_REMOTE_TARGET = true;
public static final String DEFAULT_IP_ADDRESS = "unspecified-ip-address"; //$NON-NLS-1$
public static final int DEFAULT_PORT_NUMBER = 0;
@@ -51,11 +52,16 @@ public interface IGDBJtagConstants {
public static final String ATTR_STOP_AT = Activator.PLUGIN_ID + ".stopAt"; //$NON-NLS-1$
public static final String ATTR_SET_RESUME = Activator.PLUGIN_ID + ".setResume"; //$NON-NLS-1$
public static final String ATTR_RUN_COMMANDS = Activator.PLUGIN_ID + ".runCommands"; //$NON-NLS-1$
- /** @since 7.0 */ public static final String ATTR_CONNECTION = Activator.PLUGIN_ID + ".connection"; //$NON-NLS-1$
- /** @since 7.0 */ public static final String ATTR_USE_PROJ_BINARY_FOR_IMAGE = Activator.PLUGIN_ID + ".useProjBinaryForImage"; //$NON-NLS-1$
- /** @since 7.0 */ public static final String ATTR_USE_FILE_FOR_IMAGE = Activator.PLUGIN_ID + ".useFileForImage"; //$NON-NLS-1$
- /** @since 7.0 */ public static final String ATTR_USE_PROJ_BINARY_FOR_SYMBOLS = Activator.PLUGIN_ID + ".useProjBinaryForSymbols"; //$NON-NLS-1$
- /** @since 7.0 */ public static final String ATTR_USE_FILE_FOR_SYMBOLS = Activator.PLUGIN_ID + ".useFileForSymbols"; //$NON-NLS-1$
+ /** @since 7.0 */
+ public static final String ATTR_CONNECTION = Activator.PLUGIN_ID + ".connection"; //$NON-NLS-1$
+ /** @since 7.0 */
+ public static final String ATTR_USE_PROJ_BINARY_FOR_IMAGE = Activator.PLUGIN_ID + ".useProjBinaryForImage"; //$NON-NLS-1$
+ /** @since 7.0 */
+ public static final String ATTR_USE_FILE_FOR_IMAGE = Activator.PLUGIN_ID + ".useFileForImage"; //$NON-NLS-1$
+ /** @since 7.0 */
+ public static final String ATTR_USE_PROJ_BINARY_FOR_SYMBOLS = Activator.PLUGIN_ID + ".useProjBinaryForSymbols"; //$NON-NLS-1$
+ /** @since 7.0 */
+ public static final String ATTR_USE_FILE_FOR_SYMBOLS = Activator.PLUGIN_ID + ".useFileForSymbols"; //$NON-NLS-1$
public static final boolean DEFAULT_DO_RESET = false;
public static final boolean DEFAULT_DO_HALT = false;
@@ -67,25 +73,40 @@ public interface IGDBJtagConstants {
public static final boolean DEFAULT_SET_RESUME = false;
public static final boolean DEFAULT_USE_DEFAULT_RUN = true;
- /** @since 7.0 */ public static final String DEFAULT_CONNECTION = "unspecified-ip-address:unspecified-port-number"; //$NON-NLS-1$
- /** @since 7.0 */ public static final String DEFAULT_INIT_COMMANDS = ""; //$NON-NLS-1$
- /** @since 7.0 */ public static final String DEFAULT_IMAGE_FILE_NAME = ""; //$NON-NLS-1$
- /** @since 7.0 */ public static final String DEFAULT_SYMBOLS_FILE_NAME = ""; //$NON-NLS-1$
- /** @since 7.0 */ public static final String DEFAULT_RUN_COMMANDS = ""; //$NON-NLS-1$
- /** @since 7.0 */ public static final boolean DEFAULT_USE_PROJ_BINARY_FOR_IMAGE = true;
- /** @since 7.0 */ public static final boolean DEFAULT_USE_FILE_FOR_IMAGE = false;
- /** @since 7.0 */ public static final boolean DEFAULT_USE_PROJ_BINARY_FOR_SYMBOLS = true;
- /** @since 7.0 */ public static final boolean DEFAULT_USE_FILE_FOR_SYMBOLS = false;
- /** @since 7.0 */ public static final String DEFAULT_IMAGE_OFFSET = ""; //$NON-NLS-1$
- /** @since 7.0 */ public static final String DEFAULT_SYMBOLS_OFFSET = ""; //$NON-NLS-1$
- /** @since 7.0 */ public static final String DEFAULT_PC_REGISTER = ""; //$NON-NLS-1$
- /** @since 7.0 */ public static final String DEFAULT_STOP_AT = ""; //$NON-NLS-1$
- /** @since 9.2 */ public static final String DEFAULT_JTAG_DEVICE_ID = ""; //$NON-NLS-1$
- /** @since 9.2 */ public static final String DEFAULT_JTAG_DEVICE_NAME = ""; //$NON-NLS-1$
+ /** @since 7.0 */
+ public static final String DEFAULT_CONNECTION = "unspecified-ip-address:unspecified-port-number"; //$NON-NLS-1$
+ /** @since 7.0 */
+ public static final String DEFAULT_INIT_COMMANDS = ""; //$NON-NLS-1$
+ /** @since 7.0 */
+ public static final String DEFAULT_IMAGE_FILE_NAME = ""; //$NON-NLS-1$
+ /** @since 7.0 */
+ public static final String DEFAULT_SYMBOLS_FILE_NAME = ""; //$NON-NLS-1$
+ /** @since 7.0 */
+ public static final String DEFAULT_RUN_COMMANDS = ""; //$NON-NLS-1$
+ /** @since 7.0 */
+ public static final boolean DEFAULT_USE_PROJ_BINARY_FOR_IMAGE = true;
+ /** @since 7.0 */
+ public static final boolean DEFAULT_USE_FILE_FOR_IMAGE = false;
+ /** @since 7.0 */
+ public static final boolean DEFAULT_USE_PROJ_BINARY_FOR_SYMBOLS = true;
+ /** @since 7.0 */
+ public static final boolean DEFAULT_USE_FILE_FOR_SYMBOLS = false;
+ /** @since 7.0 */
+ public static final String DEFAULT_IMAGE_OFFSET = ""; //$NON-NLS-1$
+ /** @since 7.0 */
+ public static final String DEFAULT_SYMBOLS_OFFSET = ""; //$NON-NLS-1$
+ /** @since 7.0 */
+ public static final String DEFAULT_PC_REGISTER = ""; //$NON-NLS-1$
+ /** @since 7.0 */
+ public static final String DEFAULT_STOP_AT = ""; //$NON-NLS-1$
+ /** @since 9.2 */
+ public static final String DEFAULT_JTAG_DEVICE_ID = ""; //$NON-NLS-1$
+ /** @since 9.2 */
+ public static final String DEFAULT_JTAG_DEVICE_NAME = ""; //$NON-NLS-1$
/**
* @since 7.0
* @deprecated Use either {@link #DEFAULT_JTAG_DEVICE_ID} or {@link #DEFAULT_JTAG_DEVICE_NAME}
*/
public static final String DEFAULT_JTAG_DEVICE = ""; //$NON-NLS-1$
-
+
}
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/Messages.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/Messages.java
index 1ff947ce58..f1a886f631 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/Messages.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/Messages.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* QNX Software Systems - initial API and implementation
*******************************************************************************/
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl.java
index 1cc3c35053..240be503e7 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Ericsson - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,6 @@ import org.eclipse.cdt.dsf.mi.service.command.CommandFactory;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.debug.core.ILaunchConfiguration;
-
/**
* Jtag control service which selects the Jtag CompleteInitializationSequence.
* Use for GDB < 7.0
@@ -36,7 +35,8 @@ public class GDBJtagControl extends GDBControl {
}
@Override
- protected Sequence getCompleteInitializationSequence(Map<String,Object> attributes, RequestMonitorWithProgress rm) {
+ protected Sequence getCompleteInitializationSequence(Map<String, Object> attributes,
+ RequestMonitorWithProgress rm) {
return new GDBJtagDSFFinalLaunchSequence(getSession(), attributes, rm);
}
} \ No newline at end of file
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_0.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_0.java
index b6736ccb69..5cec13c510 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_0.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_0.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Ericsson - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,6 @@ import org.eclipse.cdt.dsf.mi.service.command.CommandFactory;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.debug.core.ILaunchConfiguration;
-
/**
* Jtag control service which selects the Jtag CompleteInitializationSequence.
* Use for GDB >= 7.0
@@ -36,7 +35,8 @@ public class GDBJtagControl_7_0 extends GDBControl_7_0 {
}
@Override
- protected Sequence getCompleteInitializationSequence(Map<String,Object> attributes, RequestMonitorWithProgress rm) {
+ protected Sequence getCompleteInitializationSequence(Map<String, Object> attributes,
+ RequestMonitorWithProgress rm) {
return new GDBJtagDSFFinalLaunchSequence(getSession(), attributes, rm);
}
} \ No newline at end of file
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_12.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_12.java
index bd7e947cbf..c597ba151b 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_12.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_12.java
@@ -22,7 +22,7 @@ import org.eclipse.debug.core.ILaunchConfiguration;
/**
* Jtag control service which selects the Jtag CompleteInitializationSequence. Used for GDB >= 7.12
- *
+ *
* @since 9.1
*/
public class GDBJtagControl_7_12 extends GDBControl_7_12 {
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_2.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_2.java
index f2efbf0a74..d503801cb0 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_2.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_2.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Ericsson - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,6 @@ import org.eclipse.cdt.dsf.mi.service.command.CommandFactory;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.debug.core.ILaunchConfiguration;
-
/**
* Jtag control service which selects the Jtag CompleteInitializationSequence.
* Use for GDB >= 7.2
@@ -36,7 +35,8 @@ public class GDBJtagControl_7_2 extends GDBControl_7_2 {
}
@Override
- protected Sequence getCompleteInitializationSequence(Map<String,Object> attributes, RequestMonitorWithProgress rm) {
+ protected Sequence getCompleteInitializationSequence(Map<String, Object> attributes,
+ RequestMonitorWithProgress rm) {
return new GDBJtagDSFFinalLaunchSequence_7_2(getSession(), attributes, rm);
}
} \ No newline at end of file
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_4.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_4.java
index 9de6e412f0..e8bf58d9e8 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_4.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_4.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Marc Khouzam (Ericsson) - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,6 @@ import org.eclipse.cdt.dsf.mi.service.command.CommandFactory;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.debug.core.ILaunchConfiguration;
-
/**
* Jtag control service which selects the Jtag CompleteInitializationSequence.
* Use for GDB >= 7.2
@@ -34,9 +33,10 @@ public class GDBJtagControl_7_4 extends GDBControl_7_4 {
public GDBJtagControl_7_4(DsfSession session, ILaunchConfiguration config, CommandFactory factory) {
super(session, config, factory);
}
-
+
@Override
- protected Sequence getCompleteInitializationSequence(Map<String,Object> attributes, RequestMonitorWithProgress rm) {
+ protected Sequence getCompleteInitializationSequence(Map<String, Object> attributes,
+ RequestMonitorWithProgress rm) {
return new GDBJtagDSFFinalLaunchSequence_7_2(getSession(), attributes, rm);
}
} \ No newline at end of file
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_7.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_7.java
index bcf8685789..5040ab64f1 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_7.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_7.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Marc Khouzam (Ericsson) - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,6 @@ import org.eclipse.cdt.dsf.mi.service.command.CommandFactory;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.debug.core.ILaunchConfiguration;
-
/**
* Jtag control service which selects the Jtag CompleteInitializationSequence.
* Use for GDB >= 7.7
@@ -34,9 +33,10 @@ public class GDBJtagControl_7_7 extends GDBControl_7_7 {
public GDBJtagControl_7_7(DsfSession session, ILaunchConfiguration config, CommandFactory factory) {
super(session, config, factory);
}
-
+
@Override
- protected Sequence getCompleteInitializationSequence(Map<String,Object> attributes, RequestMonitorWithProgress rm) {
+ protected Sequence getCompleteInitializationSequence(Map<String, Object> attributes,
+ RequestMonitorWithProgress rm) {
return new GDBJtagDSFFinalLaunchSequence_7_7(getSession(), attributes, rm);
}
} \ No newline at end of file
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GdbJtagDebugServicesFactory.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GdbJtagDebugServicesFactory.java
index e80dd2af1d..c30bd15aab 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GdbJtagDebugServicesFactory.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GdbJtagDebugServicesFactory.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Ericsson - initial API and implementation
* Marc Khouzam (Ericsson) - Added support for the different GDBControl versions (Bug 324101)
@@ -29,7 +29,7 @@ public class GdbJtagDebugServicesFactory extends GdbDebugServicesFactory {
/** @since 9.0 */
public GdbJtagDebugServicesFactory(String version, ILaunchConfiguration config) {
super(version, config);
- }
+ }
@Override
protected ICommandControl createCommandControl(DsfSession session, ILaunchConfiguration config) {
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/extensions/GDBJtagControl_HEAD.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/extensions/GDBJtagControl_HEAD.java
index 49b949ec4e..45817a4317 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/extensions/GDBJtagControl_HEAD.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/extensions/GDBJtagControl_HEAD.java
@@ -19,7 +19,7 @@ import org.eclipse.debug.core.ILaunchConfiguration;
/**
* Top-level class in the version hierarchy of the JTag implementations of {@link ICommandControlService}.
- * <br>
+ * <br>
* Extenders should subclass this class for their special needs, which will allow
* them to always extend the most recent version of the service.
* For example, if GDB<Service>_7_9 is added, this GDB<Service>_HEAD class
@@ -31,25 +31,27 @@ import org.eclipse.debug.core.ILaunchConfiguration;
* not be desirable. Extenders should update how they extend
* GdbDebugServicesFactory to properly choose the version of the
* service that should be used for older GDBs.
- *
+ *
* On the contrary, not using GDB<Service>_HEAD requires the
* extender to update how they extend GdbDebugServicesFactory
* whenever a new GDB<Service> version is added.
- *
+ *
* Extenders that prefer to focus on the latest GDB version are
* encouraged to extend GDB<Service>_HEAD.
- *
+ *
* @since 8.5
*/
public class GDBJtagControl_HEAD extends GDBJtagControl_7_12 {
public GDBJtagControl_HEAD(DsfSession session, ILaunchConfiguration config, CommandFactory factory) {
super(session, config, factory);
-
+
validateGdbVersion(session);
}
-
- protected String getMinGDBVersionSupported() { return GdbDebugServicesFactory.GDB_7_12_VERSION; }
-
+
+ protected String getMinGDBVersionSupported() {
+ return GdbDebugServicesFactory.GDB_7_12_VERSION;
+ }
+
protected void validateGdbVersion(DsfSession session) {
GdbDebugServicesFactory.validateGdbVersion(session, getMinGDBVersionSupported(), this);
}
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/DefaultGDBJtagDeviceImpl.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/DefaultGDBJtagDeviceImpl.java
index bf6fce9dda..fc5b02278e 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/DefaultGDBJtagDeviceImpl.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/DefaultGDBJtagDeviceImpl.java
@@ -83,12 +83,12 @@ public class DefaultGDBJtagDeviceImpl implements IGDBJtagDevice {
*/
@Override
public void doContinue(Collection<String> commands) {
- // The CLI version "continue" causes GDB to block and would not be
- // able to respond other MI commands, this is a problem
- // when running in async mode as it depends on the processing
- // of MI commands e.g. to suspend the program.
- // Therefore we need to use the MI command version "-exec-continue"
- // which does not block GDB.
+ // The CLI version "continue" causes GDB to block and would not be
+ // able to respond other MI commands, this is a problem
+ // when running in async mode as it depends on the processing
+ // of MI commands e.g. to suspend the program.
+ // Therefore we need to use the MI command version "-exec-continue"
+ // which does not block GDB.
String cmd = "-exec-continue"; //$NON-NLS-1$
addCmd(commands, cmd);
}
@@ -98,7 +98,7 @@ public class DefaultGDBJtagDeviceImpl implements IGDBJtagDevice {
*/
@Override
public void doLoadImage(String imageFileName, String imageOffset, Collection<String> commands) {
- addCmd(commands, "load " + escapeScpaces(imageFileName) + ' ' + imageOffset);
+ addCmd(commands, "load " + escapeScpaces(imageFileName) + ' ' + imageOffset);
}
/* (non-Javadoc)
@@ -109,14 +109,15 @@ public class DefaultGDBJtagDeviceImpl implements IGDBJtagDevice {
String file = escapeScpaces(symbolFileName);
if (symbolOffset == null || (symbolOffset.length() == 0)) {
addCmd(commands, "symbol-file " + file);
- }
- else {
+ } else {
addCmd(commands, "add-symbol-file " + file + " " + symbolOffset);
}
}
-
+
protected String escapeScpaces(String file) {
- if (file.indexOf(' ') >= 0) { return '"' + file + '"'; }
+ if (file.indexOf(' ') >= 0) {
+ return '"' + file + '"';
+ }
return file;
}
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GDBJtagDeviceContribution.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GDBJtagDeviceContribution.java
index 3fe0c97fd5..da412e5ce2 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GDBJtagDeviceContribution.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GDBJtagDeviceContribution.java
@@ -91,7 +91,8 @@ public class GDBJtagDeviceContribution {
}
public IGDBJtagDevice getDevice() throws NullPointerException {
- if (device != null) return device;
+ if (device != null)
+ return device;
Object o = null;
try {
o = Platform.getBundle(deviceClassBundleName).loadClass(deviceClassName).newInstance();
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GDBJtagDeviceContributionFactory.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GDBJtagDeviceContributionFactory.java
index 725a11b827..12b9582b80 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GDBJtagDeviceContributionFactory.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GDBJtagDeviceContributionFactory.java
@@ -40,16 +40,15 @@ public class GDBJtagDeviceContributionFactory {
contributions = new ArrayList<GDBJtagDeviceContribution>();
loadSubtypeContributions();
}
-
+
public GDBJtagDeviceContribution[] getGDBJtagDeviceContribution() {
- return contributions.toArray(
- new GDBJtagDeviceContribution[contributions.size()]);
+ return contributions.toArray(new GDBJtagDeviceContribution[contributions.size()]);
}
private void loadSubtypeContributions() {
- IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint(
- Activator.getUniqueIdentifier(), EXTENSION_POINT_NAME);
+ IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint(Activator.getUniqueIdentifier(),
+ EXTENSION_POINT_NAME);
if (ep == null)
return;
IConfigurationElement[] elements = ep.getConfigurationElements();
@@ -59,8 +58,9 @@ public class GDBJtagDeviceContributionFactory {
String id = getRequired(configurationElement, "id"); //$NON-NLS-1$
String name = getRequired(configurationElement, "name"); //$NON-NLS-1$
String className = getRequired(configurationElement, "class"); //$NON-NLS-1$
- String connection = getOptional(configurationElement, "default_connection", IGDBJtagConstants.DEFAULT_CONNECTION); //$NON-NLS-1$
- GDBJtagDeviceContribution adapter = new GDBJtagDeviceContribution();
+ String connection = getOptional(configurationElement, "default_connection", //$NON-NLS-1$
+ IGDBJtagConstants.DEFAULT_CONNECTION);
+ GDBJtagDeviceContribution adapter = new GDBJtagDeviceContribution();
adapter.setDeviceId(id);
adapter.setDeviceName(name);
adapter.setDeviceClassName(className);
@@ -86,10 +86,10 @@ public class GDBJtagDeviceContributionFactory {
private static String getRequired(IConfigurationElement configurationElement, String name) {
String elementValue = configurationElement.getAttribute(name);
if (elementValue == null)
- Activator.log(new Status(IStatus.ERROR, Activator.getUniqueIdentifier(),
- DebugPlugin.INTERNAL_ERROR, "Extension "
- + configurationElement.getDeclaringExtension().getUniqueIdentifier()
- + " missing required attribute: " + name, null));
+ Activator.log(new Status(IStatus.ERROR, Activator.getUniqueIdentifier(), DebugPlugin.INTERNAL_ERROR,
+ "Extension " + configurationElement.getDeclaringExtension().getUniqueIdentifier()
+ + " missing required attribute: " + name,
+ null));
return elementValue;
}
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GenericDevice.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GenericDevice.java
index a00cd68569..b3d1a18321 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GenericDevice.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/GenericDevice.java
@@ -22,7 +22,7 @@ public class GenericDevice extends DefaultGDBJtagDeviceImpl {
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.DefaultGDBJtagDeviceImpl#doDelay(int, java.util.Collection)
*/
@Override
- public void doDelay(int delay, Collection <String>commands) {
+ public void doDelay(int delay, Collection<String> commands) {
}
/* (non-Javadoc)
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/IGDBJtagDevice.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/IGDBJtagDevice.java
index 1c09b2ba7e..c854cee390 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/IGDBJtagDevice.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/IGDBJtagDevice.java
@@ -27,7 +27,7 @@ public interface IGDBJtagDevice {
/**
* Device reset command
- *
+ *
* @param commands
* implementation should populate the collection with the gdb
* commands that will reset the device, or leave the collection
@@ -38,14 +38,14 @@ public interface IGDBJtagDevice {
/**
* Default device delay in millisecond
- *
+ *
* @return delay in second
*/
public int getDefaultDelay();
/**
* Target needs some delay in order to initialize
- *
+ *
* @param delay
* delay in second
* @param commands
@@ -59,7 +59,7 @@ public interface IGDBJtagDevice {
/**
* Target needs to be in pause mode in order to do JTAG debug. This should
* happen before the target MMU takes control
- *
+ *
* @param commands
* implementation should populate the collection with the gdb
* commands that will halt the target, or leave the collection
@@ -70,7 +70,7 @@ public interface IGDBJtagDevice {
/**
* Commands to connect to remote JTAG device
- *
+ *
* @param ip
* host name of IP address of JTAG device
* @param port
@@ -89,7 +89,7 @@ public interface IGDBJtagDevice {
/**
* Commands to download the executable binary to target
- *
+ *
* @param imageFileName
* executable binary file name
* @param imageOffset
@@ -105,7 +105,7 @@ public interface IGDBJtagDevice {
/**
* Commands to get gdb to consume the symbolics information in the given
* file
- *
+ *
* @param symbolFileName
* symbols file name
* @param symbolOffset
@@ -120,7 +120,7 @@ public interface IGDBJtagDevice {
/**
* Commands to set initial program counter
- *
+ *
* @param pc
* program counter
* @param commands
@@ -132,7 +132,7 @@ public interface IGDBJtagDevice {
/**
* Commands to set initial breakpoint
- *
+ *
* @param stopAt
* initial breakpoint location
* @param commands
@@ -145,7 +145,7 @@ public interface IGDBJtagDevice {
/**
* De-freeze the target in order to start debugging
- *
+ *
* @param commands
* implementation should populate the collection with the gdb
* commands that will resume the target, or leave the collection
@@ -156,7 +156,7 @@ public interface IGDBJtagDevice {
/**
* 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
@@ -167,7 +167,7 @@ public interface IGDBJtagDevice {
/**
* Device specific default port number
- *
+ *
* @return default port number
* @deprecated an implementor should adapt to IGDBJtagConnection instead of
* implementing this method (implementation should throw
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/MacraigorUsb2Demon.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/MacraigorUsb2Demon.java
index d8be189448..0d471cbb1a 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/MacraigorUsb2Demon.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/MacraigorUsb2Demon.java
@@ -16,7 +16,6 @@ package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
import java.util.Collection;
-
/**
* @author ajin
*
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/OpenOCDPipe.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/OpenOCDPipe.java
index 581165f970..a13c3a719c 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/OpenOCDPipe.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/OpenOCDPipe.java
@@ -17,7 +17,6 @@ package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
import java.util.Collection;
-
/**
* @since 9.2
*/
@@ -27,7 +26,7 @@ public class OpenOCDPipe extends DefaultGDBJtagConnectionImpl {
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.DefaultGDBJtagConnectionImpl#doDelay(int, java.util.Collection)
*/
@Override
- public void doDelay(int delay, Collection <String>commands) {
+ public void doDelay(int delay, Collection<String> commands) {
addCmd(commands, "monitor sleep " + String.valueOf(delay * 1000)); //$NON-NLS-1$
}
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/OpenOCDSocket.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/OpenOCDSocket.java
index 6724973d91..b3d2c625f2 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/OpenOCDSocket.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/OpenOCDSocket.java
@@ -17,7 +17,6 @@ package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
import java.util.Collection;
-
/**
* @since 9.2
*/
@@ -35,7 +34,7 @@ public class OpenOCDSocket extends DefaultGDBJtagDeviceImpl {
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.DefaultGDBJtagDeviceImpl#doDelay(int, java.util.Collection)
*/
@Override
- public void doDelay(int delay, Collection <String>commands) {
+ public void doDelay(int delay, Collection<String> commands) {
addCmd(commands, "monitor sleep " + String.valueOf(delay * 1000)); //$NON-NLS-1$
}
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/Activator.java b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/Activator.java
index 131de3be95..9acb75b1d6 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/Activator.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/Activator.java
@@ -40,7 +40,7 @@ public class Activator extends AbstractUIPlugin {
// The shared instance
private static Activator plugin;
-
+
/**
* The constructor
*/
@@ -79,16 +79,17 @@ public class Activator extends AbstractUIPlugin {
/**
* Logs the specified status with this plug-in's log.
- *
+ *
* @param status
* status to log
*/
static void log(IStatus status) {
getDefault().getLog().log(status);
}
+
/**
* Logs an internal error with the specified message.
- *
+ *
* @param message
* the error message to log
*/
@@ -98,16 +99,16 @@ public class Activator extends AbstractUIPlugin {
/**
* Logs an internal error with the specified throwable
- *
+ *
* @param e
* the exception to be logged
*/
static void log(Throwable e) {
log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, e.getMessage(), e));
}
-
+
private void setDefaultLaunchDelegates() {
- // Set the default launch delegates as early as possible, and do it only once (Bug 312997)
+ // Set the default launch delegates as early as possible, and do it only once (Bug 312997)
ILaunchManager launchMgr = DebugPlugin.getDefault().getLaunchManager();
HashSet<String> debugSet = new HashSet<String>();
@@ -124,6 +125,7 @@ public class Activator extends AbstractUIPlugin {
}
}
}
- } catch (CoreException e) {}
+ } catch (CoreException e) {
+ }
}
}
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 db207649e9..c2913f739d 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
@@ -11,8 +11,8 @@
* Contributors:
* QNX Software Systems - Initial API and implementation
* Andy Jin - Hardware debugging UI improvements, bug 229946
- * Anna Dushistova (MontaVista) - bug 241279
- * - Hardware Debugging: Host name or ip address not saving in
+ * Anna Dushistova (MontaVista) - bug 241279
+ * - Hardware Debugging: Host name or ip address not saving in
* the debug configuration
* Andy Jin (QNX) - Added DSF debugging, bug 248593
* Bruce Griffith, Sage Electronic Engineering, LLC - bug 305943
@@ -123,10 +123,10 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
createCommandControl(group);
createRemoteControl(comp);
-
+
fUpdateThreadlistOnSuspend = new Button(comp, SWT.CHECK);
fUpdateThreadlistOnSuspend.setText(Messages.getString("GDBJtagDebuggerTab.update_thread_list_on_suspend"));
- fUpdateThreadlistOnSuspend .addSelectionListener(new SelectionAdapter() {
+ fUpdateThreadlistOnSuspend.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
updateLaunchConfigurationDialog();
@@ -137,9 +137,11 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
fUpdateThreadlistOnSuspend.setLayoutData(gd);
// This checkbox needs an explanation. Attach context help to it.
- PlatformUI.getWorkbench().getHelpSystem().setHelp(fUpdateThreadlistOnSuspend, "org.eclipse.cdt.dsf.gdb.ui.update_threadlist_button_context"); //$NON-NLS-1$
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(fUpdateThreadlistOnSuspend,
+ "org.eclipse.cdt.dsf.gdb.ui.update_threadlist_button_context"); //$NON-NLS-1$
// Attach context help to this tab.
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_DEBBUGER_TAB);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(),
+ ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_DEBBUGER_TAB);
}
private void browseButtonSelected(String title, Text text) {
@@ -147,9 +149,11 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
dialog.setText(title);
String str = text.getText().trim();
int lastSeparatorIndex = str.lastIndexOf(File.separator);
- if (lastSeparatorIndex != -1) dialog.setFilterPath(str.substring(0, lastSeparatorIndex));
+ if (lastSeparatorIndex != -1)
+ dialog.setFilterPath(str.substring(0, lastSeparatorIndex));
str = dialog.open();
- if (str != null) text.setText(str);
+ if (str != null)
+ text.setText(str);
}
private void variablesButtonSelected(Text text) {
@@ -222,8 +226,7 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
updateLaunchConfigurationDialog();
}
});
-
-
+
remoteTimeoutEnabled = new Button(group, SWT.CHECK);
remoteTimeoutEnabled.setText(Messages.getString("GDBJtagDebuggerTab.remoteTimeout"));
remoteTimeoutEnabled.setToolTipText(Messages.getString("GDBJtagDebuggerTab.remoteTimeoutTooltip"));
@@ -269,25 +272,25 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
remoteConnectParmsLayout = new StackLayout();
remoteConnectionParameters.setLayout(remoteConnectParmsLayout);
remoteConnectionParameters.setLayoutData(GridDataFactory.swtDefaults().span(2, 1).create());
-
+
//
- // Create entry fields for TCP/IP connections
+ // 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);
@@ -295,18 +298,18 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
gd.widthHint = 125;
portNumber.setLayoutData(gd);
}
-
+
//
- // Create entry fields for other types of connections
+ // Create entry fields for other types of connections
//
-
+
{
remoteConnectionBox = new Composite(remoteConnectionParameters, SWT.NO_TRIM | SWT.NO_FOCUS);
layout = new GridLayout();
layout.numColumns = 2;
remoteConnectionBox.setLayout(layout);
remoteConnectionBox.setBackground(remoteConnectionParameters.getParent().getBackground());
-
+
label = new Label(remoteConnectionBox, SWT.NONE);
label.setText(Messages.getString("GDBJtagDebuggerTab.connectionLabel")); //$NON-NLS-1$
connection = new Text(remoteConnectionBox, SWT.BORDER);
@@ -343,7 +346,7 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
public void modifyText(ModifyEvent e) {
scheduleUpdateJob(); // provides much better performance for Text listeners
}
- });
+ });
}
/**
@@ -351,7 +354,9 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
*/
@SuppressWarnings("deprecation")
protected void updateDeviceIpPort(String selectedDeviceName) {
- if (selectedDeviceName.equals(savedJtagDevice)) { return; }
+ if (selectedDeviceName.equals(savedJtagDevice)) {
+ return;
+ }
GDBJtagDeviceContribution[] availableDevices = GDBJtagDeviceContributionFactory.getInstance()
.getGDBJtagDeviceContribution();
IGDBJtagDevice selectedDevice = null;
@@ -361,7 +366,7 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
selectedDevice = availableDevices[i].getDevice();
if (selectedDevice != null) {
if (selectedDevice instanceof IGDBJtagConnection) {
- IGDBJtagConnection connectionDevice = (IGDBJtagConnection)selectedDevice;
+ IGDBJtagConnection connectionDevice = (IGDBJtagConnection) selectedDevice;
connection.setText(connectionDevice.getDefaultDeviceConnection());
} else {
// support for deprecated TCP/IP based methods
@@ -379,7 +384,7 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
private void remoteTimeoutChanged() {
remoteTimeoutValue.setEnabled(remoteTimeoutEnabled.getSelection());
}
-
+
private void useRemoteChanged() {
boolean enabled = useRemote.getSelection();
remoteTimeoutEnabled.setEnabled(enabled);
@@ -388,7 +393,8 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
ipAddress.setEnabled(enabled);
portNumber.setEnabled(enabled);
connection.setEnabled(enabled);
- GDBJtagDeviceContribution selectedDeviceEntry = GDBJtagDeviceContributionFactory.getInstance().findByDeviceName(jtagDevice.getText());
+ GDBJtagDeviceContribution selectedDeviceEntry = GDBJtagDeviceContributionFactory.getInstance()
+ .findByDeviceName(jtagDevice.getText());
if ((selectedDeviceEntry == null) || (selectedDeviceEntry.getDevice() == null)) {
remoteConnectParmsLayout.topControl = null;
remoteConnectionParameters.layout();
@@ -403,7 +409,7 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
}
}
}
-
+
/**
* Returns the device name for a given device id or {@link IGDBJtagConstants.DEFAULT_JTAG_DEVICE_NAME}
*
@@ -412,7 +418,8 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
* @since 8.1
*/
protected String getDeviceNameForDeviceId(String jtagDeviceId) {
- GDBJtagDeviceContribution contribution = GDBJtagDeviceContributionFactory.getInstance().findByDeviceId(jtagDeviceId);
+ GDBJtagDeviceContribution contribution = GDBJtagDeviceContributionFactory.getInstance()
+ .findByDeviceId(jtagDeviceId);
if (contribution != null) {
return contribution.getDeviceName();
}
@@ -427,7 +434,8 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
* @since 8.1
*/
protected String getDeviceIdForDeviceName(String jtagDeviceName) {
- GDBJtagDeviceContribution device = GDBJtagDeviceContributionFactory.getInstance().findByDeviceName(jtagDeviceName);
+ GDBJtagDeviceContribution device = GDBJtagDeviceContributionFactory.getInstance()
+ .findByDeviceName(jtagDeviceName);
if (device != null) {
return device.getDeviceId();
}
@@ -435,14 +443,14 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
}
private GDBJtagDeviceContribution getDeviceContribution(ILaunchConfiguration configuration) throws CoreException {
- String deviceId = configuration.getAttribute(IGDBJtagConstants.ATTR_JTAG_DEVICE_ID, (String)null);
+ String deviceId = configuration.getAttribute(IGDBJtagConstants.ATTR_JTAG_DEVICE_ID, (String) null);
if (deviceId != null) {
return GDBJtagDeviceContributionFactory.getInstance().findByDeviceId(deviceId);
}
// Fall back to old behavior with name only if ID is missing
@SuppressWarnings("deprecation")
- String deviceName = configuration.getAttribute(IGDBJtagConstants.ATTR_JTAG_DEVICE, (String)null);
+ String deviceName = configuration.getAttribute(IGDBJtagConstants.ATTR_JTAG_DEVICE, (String) null);
if (deviceName != null) {
return GDBJtagDeviceContributionFactory.getInstance().findByDeviceName(deviceName);
}
@@ -455,8 +463,9 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
public void initializeFrom(ILaunchConfiguration configuration) {
try {
String defaultGdbCommand = Platform.getPreferencesService().getString(GdbPlugin.PLUGIN_ID,
- IGdbDebugPreferenceConstants.PREF_DEFAULT_GDB_COMMAND,"", null); //$NON-NLS-1$
- String gdbCommandAttr = configuration.getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, defaultGdbCommand);
+ IGdbDebugPreferenceConstants.PREF_DEFAULT_GDB_COMMAND, "", null); //$NON-NLS-1$
+ String gdbCommandAttr = configuration.getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME,
+ defaultGdbCommand);
gdbCommand.setText(gdbCommandAttr);
boolean useRemoteAttr = configuration.getAttribute(IGDBJtagConstants.ATTR_USE_REMOTE_TARGET,
@@ -487,22 +496,24 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
}
}
- if (storedConnection!=null) {
+ if (storedConnection != null) {
try {
connection.setText(new URI(storedConnection).getSchemeSpecificPart());
} catch (URISyntaxException e) {
Activator.log(e);
}
- }
- if (storedAddress!=null)
- {
+ }
+ if (storedAddress != null) {
// Treat as legacy network probe
ipAddress.setText(storedAddress);
- String portString = (0<storedPort)&&(storedPort<=65535) ? Integer.valueOf(storedPort).toString() : ""; //$NON-NLS-1$
+ String portString = (0 < storedPort) && (storedPort <= 65535)
+ ? Integer.valueOf(storedPort).toString()
+ : ""; //$NON-NLS-1$
portNumber.setText(portString);
}
}
- boolean updateThreadsOnSuspend = configuration.getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_UPDATE_THREADLIST_ON_SUSPEND,
+ boolean updateThreadsOnSuspend = configuration.getAttribute(
+ IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_UPDATE_THREADLIST_ON_SUSPEND,
IGDBLaunchConfigurationConstants.DEBUGGER_UPDATE_THREADLIST_ON_SUSPEND_DEFAULT);
fUpdateThreadlistOnSuspend.setSelection(updateThreadsOnSuspend);
remoteTimeoutEnabled.setSelection(
@@ -544,7 +555,8 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
}
if (!savedJtagDevice.isEmpty()) {
try {
- IGDBJtagDevice device = GDBJtagDeviceContributionFactory.getInstance().findByDeviceName(savedJtagDevice).getDevice();
+ IGDBJtagDevice device = GDBJtagDeviceContributionFactory.getInstance().findByDeviceName(savedJtagDevice)
+ .getDevice();
if (device instanceof IGDBJtagConnection) {
String conn = connection.getText().trim();
URI uri = new URI("gdb", conn, ""); //$NON-NLS-1$ //$NON-NLS-2$
@@ -572,15 +584,15 @@ public class GDBJtagDSFDebuggerTab extends AbstractLaunchConfigurationTab {
@Override
public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
String defaultGdbCommand = Platform.getPreferencesService().getString(GdbPlugin.PLUGIN_ID,
- IGdbDebugPreferenceConstants.PREF_DEFAULT_GDB_COMMAND, "", null); //$NON-NLS-1$
+ IGdbDebugPreferenceConstants.PREF_DEFAULT_GDB_COMMAND, "", null); //$NON-NLS-1$
configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, defaultGdbCommand);
-
+
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);
+ IGDBLaunchConfigurationConstants.DEBUGGER_UPDATE_THREADLIST_ON_SUSPEND_DEFAULT);
}
}
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagImages.java b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagImages.java
index 8c370b7ec5..fe3efdff83 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagImages.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagImages.java
@@ -28,7 +28,7 @@ import org.eclipse.swt.graphics.Image;
public class GDBJtagImages {
private static ImageRegistry imageRegistry = new ImageRegistry();
-
+
private static URL iconBaseURL = Activator.getDefault().getBundle().getEntry("/icons/"); //$NON-NLS-1$
private static final String NAME_PREFIX = Activator.PLUGIN_ID + '.';
@@ -41,22 +41,23 @@ public class GDBJtagImages {
public static Image getDebuggerTabImage() {
return imageRegistry.get(IMG_VIEW_DEBUGGER_TAB);
}
-
+
public static Image getStartupTabImage() {
return imageRegistry.get(IMG_VIEW_STARTUP_TAB);
}
-
+
static {
createManaged(T_TABS, IMG_VIEW_DEBUGGER_TAB);
createManaged(T_TABS, IMG_VIEW_STARTUP_TAB);
}
-
+
private static void createManaged(String prefix, String name) {
- imageRegistry.put(name, ImageDescriptor.createFromURL(makeIconFileURL(prefix, name.substring(NAME_PREFIX.length()))));
+ imageRegistry.put(name,
+ ImageDescriptor.createFromURL(makeIconFileURL(prefix, name.substring(NAME_PREFIX.length()))));
}
private static URL makeIconFileURL(String prefix, String name) {
- StringBuilder buffer= new StringBuilder(prefix);
+ StringBuilder buffer = new StringBuilder(prefix);
buffer.append(name);
try {
return new URL(iconBaseURL, buffer.toString());
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagLaunchConfigurationTabGroup.java b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagLaunchConfigurationTabGroup.java
index 944747ee44..1377a6b14d 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagLaunchConfigurationTabGroup.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagLaunchConfigurationTabGroup.java
@@ -23,12 +23,11 @@ import org.eclipse.debug.ui.ILaunchConfigurationTab;
* @author Doug Schaefer
*
*/
-public class GDBJtagLaunchConfigurationTabGroup extends
- AbstractLaunchConfigurationTabGroup {
+public class GDBJtagLaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup {
@Override
public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
setTabs(new ILaunchConfigurationTab[0]);
}
-
+
}
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagStartupTab.java b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagStartupTab.java
index 9d6960083f..988faef7a9 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagStartupTab.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/GDBJtagStartupTab.java
@@ -58,36 +58,36 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
private static final String TAB_NAME = "Startup";
private static final String TAB_ID = "org.eclipse.cdt.debug.gdbjtag.ui.startuptab";
-
+
Text initCommands;
Text delay;
Button doReset;
Button doHalt;
-
+
Button loadImage;
Text imageFileName;
Button imageFileBrowseWs;
Button imageFileBrowse;
Text imageOffset;
-
+
Button loadSymbols;
Text symbolsFileName;
Button symbolsFileBrowseWs;
Button symbolsFileBrowse;
Text symbolsOffset;
-
+
Button setPcRegister;
Text pcRegister;
-
+
Button setStopAt;
Text stopAt;
-
+
Button setResume;
boolean resume = false;
-
+
Text runCommands;
-
+
// New GUI added to address bug 310304
private Button useProjectBinaryForImage;
private Button useFileForImage;
@@ -107,7 +107,7 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
public Image getImage() {
return GDBJtagImages.getStartupTabImage();
}
-
+
@Override
public void createControl(Composite parent) {
ScrolledComposite sc = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL);
@@ -124,7 +124,7 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
createLoadGroup(comp);
createRunOptionGroup(comp);
createRunGroup(comp);
-
+
sc.setMinSize(comp.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
@@ -139,21 +139,23 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
if (str != null)
text.setText(str);
}
-
+
private void browseWsButtonSelected(String title, Text text) {
- ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
- dialog.setTitle(title);
- dialog.setMessage(Messages.getString("GDBJtagStartupTab.FileBrowseWs_Message"));
- dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
- dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
- if (dialog.open() == IDialogConstants.OK_ID) {
- IResource resource = (IResource) dialog.getFirstResult();
- String arg = resource.getFullPath().toOSString();
- String fileLoc = VariablesPlugin.getDefault().getStringVariableManager().generateVariableExpression("workspace_loc", arg); //$NON-NLS-1$
- text.setText(fileLoc);
- }
+ ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(),
+ new WorkbenchContentProvider());
+ dialog.setTitle(title);
+ dialog.setMessage(Messages.getString("GDBJtagStartupTab.FileBrowseWs_Message"));
+ dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
+ dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
+ if (dialog.open() == IDialogConstants.OK_ID) {
+ IResource resource = (IResource) dialog.getFirstResult();
+ String arg = resource.getFullPath().toOSString();
+ String fileLoc = VariablesPlugin.getDefault().getStringVariableManager()
+ .generateVariableExpression("workspace_loc", arg); //$NON-NLS-1$
+ text.setText(fileLoc);
+ }
}
-
+
public void createInitGroup(Composite parent) {
Group group = new Group(parent, SWT.NONE);
GridLayout layout = new GridLayout();
@@ -161,13 +163,13 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
group.setLayoutData(gd);
group.setText(Messages.getString("GDBJtagStartupTab.initGroup_Text"));
-
+
Composite comp = new Composite(group, SWT.NONE);
layout = new GridLayout();
layout.numColumns = 2;
layout.marginHeight = 0;
comp.setLayout(layout);
-
+
doReset = new Button(comp, SWT.CHECK);
doReset.setText(Messages.getString("GDBJtagStartupTab.doReset_Text"));
doReset.addSelectionListener(new SelectionAdapter() {
@@ -194,13 +196,13 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
scheduleUpdateJob();
}
});
-
+
comp = new Composite(group, SWT.NONE);
layout = new GridLayout();
layout.numColumns = 1;
layout.marginHeight = 0;
comp.setLayout(layout);
-
+
doHalt = new Button(comp, SWT.CHECK);
doHalt.setText(Messages.getString("GDBJtagStartupTab.doHalt_Text"));
gd = new GridData();
@@ -212,7 +214,7 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
updateLaunchConfigurationDialog();
}
});
-
+
initCommands = new Text(group, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
gd = new GridData(GridData.FILL_BOTH);
gd.heightHint = 60;
@@ -223,9 +225,9 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
scheduleUpdateJob();
}
});
-
+
}
-
+
private void createLoadGroup(Composite parent) {
Group group = new Group(parent, SWT.NONE);
GridLayout layout = new GridLayout();
@@ -235,7 +237,7 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
gd.horizontalSpan = 1;
group.setLayoutData(gd);
group.setText(Messages.getString("GDBJtagStartupTab.loadGroup_Text"));
-
+
loadImage = new Button(group, SWT.CHECK);
loadImage.setText(Messages.getString("GDBJtagStartupTab.loadImage_Text"));
gd = new GridData();
@@ -248,24 +250,25 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
updateLaunchConfigurationDialog();
}
});
-
+
Composite comp = new Composite(group, SWT.NONE);
layout = new GridLayout();
layout.numColumns = 4;
comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
comp.setLayout(layout);
-
+
SelectionListener radioButtonListener = new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent e) {
updateLaunchConfigurationDialog();
updateUseFileEnablement();
}
+
@Override
public void widgetDefaultSelected(SelectionEvent e) {
}
};
-
+
useProjectBinaryForImage = new Button(comp, SWT.RADIO);
useProjectBinaryForImage.setText(Messages.getString("GDBJtagStartupTab.useProjectBinary_Label"));
useProjectBinaryForImage.setToolTipText(Messages.getString("GDBJtagStartupTab.useProjectBinary_ToolTip"));
@@ -273,18 +276,18 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
gd.horizontalSpan = 1;
useProjectBinaryForImage.setLayoutData(gd);
useProjectBinaryForImage.addSelectionListener(radioButtonListener);
-
+
projBinaryLabel1 = new Label(comp, SWT.NONE);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 3;
projBinaryLabel1.setLayoutData(gd);
-
+
useFileForImage = new Button(comp, SWT.RADIO);
useFileForImage.setText(Messages.getString("GDBJtagStartupTab.useFile_Label"));
gd = new GridData();
gd.horizontalSpan = 1;
useFileForImage.setLayoutData(gd);
- useFileForImage.addSelectionListener(radioButtonListener);
+ useFileForImage.addSelectionListener(radioButtonListener);
imageFileName = new Text(comp, SWT.BORDER);
gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -296,23 +299,23 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
scheduleUpdateJob();
}
});
-
- imageFileBrowseWs = createPushButton(comp, Messages.getString("GDBJtagStartupTab.FileBrowseWs_Label"), null);
- imageFileBrowseWs.addSelectionListener(new SelectionAdapter() {
- @Override
+
+ imageFileBrowseWs = createPushButton(comp, Messages.getString("GDBJtagStartupTab.FileBrowseWs_Label"), null);
+ imageFileBrowseWs.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
- browseWsButtonSelected(Messages.getString("GDBJtagStartupTab.imageFileBrowseWs_Title"), imageFileName);
- }
- });
-
+ browseWsButtonSelected(Messages.getString("GDBJtagStartupTab.imageFileBrowseWs_Title"), imageFileName);
+ }
+ });
+
imageFileBrowse = createPushButton(comp, Messages.getString("GDBJtagStartupTab.FileBrowse_Label"), null);
imageFileBrowse.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
browseButtonSelected(Messages.getString("GDBJtagStartupTab.imageFileBrowse_Title"), imageFileName);
}
- });
-
+ });
+
imageOffsetLabel = new Label(comp, SWT.NONE);
imageOffsetLabel.setText(Messages.getString("GDBJtagStartupTab.imageOffsetLabel_Text"));
imageOffset = new Text(comp, SWT.BORDER);
@@ -323,7 +326,8 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
imageOffset.addVerifyListener(new VerifyListener() {
@Override
public void verifyText(VerifyEvent e) {
- e.doit = (Character.isDigit(e.character) || Character.isISOControl(e.character) || "abcdef".contains(String.valueOf(e.character).toLowerCase()));
+ e.doit = (Character.isDigit(e.character) || Character.isISOControl(e.character)
+ || "abcdef".contains(String.valueOf(e.character).toLowerCase()));
}
});
imageOffset.addModifyListener(new ModifyListener() {
@@ -332,8 +336,7 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
scheduleUpdateJob();
}
});
-
-
+
loadSymbols = new Button(group, SWT.CHECK);
loadSymbols.setText(Messages.getString("GDBJtagStartupTab.loadSymbols_Text"));
gd = new GridData();
@@ -346,7 +349,7 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
updateLaunchConfigurationDialog();
}
});
-
+
comp = new Composite(group, SWT.NONE);
layout = new GridLayout();
layout.numColumns = 4;
@@ -360,19 +363,19 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
gd.horizontalSpan = 1;
useProjectBinaryForSymbols.setLayoutData(gd);
useProjectBinaryForSymbols.addSelectionListener(radioButtonListener);
-
+
projBinaryLabel2 = new Label(comp, SWT.NONE);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 3;
projBinaryLabel2.setLayoutData(gd);
-
+
useFileForSymbols = new Button(comp, SWT.RADIO);
useFileForSymbols.setText(Messages.getString("GDBJtagStartupTab.useFile_Label"));
gd = new GridData();
gd.horizontalSpan = 1;
useFileForSymbols.setLayoutData(gd);
useFileForSymbols.addSelectionListener(radioButtonListener);
-
+
symbolsFileName = new Text(comp, SWT.BORDER);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 1;
@@ -382,16 +385,17 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
public void modifyText(ModifyEvent e) {
scheduleUpdateJob();
}
- });
-
- symbolsFileBrowseWs = createPushButton(comp, Messages.getString("GDBJtagStartupTab.FileBrowseWs_Label"), null);
- symbolsFileBrowseWs.addSelectionListener(new SelectionAdapter() {
- @Override
+ });
+
+ symbolsFileBrowseWs = createPushButton(comp, Messages.getString("GDBJtagStartupTab.FileBrowseWs_Label"), null);
+ symbolsFileBrowseWs.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
- browseWsButtonSelected(Messages.getString("GDBJtagStartupTab.symbolsFileBrowseWs_Title"), symbolsFileName);
- }
- });
-
+ browseWsButtonSelected(Messages.getString("GDBJtagStartupTab.symbolsFileBrowseWs_Title"),
+ symbolsFileName);
+ }
+ });
+
symbolsFileBrowse = createPushButton(comp, Messages.getString("GDBJtagStartupTab.FileBrowse_Label"), null);
symbolsFileBrowse.addSelectionListener(new SelectionAdapter() {
@Override
@@ -399,7 +403,7 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
browseButtonSelected(Messages.getString("GDBJtagStartupTab.symbolsFileBrowse_Title"), symbolsFileName);
}
});
-
+
symbolsOffsetLabel = new Label(comp, SWT.NONE);
symbolsOffsetLabel.setText(Messages.getString("GDBJtagStartupTab.symbolsOffsetLabel_Text"));
symbolsOffset = new Text(comp, SWT.BORDER);
@@ -410,7 +414,8 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
symbolsOffset.addVerifyListener(new VerifyListener() {
@Override
public void verifyText(VerifyEvent e) {
- e.doit = (Character.isDigit(e.character) || Character.isISOControl(e.character) || "abcdef".contains(String.valueOf(e.character).toLowerCase()));
+ e.doit = (Character.isDigit(e.character) || Character.isISOControl(e.character)
+ || "abcdef".contains(String.valueOf(e.character).toLowerCase()));
}
});
symbolsOffset.addModifyListener(new ModifyListener() {
@@ -419,15 +424,15 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
scheduleUpdateJob();
}
});
-
+
}
-
+
private void updateUseFileEnablement() {
boolean enabled = loadImage.getSelection() && useFileForImage.getSelection();
imageFileName.setEnabled(enabled);
imageFileBrowseWs.setEnabled(enabled);
imageFileBrowse.setEnabled(enabled);
-
+
enabled = loadSymbols.getSelection() && useFileForSymbols.getSelection();
symbolsFileName.setEnabled(enabled);
symbolsFileBrowseWs.setEnabled(enabled);
@@ -448,7 +453,7 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
gd.horizontalSpan = 1;
group.setLayoutData(gd);
group.setText(Messages.getString("GDBJtagStartupTab.runGroup_Text"));
-
+
setPcRegister = new Button(group, SWT.CHECK);
setPcRegister.setText(Messages.getString("GDBJtagStartupTab.setPcRegister_Text"));
gd = new GridData();
@@ -460,7 +465,7 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
pcRegisterChanged();
updateLaunchConfigurationDialog();
}
- });
+ });
pcRegister = new Text(group, SWT.BORDER);
gd = new GridData();
@@ -470,7 +475,8 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
pcRegister.addVerifyListener(new VerifyListener() {
@Override
public void verifyText(VerifyEvent e) {
- e.doit = (Character.isDigit(e.character) || Character.isISOControl(e.character) || "abcdef".contains(String.valueOf(e.character).toLowerCase()));
+ e.doit = (Character.isDigit(e.character) || Character.isISOControl(e.character)
+ || "abcdef".contains(String.valueOf(e.character).toLowerCase()));
}
});
pcRegister.addModifyListener(new ModifyListener() {
@@ -479,7 +485,7 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
scheduleUpdateJob();
}
});
-
+
setStopAt = new Button(group, SWT.CHECK);
setStopAt.setText(Messages.getString("GDBJtagStartupTab.setStopAt_Text"));
gd = new GridData();
@@ -492,7 +498,7 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
updateLaunchConfigurationDialog();
}
});
-
+
stopAt = new Text(group, SWT.BORDER);
gd = new GridData();
gd.horizontalSpan = 1;
@@ -530,7 +536,7 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
}
});
}
-
+
private void doResetChanged() {
delay.setEnabled(doReset.getSelection());
}
@@ -543,28 +549,28 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
imageOffsetLabel.setEnabled(enabled);
updateUseFileEnablement();
}
-
+
private void loadSymbolsChanged() {
boolean enabled = loadSymbols.getSelection();
useProjectBinaryForSymbols.setEnabled(enabled);
useFileForSymbols.setEnabled(enabled);
symbolsOffset.setEnabled(enabled);
symbolsOffsetLabel.setEnabled(enabled);
- updateUseFileEnablement();
+ updateUseFileEnablement();
}
-
+
private void pcRegisterChanged() {
pcRegister.setEnabled(setPcRegister.getSelection());
}
-
+
private void stopAtChanged() {
stopAt.setEnabled(setStopAt.getSelection());
}
-
+
private void resumeChanged() {
resume = setResume.getSelection();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration)
*/
@@ -581,15 +587,16 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
setErrorMessage(Messages.getString("GDBJtagStartupTab.imageFileName_not_specified"));
return false;
}
-
+
try {
- String path = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(imageFileName.getText().trim());
+ String path = VariablesPlugin.getDefault().getStringVariableManager()
+ .performStringSubstitution(imageFileName.getText().trim());
IPath filePath = new Path(path);
if (!filePath.toFile().exists()) {
setErrorMessage(Messages.getString("GDBJtagStartupTab.imageFileName_does_not_exist"));
return false;
}
- } catch (CoreException e) { // string substitution throws this if expression doesn't resolve
+ } catch (CoreException e) { // string substitution throws this if expression doesn't resolve
setErrorMessage(Messages.getString("GDBJtagStartupTab.imageFileName_does_not_exist"));
return false;
}
@@ -603,15 +610,16 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
setErrorMessage(Messages.getString("GDBJtagStartupTab.symbolsFileName_not_specified"));
return false;
}
-
+
try {
- String path = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(symbolsFileName.getText().trim());
+ String path = VariablesPlugin.getDefault().getStringVariableManager()
+ .performStringSubstitution(symbolsFileName.getText().trim());
IPath filePath = new Path(path);
if (!filePath.toFile().exists()) {
setErrorMessage(Messages.getString("GDBJtagStartupTab.symbolsFileName_does_not_exist"));
return false;
}
- } catch (CoreException e) { // string substitution throws this if expression doesn't resolve
+ } catch (CoreException e) { // string substitution throws this if expression doesn't resolve
setErrorMessage(Messages.getString("GDBJtagStartupTab.symbolsFileName_does_not_exist"));
return false;
}
@@ -619,7 +627,7 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
} else {
setErrorMessage(null);
}
-
+
if (setPcRegister.getSelection()) {
if (pcRegister.getText().trim().length() == 0) {
setErrorMessage(Messages.getString("GDBJtagStartupTab.pcRegister_not_specified"));
@@ -645,7 +653,7 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
public String getId() {
return TAB_ID;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
*/
@@ -653,34 +661,56 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
public void initializeFrom(ILaunchConfiguration configuration) {
try {
// Initialization Commands
- doReset.setSelection(configuration.getAttribute(IGDBJtagConstants.ATTR_DO_RESET, IGDBJtagConstants.DEFAULT_DO_RESET));
- delay.setText(String.valueOf(configuration.getAttribute(IGDBJtagConstants.ATTR_DELAY, IGDBJtagConstants.DEFAULT_DELAY)));
- doHalt.setSelection(configuration.getAttribute(IGDBJtagConstants.ATTR_DO_HALT, IGDBJtagConstants.DEFAULT_DO_HALT));
- initCommands.setText(configuration.getAttribute(IGDBJtagConstants.ATTR_INIT_COMMANDS, IGDBJtagConstants.DEFAULT_INIT_COMMANDS));
-
+ doReset.setSelection(
+ configuration.getAttribute(IGDBJtagConstants.ATTR_DO_RESET, IGDBJtagConstants.DEFAULT_DO_RESET));
+ delay.setText(String.valueOf(
+ configuration.getAttribute(IGDBJtagConstants.ATTR_DELAY, IGDBJtagConstants.DEFAULT_DELAY)));
+ doHalt.setSelection(
+ configuration.getAttribute(IGDBJtagConstants.ATTR_DO_HALT, IGDBJtagConstants.DEFAULT_DO_HALT));
+ initCommands.setText(configuration.getAttribute(IGDBJtagConstants.ATTR_INIT_COMMANDS,
+ IGDBJtagConstants.DEFAULT_INIT_COMMANDS));
+
// Load Image...
- loadImage.setSelection(configuration.getAttribute(IGDBJtagConstants.ATTR_LOAD_IMAGE, IGDBJtagConstants.DEFAULT_LOAD_IMAGE));
- useProjectBinaryForImage.setSelection(configuration.getAttribute(IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_IMAGE, IGDBJtagConstants.DEFAULT_USE_PROJ_BINARY_FOR_IMAGE));
- useFileForImage.setSelection(configuration.getAttribute(IGDBJtagConstants.ATTR_USE_FILE_FOR_IMAGE, IGDBJtagConstants.DEFAULT_USE_FILE_FOR_IMAGE));
- imageFileName.setText(configuration.getAttribute(IGDBJtagConstants.ATTR_IMAGE_FILE_NAME, IGDBJtagConstants.DEFAULT_IMAGE_FILE_NAME));
- imageOffset.setText(configuration.getAttribute(IGDBJtagConstants.ATTR_IMAGE_OFFSET, IGDBJtagConstants.DEFAULT_IMAGE_OFFSET));
-
+ loadImage.setSelection(configuration.getAttribute(IGDBJtagConstants.ATTR_LOAD_IMAGE,
+ IGDBJtagConstants.DEFAULT_LOAD_IMAGE));
+ useProjectBinaryForImage
+ .setSelection(configuration.getAttribute(IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_IMAGE,
+ IGDBJtagConstants.DEFAULT_USE_PROJ_BINARY_FOR_IMAGE));
+ useFileForImage.setSelection(configuration.getAttribute(IGDBJtagConstants.ATTR_USE_FILE_FOR_IMAGE,
+ IGDBJtagConstants.DEFAULT_USE_FILE_FOR_IMAGE));
+ imageFileName.setText(configuration.getAttribute(IGDBJtagConstants.ATTR_IMAGE_FILE_NAME,
+ IGDBJtagConstants.DEFAULT_IMAGE_FILE_NAME));
+ imageOffset.setText(configuration.getAttribute(IGDBJtagConstants.ATTR_IMAGE_OFFSET,
+ IGDBJtagConstants.DEFAULT_IMAGE_OFFSET));
+
//.. and Symbols
- loadSymbols.setSelection(configuration.getAttribute(IGDBJtagConstants.ATTR_LOAD_SYMBOLS, IGDBJtagConstants.DEFAULT_LOAD_SYMBOLS));
- useProjectBinaryForSymbols.setSelection(configuration.getAttribute(IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_SYMBOLS, IGDBJtagConstants.DEFAULT_USE_PROJ_BINARY_FOR_SYMBOLS));
- useFileForSymbols.setSelection(configuration.getAttribute(IGDBJtagConstants.ATTR_USE_FILE_FOR_SYMBOLS, IGDBJtagConstants.DEFAULT_USE_FILE_FOR_SYMBOLS));
- symbolsFileName.setText(configuration.getAttribute(IGDBJtagConstants.ATTR_SYMBOLS_FILE_NAME, IGDBJtagConstants.DEFAULT_SYMBOLS_FILE_NAME));
- symbolsOffset.setText(configuration.getAttribute(IGDBJtagConstants.ATTR_SYMBOLS_OFFSET, IGDBJtagConstants.DEFAULT_SYMBOLS_OFFSET));
-
+ loadSymbols.setSelection(configuration.getAttribute(IGDBJtagConstants.ATTR_LOAD_SYMBOLS,
+ IGDBJtagConstants.DEFAULT_LOAD_SYMBOLS));
+ useProjectBinaryForSymbols
+ .setSelection(configuration.getAttribute(IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_SYMBOLS,
+ IGDBJtagConstants.DEFAULT_USE_PROJ_BINARY_FOR_SYMBOLS));
+ useFileForSymbols.setSelection(configuration.getAttribute(IGDBJtagConstants.ATTR_USE_FILE_FOR_SYMBOLS,
+ IGDBJtagConstants.DEFAULT_USE_FILE_FOR_SYMBOLS));
+ symbolsFileName.setText(configuration.getAttribute(IGDBJtagConstants.ATTR_SYMBOLS_FILE_NAME,
+ IGDBJtagConstants.DEFAULT_SYMBOLS_FILE_NAME));
+ symbolsOffset.setText(configuration.getAttribute(IGDBJtagConstants.ATTR_SYMBOLS_OFFSET,
+ IGDBJtagConstants.DEFAULT_SYMBOLS_OFFSET));
+
// Runtime Options
- setPcRegister.setSelection(configuration.getAttribute(IGDBJtagConstants.ATTR_SET_PC_REGISTER, IGDBJtagConstants.DEFAULT_SET_PC_REGISTER));
- pcRegister.setText(configuration.getAttribute(IGDBJtagConstants.ATTR_PC_REGISTER, IGDBJtagConstants.DEFAULT_PC_REGISTER));
- setStopAt.setSelection(configuration.getAttribute(IGDBJtagConstants.ATTR_SET_STOP_AT, IGDBJtagConstants.DEFAULT_SET_STOP_AT));
- stopAt.setText(configuration.getAttribute(IGDBJtagConstants.ATTR_STOP_AT, IGDBJtagConstants.DEFAULT_STOP_AT));
- setResume.setSelection(configuration.getAttribute(IGDBJtagConstants.ATTR_SET_RESUME, IGDBJtagConstants.DEFAULT_SET_RESUME));
-
+ setPcRegister.setSelection(configuration.getAttribute(IGDBJtagConstants.ATTR_SET_PC_REGISTER,
+ IGDBJtagConstants.DEFAULT_SET_PC_REGISTER));
+ pcRegister.setText(configuration.getAttribute(IGDBJtagConstants.ATTR_PC_REGISTER,
+ IGDBJtagConstants.DEFAULT_PC_REGISTER));
+ setStopAt.setSelection(configuration.getAttribute(IGDBJtagConstants.ATTR_SET_STOP_AT,
+ IGDBJtagConstants.DEFAULT_SET_STOP_AT));
+ stopAt.setText(
+ configuration.getAttribute(IGDBJtagConstants.ATTR_STOP_AT, IGDBJtagConstants.DEFAULT_STOP_AT));
+ setResume.setSelection(configuration.getAttribute(IGDBJtagConstants.ATTR_SET_RESUME,
+ IGDBJtagConstants.DEFAULT_SET_RESUME));
+
// Run Commands
- runCommands.setText(configuration.getAttribute(IGDBJtagConstants.ATTR_RUN_COMMANDS, IGDBJtagConstants.DEFAULT_RUN_COMMANDS));
+ runCommands.setText(configuration.getAttribute(IGDBJtagConstants.ATTR_RUN_COMMANDS,
+ IGDBJtagConstants.DEFAULT_RUN_COMMANDS));
String programName = CDebugUtils.getProgramName(configuration);
if (programName != null) {
@@ -695,7 +725,7 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
projBinaryLabel1.setText(programName);
projBinaryLabel2.setText(programName);
}
-
+
doResetChanged();
loadImageChanged();
loadSymbolsChanged();
@@ -703,7 +733,7 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
stopAtChanged();
resumeChanged();
updateUseFileEnablement();
-
+
} catch (CoreException e) {
Activator.getDefault().getLog().log(e.getStatus());
}
@@ -714,38 +744,40 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
*/
@Override
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
-
+
// Initialization Commands
configuration.setAttribute(IGDBJtagConstants.ATTR_DO_RESET, doReset.getSelection());
try {
configuration.setAttribute(IGDBJtagConstants.ATTR_DELAY, Integer.parseInt(delay.getText()));
- } catch(NumberFormatException e) {
+ } catch (NumberFormatException e) {
Activator.log(e);
}
configuration.setAttribute(IGDBJtagConstants.ATTR_DO_HALT, doHalt.getSelection());
configuration.setAttribute(IGDBJtagConstants.ATTR_INIT_COMMANDS, initCommands.getText());
-
+
// Load Image...
configuration.setAttribute(IGDBJtagConstants.ATTR_LOAD_IMAGE, loadImage.getSelection());
- configuration.setAttribute(IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_IMAGE, useProjectBinaryForImage.getSelection());
+ configuration.setAttribute(IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_IMAGE,
+ useProjectBinaryForImage.getSelection());
configuration.setAttribute(IGDBJtagConstants.ATTR_USE_FILE_FOR_IMAGE, useFileForImage.getSelection());
configuration.setAttribute(IGDBJtagConstants.ATTR_IMAGE_FILE_NAME, imageFileName.getText().trim());
configuration.setAttribute(IGDBJtagConstants.ATTR_IMAGE_OFFSET, imageOffset.getText());
-
+
//.. and Symbols
configuration.setAttribute(IGDBJtagConstants.ATTR_LOAD_SYMBOLS, loadSymbols.getSelection());
- configuration.setAttribute(IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_SYMBOLS, useProjectBinaryForSymbols.getSelection());
+ configuration.setAttribute(IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_SYMBOLS,
+ useProjectBinaryForSymbols.getSelection());
configuration.setAttribute(IGDBJtagConstants.ATTR_USE_FILE_FOR_SYMBOLS, useFileForSymbols.getSelection());
configuration.setAttribute(IGDBJtagConstants.ATTR_SYMBOLS_FILE_NAME, symbolsFileName.getText().trim());
configuration.setAttribute(IGDBJtagConstants.ATTR_SYMBOLS_OFFSET, symbolsOffset.getText());
-
+
// Runtime Options
configuration.setAttribute(IGDBJtagConstants.ATTR_SET_PC_REGISTER, setPcRegister.getSelection());
configuration.setAttribute(IGDBJtagConstants.ATTR_PC_REGISTER, pcRegister.getText());
configuration.setAttribute(IGDBJtagConstants.ATTR_SET_STOP_AT, setStopAt.getSelection());
configuration.setAttribute(IGDBJtagConstants.ATTR_STOP_AT, stopAt.getText());
configuration.setAttribute(IGDBJtagConstants.ATTR_SET_RESUME, setResume.getSelection());
-
+
// Run Commands
configuration.setAttribute(IGDBJtagConstants.ATTR_RUN_COMMANDS, runCommands.getText());
}
@@ -763,18 +795,23 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
// Load Image...
configuration.setAttribute(IGDBJtagConstants.ATTR_LOAD_IMAGE, IGDBJtagConstants.DEFAULT_LOAD_IMAGE);
- configuration.setAttribute(IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_IMAGE, IGDBJtagConstants.DEFAULT_USE_PROJ_BINARY_FOR_IMAGE);
- configuration.setAttribute(IGDBJtagConstants.ATTR_USE_FILE_FOR_IMAGE, IGDBJtagConstants.DEFAULT_USE_FILE_FOR_IMAGE);
+ configuration.setAttribute(IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_IMAGE,
+ IGDBJtagConstants.DEFAULT_USE_PROJ_BINARY_FOR_IMAGE);
+ configuration.setAttribute(IGDBJtagConstants.ATTR_USE_FILE_FOR_IMAGE,
+ IGDBJtagConstants.DEFAULT_USE_FILE_FOR_IMAGE);
configuration.setAttribute(IGDBJtagConstants.ATTR_IMAGE_FILE_NAME, IGDBJtagConstants.DEFAULT_IMAGE_FILE_NAME);
configuration.setAttribute(IGDBJtagConstants.ATTR_IMAGE_OFFSET, IGDBJtagConstants.DEFAULT_IMAGE_OFFSET);
//.. and Symbols
configuration.setAttribute(IGDBJtagConstants.ATTR_LOAD_SYMBOLS, IGDBJtagConstants.DEFAULT_LOAD_SYMBOLS);
- configuration.setAttribute(IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_SYMBOLS, IGDBJtagConstants.DEFAULT_USE_PROJ_BINARY_FOR_SYMBOLS);
- configuration.setAttribute(IGDBJtagConstants.ATTR_USE_FILE_FOR_SYMBOLS, IGDBJtagConstants.DEFAULT_USE_FILE_FOR_SYMBOLS);
- configuration.setAttribute(IGDBJtagConstants.ATTR_SYMBOLS_FILE_NAME, IGDBJtagConstants.DEFAULT_SYMBOLS_FILE_NAME);
+ configuration.setAttribute(IGDBJtagConstants.ATTR_USE_PROJ_BINARY_FOR_SYMBOLS,
+ IGDBJtagConstants.DEFAULT_USE_PROJ_BINARY_FOR_SYMBOLS);
+ configuration.setAttribute(IGDBJtagConstants.ATTR_USE_FILE_FOR_SYMBOLS,
+ IGDBJtagConstants.DEFAULT_USE_FILE_FOR_SYMBOLS);
+ configuration.setAttribute(IGDBJtagConstants.ATTR_SYMBOLS_FILE_NAME,
+ IGDBJtagConstants.DEFAULT_SYMBOLS_FILE_NAME);
configuration.setAttribute(IGDBJtagConstants.ATTR_SYMBOLS_OFFSET, IGDBJtagConstants.DEFAULT_SYMBOLS_OFFSET);
-
+
// Runtime Options
configuration.setAttribute(IGDBJtagConstants.ATTR_SET_PC_REGISTER, IGDBJtagConstants.DEFAULT_SET_PC_REGISTER);
configuration.setAttribute(IGDBJtagConstants.ATTR_PC_REGISTER, IGDBJtagConstants.DEFAULT_PC_REGISTER);
@@ -783,6 +820,6 @@ public class GDBJtagStartupTab extends AbstractLaunchConfigurationTab {
configuration.setAttribute(IGDBJtagConstants.ATTR_SET_RESUME, IGDBJtagConstants.DEFAULT_SET_RESUME);
// Run Commands
- configuration.setAttribute(IGDBJtagConstants.ATTR_RUN_COMMANDS, IGDBJtagConstants.DEFAULT_RUN_COMMANDS);
+ configuration.setAttribute(IGDBJtagConstants.ATTR_RUN_COMMANDS, IGDBJtagConstants.DEFAULT_RUN_COMMANDS);
}
}
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/Messages.java b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/Messages.java
index 094ed4e1d8..e943cc35d9 100644
--- a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/Messages.java
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/ui/Messages.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* QNX Software Systems - initial API and implementation
*******************************************************************************/
@@ -21,7 +21,7 @@ public class Messages {
private static final String BUNDLE_NAME = "org.eclipse.cdt.debug.gdbjtag.ui.JtagUi"; //$NON-NLS-1$
private static /* final */ ResourceBundle RESOURCE_BUNDLE; // = ResourceBundle.getBundle(BUNDLE_NAME);
-
+
static {
try {
RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
@@ -40,7 +40,7 @@ public class Messages {
return '!' + key + '!';
}
}
-
+
public static ResourceBundle getResourceBundle() {
return RESOURCE_BUNDLE;
}

Back to the top