mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 14:12:10 +02:00
Bug 437302 - -e requires full path
- Add support to replace paths with absolute canonical paths before creating links within project or creating debug launch configs Change-Id: I253978a973a4e583bc5e63b751e5184e7b085db1 Reviewed-on: https://git.eclipse.org/r/28448 Tested-by: Hudson CI Reviewed-by: Jeff Johnston <jjohnstn@redhat.com> Tested-by: Jeff Johnston <jjohnstn@redhat.com>
This commit is contained in:
parent
87ffdc164c
commit
19e643f373
1 changed files with 15 additions and 4 deletions
|
@ -158,14 +158,19 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
|
||||||
}
|
}
|
||||||
// Verify any core file or executable path is valid.
|
// Verify any core file or executable path is valid.
|
||||||
if (corefile != null) {
|
if (corefile != null) {
|
||||||
File executableFile = new File(executable);
|
File executableFile = null;
|
||||||
|
if (executable != null) {
|
||||||
|
executableFile = new File(executable);
|
||||||
|
executable = executableFile.getCanonicalPath();
|
||||||
|
}
|
||||||
File coreFile = new File(corefile);
|
File coreFile = new File(corefile);
|
||||||
if (!executableFile.exists() || !coreFile.exists()) {
|
corefile = coreFile.getCanonicalPath();
|
||||||
|
if (executable == null || !executableFile.exists() || !coreFile.exists()) {
|
||||||
final CoreFileInfo info = new CoreFileInfo("", "", ""); //$NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
|
final CoreFileInfo info = new CoreFileInfo("", "", ""); //$NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
|
||||||
final IStatus errorStatus = new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0,
|
final IStatus errorStatus = new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0,
|
||||||
Messages.GdbDebugNewExecutableCommand_Binary_file_does_not_exist, null);
|
Messages.GdbDebugNewExecutableCommand_Binary_file_does_not_exist, null);
|
||||||
final String executablePath = executable;
|
final String executablePath = executable;
|
||||||
final String coreFilePath = buildLog;
|
final String coreFilePath = corefile;
|
||||||
|
|
||||||
Display.getDefault().syncExec(new Runnable() {
|
Display.getDefault().syncExec(new Runnable() {
|
||||||
|
|
||||||
|
@ -197,7 +202,13 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
|
||||||
}
|
}
|
||||||
} else if (executable != null) {
|
} else if (executable != null) {
|
||||||
File executableFile = new File(executable);
|
File executableFile = new File(executable);
|
||||||
if (!executableFile.exists()) {
|
executable = executableFile.getCanonicalPath();
|
||||||
|
File buildLogFile = null;
|
||||||
|
if (buildLog != null) {
|
||||||
|
buildLogFile = new File(buildLog);
|
||||||
|
buildLog = buildLogFile.getCanonicalPath();
|
||||||
|
}
|
||||||
|
if (!executableFile.exists() || (buildLog != null && !buildLogFile.exists())) {
|
||||||
final NewExecutableInfo info = new NewExecutableInfo("", "", "", ""); //$NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
|
final NewExecutableInfo info = new NewExecutableInfo("", "", "", ""); //$NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
|
||||||
final IStatus errorStatus = new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0,
|
final IStatus errorStatus = new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0,
|
||||||
Messages.GdbDebugNewExecutableCommand_Binary_file_does_not_exist, null);
|
Messages.GdbDebugNewExecutableCommand_Binary_file_does_not_exist, null);
|
||||||
|
|
Loading…
Add table
Reference in a new issue