1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-21 21:52:10 +02:00

Bug 457697: Set executable file in launch sequence

Change-Id: I777652f3c27e0f0a680042194051592614867527
This commit is contained in:
John Dallaway 2021-03-19 15:01:46 +00:00
parent 16e0804758
commit 68879e696d
2 changed files with 22 additions and 2 deletions

View file

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.debug.gdbjtag.core;singleton:=true
Bundle-Version: 10.2.100.qualifier
Bundle-Version: 10.3.0.qualifier
Bundle-Activator: org.eclipse.cdt.debug.gdbjtag.core.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2007, 2020 QNX Software Systems and others.
* Copyright (c) 2007, 2021 QNX Software Systems and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@ -24,6 +24,7 @@
* John Dallaway - Report download progress (Bug 543149)
* John Dallaway - Use 'reset and halt' command (Bug 535163)
* John Dallaway - Eliminate deprecated API (Bug 566462)
* John Dallaway - Set executable file (Bug 457697)
*******************************************************************************/
package org.eclipse.cdt.debug.gdbjtag.core;
@ -222,6 +223,7 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
return new String[] { //
"stepInitializeJTAGFinalLaunchSequence", //$NON-NLS-1$
"stepRetrieveJTAGDevice", //$NON-NLS-1$
"stepSetExecutableFile", //$NON-NLS-1$
"stepLoadSymbols", //$NON-NLS-1$
"stepConnectToTarget", //$NON-NLS-1$
"stepResetBoard", //$NON-NLS-1$
@ -315,6 +317,24 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
rm.done();
}
/*
* Set the executable file
*/
/** @since 10.3 */
@Execute
public void stepSetExecutableFile(final RequestMonitor rm) {
final IPath programPath = fGDBBackend.getProgramPath();
if (!programPath.isEmpty()) {
// Escape backslashes for GDB
final String file = programPath.toOSString().replace("\\", "\\\\"); //$NON-NLS-1$ //$NON-NLS-2$
fCommandControl.queueCommand(
fCommandControl.getCommandFactory().createMIFileExecFile(fCommandControl.getContext(), file),
new ImmediateDataRequestMonitor<MIInfo>(rm));
} else {
rm.done();
}
}
/*
* Execute symbol loading
*/