mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-03 06:15:37 +02:00
Remove deprecated medthods.
GDBBackend.getGDBCommandLine() and GDBBackend.launchGDBProcess(String) have been removed. GDBBackend.getGDBCommandLineArray() and GDBBackend.launchGDBProcess(String[]) should be used instead. Change-Id: I50b118a0dfeef5c427c61ba5a9b38662cbe9748f
This commit is contained in:
parent
2260e3f7ab
commit
a3eb9edc59
1 changed files with 1 additions and 51 deletions
|
@ -166,17 +166,6 @@ public class GDBBackend extends AbstractDsfService implements IGDBBackend, IMIBa
|
||||||
return getGDBLaunch().getGDBPath();
|
return getGDBLaunch().getGDBPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Options for GDB process. Allow subclass to override.
|
|
||||||
*
|
|
||||||
* @deprecated Use {@link #getGDBCommandLineArray()} instead
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
protected String getGDBCommandLine() {
|
|
||||||
String cmdArray[] = getGDBCommandLineArray();
|
|
||||||
return StringUtil.join(cmdArray, " "); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Options for GDB process. Returns the GDB command and its arguments as an
|
* Options for GDB process. Returns the GDB command and its arguments as an
|
||||||
* array. Allow subclass to override.
|
* array. Allow subclass to override.
|
||||||
|
@ -247,45 +236,6 @@ public class GDBBackend extends AbstractDsfService implements IGDBBackend, IMIBa
|
||||||
return getGDBLaunch().getUpdateThreadListOnSuspend();
|
return getGDBLaunch().getUpdateThreadListOnSuspend();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Process launchGDBProcess() throws CoreException {
|
|
||||||
// Keep calling deprecated getGDBCommandLine() in case it was overridden
|
|
||||||
String command = getGDBCommandLine();
|
|
||||||
// Keep calling deprecated launchGDBProcess(String) in case it was
|
|
||||||
// overridden
|
|
||||||
return launchGDBProcess(command);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Launch GDB process. Allow subclass to override.
|
|
||||||
*
|
|
||||||
* @deprecated Use {@link #launchGDBProcess(String[])} instead
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
protected Process launchGDBProcess(String commandLine) throws CoreException {
|
|
||||||
// Backwards-compatibility check
|
|
||||||
// If the commandLine parameter is not the same as the command line
|
|
||||||
// array we provide
|
|
||||||
// it implies that the commandLine was modified by an extender and
|
|
||||||
// should be used as
|
|
||||||
// is. If it is the same, we can use the command line array instead
|
|
||||||
// using the more robust
|
|
||||||
// non-deprecated call to launchGDBProcess.
|
|
||||||
String unmodifiedCmdLine = StringUtil.join(getGDBCommandLineArray(), " ").trim(); //$NON-NLS-1$
|
|
||||||
if (unmodifiedCmdLine.equals(commandLine.trim()) == false) {
|
|
||||||
Process proc = null;
|
|
||||||
try {
|
|
||||||
proc = ProcessFactory.getFactory().exec(commandLine, getGDBLaunch().getLaunchEnvironment());
|
|
||||||
} catch (IOException e) {
|
|
||||||
String message = "Error while launching command " + commandLine; //$NON-NLS-1$
|
|
||||||
throw new CoreException(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, -1, message, e));
|
|
||||||
}
|
|
||||||
return proc;
|
|
||||||
}
|
|
||||||
// End of Backwards-compatibility check
|
|
||||||
|
|
||||||
return launchGDBProcess(getGDBCommandLineArray());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Launch GDB process with command and arguments. Allow subclass to
|
* Launch GDB process with command and arguments. Allow subclass to
|
||||||
* override.
|
* override.
|
||||||
|
@ -516,7 +466,7 @@ public class GDBBackend extends AbstractDsfService implements IGDBBackend, IMIBa
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
fProcess = launchGDBProcess();
|
fProcess = launchGDBProcess(getGDBCommandLineArray());
|
||||||
// Need to do this on the executor for thread-safety
|
// Need to do this on the executor for thread-safety
|
||||||
getExecutor().submit(new DsfRunnable() {
|
getExecutor().submit(new DsfRunnable() {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue