mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 09:25:31 +02:00
PR: 109999 - use variable substitution for gdb command
This commit is contained in:
parent
8ffdab73fe
commit
c1438bceb5
2 changed files with 13 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
Loading…
Add table
Reference in a new issue