1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Bug 321259: Need to set environment dir before sourcing init file, so that we look for the init file in the right place

This commit is contained in:
Marc Khouzam 2010-07-29 19:40:35 +00:00
parent 48b6e9207f
commit 0718dffac3

View file

@ -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() {
@ -198,29 +221,6 @@ 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();
}
}},
/*
* Specify environment variables if needed
*/