diff options
author | Alena Laskavaia | 2008-08-18 13:38:34 +0000 |
---|---|---|
committer | Alena Laskavaia | 2008-08-18 13:38:34 +0000 |
commit | c1438bceb5793ff7d338224649421967502d71b4 (patch) | |
tree | a1ba020e4c24e7a4ece5a0a9ba1fb12c63655e14 /debug/org.eclipse.cdt.debug.mi.core | |
parent | 8ffdab73fe9ab20f6b5da54ea94c3c7999afe5fa (diff) | |
download | org.eclipse.cdt-c1438bceb5793ff7d338224649421967502d71b4.tar.gz org.eclipse.cdt-c1438bceb5793ff7d338224649421967502d71b4.tar.xz org.eclipse.cdt-c1438bceb5793ff7d338224649421967502d71b4.zip |
PR: 109999 - use variable substitution for gdb command
Diffstat (limited to 'debug/org.eclipse.cdt.debug.mi.core')
-rw-r--r-- | debug/org.eclipse.cdt.debug.mi.core/META-INF/MANIFEST.MF | 3 | ||||
-rw-r--r-- | debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/AbstractGDBCDIDebugger.java | 13 |
2 files changed, 13 insertions, 3 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.core/META-INF/MANIFEST.MF b/debug/org.eclipse.cdt.debug.mi.core/META-INF/MANIFEST.MF index bbecd79b8f6..ffe4c9de3d8 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/META-INF/MANIFEST.MF +++ b/debug/org.eclipse.cdt.debug.mi.core/META-INF/MANIFEST.MF @@ -22,6 +22,7 @@ Require-Bundle: org.eclipse.cdt.debug.core;bundle-version="[5.0.0,6.0.0)", org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)", org.eclipse.debug.core;bundle-version="[3.2.0,4.0.0)", org.eclipse.cdt.core;bundle-version="[5.0.0,6.0.0)", - org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)" + org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)", + org.eclipse.core.variables Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/AbstractGDBCDIDebugger.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/AbstractGDBCDIDebugger.java index e799b9c5ca4..55b1f47ad97 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/AbstractGDBCDIDebugger.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/AbstractGDBCDIDebugger.java @@ -34,6 +34,7 @@ import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.OperationCanceledException; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Status; +import org.eclipse.core.variables.VariablesPlugin; import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.model.IProcess; @@ -165,9 +166,17 @@ abstract public class AbstractGDBCDIDebugger implements ICDIDebugger2 { return MessageFormat.format( format, new String[]{ label, timestamp } ); } - protected IPath getGDBPath( ILaunch launch ) throws CoreException { + protected IPath getGDBPath(ILaunch launch) throws CoreException { ILaunchConfiguration config = launch.getLaunchConfiguration(); - return new Path( config.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, IMILaunchConfigurationConstants.DEBUGGER_DEBUG_NAME_DEFAULT ) ); + String command = config.getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, + IMILaunchConfigurationConstants.DEBUGGER_DEBUG_NAME_DEFAULT); + try { + command = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(command, false); + } catch (Exception e) { + MIPlugin.log(e); + // take value of command as it + } + return new Path(command); } protected ICDISessionConfiguration getSessionConfiguration( ICDISession session ) { |