diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index 12da7a86fc4..fa6fcae29c4 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -283,21 +283,23 @@ void LldbEngine::handleLldbStarted() cmd2.arg("attachpid", attachedPID); } else { cmd2.arg("startmode", rp.startMode); - // 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 rp.attachPID is valid we really have to attach - QTC_CHECK(rp.attachPID.isValid() && (rp.startMode == AttachToRemoteProcess - || rp.startMode == AttachToLocalProcess - || rp.startMode == AttachToRemoteServer)); - cmd2.arg("attachpid", rp.attachPID.pid()); - cmd2.arg("sysroot", rp.deviceSymbolsRoot.isEmpty() ? rp.sysRoot.toString() - : rp.deviceSymbolsRoot); - cmd2.arg("remotechannel", ((rp.startMode == AttachToRemoteProcess - || rp.startMode == AttachToRemoteServer) - ? rp.remoteChannel : QString())); - QTC_CHECK(!rp.continueAfterAttach || (rp.startMode == AttachToRemoteProcess - || rp.startMode == AttachToLocalProcess - || rp.startMode == AttachToRemoteServer)); - m_continueAtNextSpontaneousStop = false; + if (rp.startMode != StartInternal) { + // 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 rp.attachPID is valid we really have to attach + QTC_CHECK(rp.attachPID.isValid() && (rp.startMode == AttachToRemoteProcess + || rp.startMode == AttachToLocalProcess + || rp.startMode == AttachToRemoteServer)); + cmd2.arg("attachpid", rp.attachPID.pid()); + cmd2.arg("sysroot", rp.deviceSymbolsRoot.isEmpty() ? rp.sysRoot.toString() + : rp.deviceSymbolsRoot); + cmd2.arg("remotechannel", ((rp.startMode == AttachToRemoteProcess + || rp.startMode == AttachToRemoteServer) + ? rp.remoteChannel : QString())); + QTC_CHECK(!rp.continueAfterAttach || (rp.startMode == AttachToRemoteProcess + || rp.startMode == AttachToLocalProcess + || rp.startMode == AttachToRemoteServer)); + m_continueAtNextSpontaneousStop = false; + } } cmd2.callback = [this](const DebuggerResponse &response) {