MCPcopy Create free account
hub / github.com/KDE/kdevelop / handle

Method handle

plugins/lldb/debugsession.cpp:50–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

isReasonErrorMethod · 0.80
hasFieldMethod · 0.80
addCommandMethod · 0.60
QStringClass · 0.50
containsMethod · 0.45
errorMessageMethod · 0.45
stopDebuggerMethod · 0.45

Tested by

no test coverage detected