1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 17:35:35 +02:00

Bug 396386 - Cannot attach to process when prompted for a pid

Change-Id: I7e74047f6b76013eb24edd3ec6fa569f104f352e
Reviewed-on: https://git.eclipse.org/r/9353
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
Marc Khouzam 2012-12-20 21:51:38 -05:00
parent 5ea96eee7e
commit a2570cdd21

View file

@ -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();
};
});