mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Bug 399460: Resolve variables using launch context
Resolve project-related string variables within the GDB command, based on the launch configuration rather than the current selection. Change-Id: I6fc5d2f1de515624aff59397de60d0c394acf72f Signed-off-by: John Dallaway <john@dallaway.org.uk>
This commit is contained in:
parent
b56078ed96
commit
60d95da97b
1 changed files with 5 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2016 Wind River Systems and others.
|
* Copyright (c) 2006, 2018 Wind River Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -10,6 +10,7 @@
|
||||||
* Marc Khouzam (Ericsson) - Fix NPE for partial launches (Bug 368597)
|
* Marc Khouzam (Ericsson) - Fix NPE for partial launches (Bug 368597)
|
||||||
* Marc Khouzam (Ericsson) - Create the gdb process through the process factory (Bug 210366)
|
* Marc Khouzam (Ericsson) - Create the gdb process through the process factory (Bug 210366)
|
||||||
* Alvaro Sanchez-Leon (Ericsson AB) - Each memory context needs a different MemoryRetrieval (Bug 250323)
|
* Alvaro Sanchez-Leon (Ericsson AB) - Each memory context needs a different MemoryRetrieval (Bug 250323)
|
||||||
|
* John Dallaway - Resolve variables using launch context (Bug 399460)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.dsf.gdb.launching;
|
package org.eclipse.cdt.dsf.gdb.launching;
|
||||||
|
|
||||||
|
@ -42,6 +43,7 @@ import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||||
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
||||||
import org.eclipse.cdt.debug.internal.core.CRequest;
|
import org.eclipse.cdt.debug.internal.core.CRequest;
|
||||||
|
import org.eclipse.cdt.debug.internal.core.DebugStringVariableSubstitutor;
|
||||||
import org.eclipse.cdt.dsf.concurrent.ConfinedToDsfExecutor;
|
import org.eclipse.cdt.dsf.concurrent.ConfinedToDsfExecutor;
|
||||||
import org.eclipse.cdt.dsf.concurrent.DefaultDsfExecutor;
|
import org.eclipse.cdt.dsf.concurrent.DefaultDsfExecutor;
|
||||||
import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
|
import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
|
||||||
|
@ -478,7 +480,8 @@ public class GdbLaunch extends DsfLaunch implements ITerminate, IDisconnect, ITr
|
||||||
getDefaultGDBPath());
|
getDefaultGDBPath());
|
||||||
}
|
}
|
||||||
if (gdb != null) {
|
if (gdb != null) {
|
||||||
gdb = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(gdb, false);
|
IProject project = getProject();
|
||||||
|
gdb = new DebugStringVariableSubstitutor(project).performStringSubstitution(gdb);
|
||||||
return new Path(gdb);
|
return new Path(gdb);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Add table
Reference in a new issue