1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 23:05:47 +02:00

PR: 109999 - use variable substitution for gdb command

This commit is contained in:
Alena Laskavaia 2008-08-18 13:38:34 +00:00
parent 8ffdab73fe
commit c1438bceb5
2 changed files with 13 additions and 3 deletions

View file

@ -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.core.resources;bundle-version="[3.2.0,4.0.0)",
org.eclipse.debug.core;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.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-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5 Bundle-RequiredExecutionEnvironment: J2SE-1.5

View file

@ -34,6 +34,7 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException; import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.Status;
import org.eclipse.core.variables.VariablesPlugin;
import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.model.IProcess; 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 } ); 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(); 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 ) { protected ICDISessionConfiguration getSessionConfiguration( ICDISession session ) {