Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorJeff Johnston2014-06-12 19:50:08 +0000
committerJeff Johnston2014-06-13 19:49:57 +0000
commit19e643f3733fd64ede01e9686d244a32744f1c33 (patch)
tree35a752182f206b557ad691ecdb2b6a2f10f6d3d9 /debug
parent87ffdc164ce04512b683324829ee5685a9099742 (diff)
downloadorg.eclipse.cdt-19e643f3733fd64ede01e9686d244a32744f1c33.tar.gz
org.eclipse.cdt-19e643f3733fd64ede01e9686d244a32744f1c33.tar.xz
org.eclipse.cdt-19e643f3733fd64ede01e9686d244a32744f1c33.zip
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>
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/ApplicationWorkbenchWindowAdvisor.java19
1 files changed, 15 insertions, 4 deletions
diff --git a/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/ApplicationWorkbenchWindowAdvisor.java b/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/ApplicationWorkbenchWindowAdvisor.java
index 0c94e45ea69..110f7833ec7 100644
--- a/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/ApplicationWorkbenchWindowAdvisor.java
+++ b/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/ApplicationWorkbenchWindowAdvisor.java
@@ -158,14 +158,19 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
}
// Verify any core file or executable path is valid.
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);
- 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 IStatus errorStatus = new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0,
Messages.GdbDebugNewExecutableCommand_Binary_file_does_not_exist, null);
final String executablePath = executable;
- final String coreFilePath = buildLog;
+ final String coreFilePath = corefile;
Display.getDefault().syncExec(new Runnable() {
@@ -197,7 +202,13 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
}
} else if (executable != null) {
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 IStatus errorStatus = new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0,
Messages.GdbDebugNewExecutableCommand_Binary_file_does_not_exist, null);

Back to the top