forked from qt-creator/qt-creator
lldbengine: fix attachPid check
An invalid pid to attach can be 0 (to simplify handling of windows Pid is pointer) or -1 (usual unix value) Change-Id: Iaf8049d2b68e89e97bfaeb31972d83a8c5cffd80 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -198,7 +198,9 @@ void LldbEngine::setupInferior()
|
||||
cmd.arg("startMode", sp.startMode); // directly relying on this is brittle wrt. insertions, so check it here
|
||||
cmd.arg("processArgs", sp.processArgs);
|
||||
|
||||
QTC_CHECK(!sp.attachPID || (sp.startMode == AttachCrashedExternal
|
||||
// it is better not to check the start mode on the python sid (as we would have to duplicate the
|
||||
// enum values), and thus we assume that if the sp.attachPID is valid we really have to attach
|
||||
QTC_CHECK(sp.attachPID <= 0 || (sp.startMode == AttachCrashedExternal
|
||||
|| sp.startMode == AttachExternal));
|
||||
cmd.arg("attachPid", sp.attachPID);
|
||||
cmd.arg("sysRoot", sp.sysRoot);
|
||||
|
||||
Reference in New Issue
Block a user