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

Bug 413373 - Allow variable substitution in GDB command file name

Change-Id: I78f8354bdfc4b3e35cd674d29d4bd68f15860a12
Reviewed-on: https://git.eclipse.org/r/14718
Reviewed-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
IP-Clean: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
Tested-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
This commit is contained in:
Sergey Prigogin 2013-07-19 18:31:18 -07:00
parent 445f35baa0
commit a390496044

View file

@ -51,6 +51,7 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.variables.VariablesPlugin;
import org.eclipse.debug.core.ILaunch;
public class FinalLaunchSequence extends ReflectionSequence {
@ -294,11 +295,13 @@ public class FinalLaunchSequence extends ReflectionSequence {
@Execute
public void stepSourceGDBInitFile(final RequestMonitor requestMonitor) {
try {
final String gdbinitFile = fGDBBackend.getGDBInitFile();
String gdbinitFile = fGDBBackend.getGDBInitFile();
if (gdbinitFile != null && gdbinitFile.length() > 0) {
final String expandedGDBInitFile = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(gdbinitFile);
fCommandControl.queueCommand(
fCommandFactory.createCLISource(fCommandControl.getContext(), gdbinitFile),
fCommandFactory.createCLISource(fCommandControl.getContext(), expandedGDBInitFile),
new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) {
@Override
protected void handleCompleted() {
@ -306,7 +309,7 @@ public class FinalLaunchSequence extends ReflectionSequence {
// should not consider this an error.
// If it is not the default, then the user must have specified it and
// we want to warn the user if we can't find it.
if (!gdbinitFile.equals(IGDBLaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT )) {
if (!expandedGDBInitFile.equals(IGDBLaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT)) {
requestMonitor.setStatus(getStatus());
}
requestMonitor.done();