Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Dallaway2018-04-20 11:20:24 -0400
committerJohn Dallaway2018-04-21 01:15:16 -0400
commit60d95da97b7b654d6346efd190aaef5211fc57ea (patch)
tree526c5d5c1bb4ec0699308cfde2a76f8517d76206
parentb56078ed968e2f0ff871fa0acdf14f7adfa72aab (diff)
downloadorg.eclipse.cdt-60d95da97b7b654d6346efd190aaef5211fc57ea.tar.gz
org.eclipse.cdt-60d95da97b7b654d6346efd190aaef5211fc57ea.tar.xz
org.eclipse.cdt-60d95da97b7b654d6346efd190aaef5211fc57ea.zip
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>
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunch.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunch.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunch.java
index 2bf27f35e8..0d61bc7b28 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunch.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunch.java
@@ -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
* are made available under the terms of the Eclipse Public License v1.0
* 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) - Create the gdb process through the process factory (Bug 210366)
* 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;
@@ -42,6 +43,7 @@ import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
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.DefaultDsfExecutor;
import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
@@ -478,7 +480,8 @@ public class GdbLaunch extends DsfLaunch implements ITerminate, IDisconnect, ITr
getDefaultGDBPath());
}
if (gdb != null) {
- gdb = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(gdb, false);
+ IProject project = getProject();
+ gdb = new DebugStringVariableSubstitutor(project).performStringSubstitution(gdb);
return new Path(gdb);
} else {
return null;

Back to the top