Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jtag
diff options
context:
space:
mode:
authorMarc Khouzam2010-07-29 15:40:35 -0400
committerMarc Khouzam2010-07-29 15:40:35 -0400
commit0718dffac3a23d40627c7dd636503fc4fd77c984 (patch)
treefa68f3b22b04ce07792092a12d5192e3f9cd7f82 /jtag
parent48b6e9207fbee6977cdc7d170825dc4ed5f51398 (diff)
downloadorg.eclipse.cdt-0718dffac3a23d40627c7dd636503fc4fd77c984.tar.gz
org.eclipse.cdt-0718dffac3a23d40627c7dd636503fc4fd77c984.tar.xz
org.eclipse.cdt-0718dffac3a23d40627c7dd636503fc4fd77c984.zip
Bug 321259: Need to set environment dir before sourcing init file, so that we look for the init file in the right place
Diffstat (limited to 'jtag')
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence.java48
1 files changed, 24 insertions, 24 deletions
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 9345b81dd5..176b5f32f3 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
@@ -144,7 +144,30 @@ public class GDBJtagDSFFinalLaunchSequence extends Sequence {
requestMonitor.done();
}},
- /*
+ /*
+ * Specify GDB's working directory
+ */
+ new Step() {
+ @Override
+ public void execute(final RequestMonitor requestMonitor) {
+ IPath dir = null;
+ try {
+ dir = fGDBBackend.getGDBWorkingDirectory();
+ } catch (CoreException e) {
+ requestMonitor.setStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, -1, "Cannot get working directory", e)); //$NON-NLS-1$
+ requestMonitor.done();
+ return;
+ }
+
+ if (dir != null) {
+ fCommandControl.queueCommand(
+ fCommandFactory.createMIEnvironmentCD(fCommandControl.getContext(), dir.toPortableString()),
+ new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor));
+ } else {
+ requestMonitor.done();
+ }
+ }},
+ /*
* Source the gdbinit file specified in the launch
*/
new Step() {
@@ -199,29 +222,6 @@ public class GDBJtagDSFFinalLaunchSequence extends Sequence {
}
}},
/*
- * Specify GDB's working directory
- */
- new Step() {
- @Override
- public void execute(final RequestMonitor requestMonitor) {
- IPath dir = null;
- try {
- dir = fGDBBackend.getGDBWorkingDirectory();
- } catch (CoreException e) {
- requestMonitor.setStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, -1, "Cannot get working directory", e)); //$NON-NLS-1$
- requestMonitor.done();
- return;
- }
-
- if (dir != null) {
- fCommandControl.queueCommand(
- fCommandFactory.createMIEnvironmentCD(fCommandControl.getContext(), dir.toPortableString()),
- new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor));
- } else {
- requestMonitor.done();
- }
- }},
- /*
* Specify environment variables if needed
*/
new Step() {

Back to the top