Commit fd43080c authored by Fawzi Mohamed's avatar Fawzi Mohamed Committed by hjk

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: default avatarhjk <hjk121@nokiamail.com>
parent 1734e368
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment