mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Bug 396386 - Cannot attach to process when prompted for a pid
Change-Id: I9a682bd7be70b6633f2e455a76dba4bcfa801eec Reviewed-on: https://git.eclipse.org/r/9352 Reviewed-by: Marc-Andre Laperle <malaperle@gmail.com> 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:
parent
ce371e5f5c
commit
8ca35f737a
1 changed files with 7 additions and 2 deletions
|
@ -164,6 +164,9 @@ public class GdbConnectCommand extends AbstractDebugCommand implements IConnectH
|
||||||
fRequestMonitor.cancel();
|
fRequestMonitor.cancel();
|
||||||
} else if (result instanceof IProcessExtendedInfo[] || result instanceof String) {
|
} else if (result instanceof IProcessExtendedInfo[] || result instanceof String) {
|
||||||
fRequestMonitor.setData(result);
|
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 {
|
} else {
|
||||||
fRequestMonitor.setStatus(NO_PID_STATUS);
|
fRequestMonitor.setStatus(NO_PID_STATUS);
|
||||||
}
|
}
|
||||||
|
@ -231,8 +234,10 @@ public class GdbConnectCommand extends AbstractDebugCommand implements IConnectH
|
||||||
protected void handleSuccess() {
|
protected void handleSuccess() {
|
||||||
// Store the path of the binary so we can use it again for another process
|
// 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
|
// with the same name. Only do this on success, to avoid being stuck with
|
||||||
// a path that is invalid
|
// a path that is invalid.
|
||||||
fProcessNameToBinaryMap.put(fProcName, finalBinaryPath);
|
if (fProcName != null && !fProcName.isEmpty()) {
|
||||||
|
fProcessNameToBinaryMap.put(fProcName, finalBinaryPath);
|
||||||
|
}
|
||||||
fRm.done();
|
fRm.done();
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue