diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbConnectCommand.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbConnectCommand.java index 20cba930be0..98486c1e371 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbConnectCommand.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/GdbConnectCommand.java @@ -165,6 +165,9 @@ public class GdbConnectCommand implements IConnect { fRequestMonitor.cancel(); } else if (result instanceof IProcessExtendedInfo[] || result instanceof String) { fRequestMonitor.setData(result); + } else if (result instanceof Integer) { + // This is the case where the user typed in a pid number directly + fRequestMonitor.setData(new IProcessExtendedInfo[] { new ProcessInfo((Integer)result, "")}); //$NON-NLS-1$ } else { fRequestMonitor.setStatus(NO_PID_STATUS); } @@ -233,7 +236,9 @@ public class GdbConnectCommand implements IConnect { // Store the path of the binary so we can use it again for another process // with the same name. Only do this on success, to avoid being stuck with // a path that is invalid - fProcessNameToBinaryMap.put(fProcName, finalBinaryPath); + if (fProcName != null && !fProcName.isEmpty()) { + fProcessNameToBinaryMap.put(fProcName, finalBinaryPath); + } fRm.done(); }; });