| 48 | } |
| 49 | |
| 50 | void handle(const ResultRecord& r) override |
| 51 | { |
| 52 | if (r.isReasonError()) { |
| 53 | if (r.hasField(QStringLiteral("msg")) |
| 54 | && r.errorMessage().contains(QLatin1String("Invalid process during debug session"))) { |
| 55 | // for some unknown reason, lldb-mi sometimes fails to start process |
| 56 | if (m_remainRetry && m_session) { |
| 57 | qCDebug(DEBUGGERLLDB) << "Retry starting"; |
| 58 | // resend the command again. |
| 59 | m_session->addCommand(ExecRun, QString(), new ExecRunHandler(m_session, m_remainRetry - 1), |
| 60 | CmdMaybeStartsRunning | CmdHandlesError); |
| 61 | return; |
| 62 | } |
| 63 | } |
| 64 | qCDebug(DEBUGGERLLDB) << "Failed to start inferior:" |
| 65 | << "exceeded retry times or session become invalid"; |
| 66 | m_session->stopDebugger(); |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | bool handlesError() override { return true; } |
| 71 |
nothing calls this directly
no test coverage detected