Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbDebuggerPage.java')
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbDebuggerPage.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbDebuggerPage.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbDebuggerPage.java
index 8f96caeebb9..751aeca2747 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbDebuggerPage.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/GdbDebuggerPage.java
@@ -365,12 +365,21 @@ public class GdbDebuggerPage extends AbstractCDebuggerPage implements Observer {
String gdbCommand = fGDBCommandText.getText().trim();
int lastSeparatorIndex = gdbCommand.lastIndexOf(File.separator);
if (lastSeparatorIndex != -1) {
- dialog.setFilterPath(gdbCommand.substring(0, lastSeparatorIndex));
+ String cmd = gdbCommand.substring(0, lastSeparatorIndex);
+ // remove double quotes, since they interfere with
+ // "setFilterPath()" below
+ cmd = cmd.replaceAll("\\\"", ""); //$NON-NLS-1$//$NON-NLS-2$
+ dialog.setFilterPath(cmd);
}
String res = dialog.open();
if (res == null) {
return;
}
+ // path contains space(s)?
+ if (res.contains(" ")) { //$NON-NLS-1$
+ // surround it in double quotes
+ res = '"' + res + '"';
+ }
fGDBCommandText.setText(res);
}
});

Back to the top