mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 09:16:02 +02:00
Bug 413373 - Allow variable substitution in GDB command file name
Change-Id: I78f8354bdfc4b3e35cd674d29d4bd68f15860a12 Reviewed-on: https://git.eclipse.org/r/14718 Reviewed-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com> IP-Clean: Mikhail Khodjaiants <mikhailkhod@googlemail.com> Tested-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
This commit is contained in:
parent
445f35baa0
commit
a390496044
1 changed files with 6 additions and 3 deletions
|
@ -51,6 +51,7 @@ import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.Platform;
|
import org.eclipse.core.runtime.Platform;
|
||||||
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;
|
||||||
|
|
||||||
public class FinalLaunchSequence extends ReflectionSequence {
|
public class FinalLaunchSequence extends ReflectionSequence {
|
||||||
|
@ -294,11 +295,13 @@ public class FinalLaunchSequence extends ReflectionSequence {
|
||||||
@Execute
|
@Execute
|
||||||
public void stepSourceGDBInitFile(final RequestMonitor requestMonitor) {
|
public void stepSourceGDBInitFile(final RequestMonitor requestMonitor) {
|
||||||
try {
|
try {
|
||||||
final String gdbinitFile = fGDBBackend.getGDBInitFile();
|
String gdbinitFile = fGDBBackend.getGDBInitFile();
|
||||||
|
|
||||||
if (gdbinitFile != null && gdbinitFile.length() > 0) {
|
if (gdbinitFile != null && gdbinitFile.length() > 0) {
|
||||||
|
final String expandedGDBInitFile = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(gdbinitFile);
|
||||||
|
|
||||||
fCommandControl.queueCommand(
|
fCommandControl.queueCommand(
|
||||||
fCommandFactory.createCLISource(fCommandControl.getContext(), gdbinitFile),
|
fCommandFactory.createCLISource(fCommandControl.getContext(), expandedGDBInitFile),
|
||||||
new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) {
|
new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) {
|
||||||
@Override
|
@Override
|
||||||
protected void handleCompleted() {
|
protected void handleCompleted() {
|
||||||
|
@ -306,7 +309,7 @@ public class FinalLaunchSequence extends ReflectionSequence {
|
||||||
// should not consider this an error.
|
// should not consider this an error.
|
||||||
// If it is not the default, then the user must have specified it and
|
// If it is not the default, then the user must have specified it and
|
||||||
// we want to warn the user if we can't find it.
|
// we want to warn the user if we can't find it.
|
||||||
if (!gdbinitFile.equals(IGDBLaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT )) {
|
if (!expandedGDBInitFile.equals(IGDBLaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT)) {
|
||||||
requestMonitor.setStatus(getStatus());
|
requestMonitor.setStatus(getStatus());
|
||||||
}
|
}
|
||||||
requestMonitor.done();
|
requestMonitor.done();
|
||||||
|
|
Loading…
Add table
Reference in a new issue