Debugger: Improve lldb breakpoint handling

Inform QC about changed breakpoints on the LLDB side.

Fixes: QTCREATORBUG-21997
Change-Id: Icec25725f92d8a0b47f7dab2971c0c5eb5b23757
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2019-03-01 14:58:57 +01:00
parent 4a3d6f4694
commit 31e549a7dc
3 changed files with 52 additions and 0 deletions

View File

@@ -395,6 +395,8 @@ void LldbEngine::handleResponse(const QString &response)
handleOutputNotification(item);
else if (name == "pid")
notifyInferiorPid(item.toProcessHandle());
else if (name == "breakpointmodified")
handleInterpreterBreakpointModified(item);
}
}
@@ -607,6 +609,31 @@ void LldbEngine::handleOutputNotification(const GdbMi &output)
showMessage(data, ch);
}
void LldbEngine::handleInterpreterBreakpointModified(const GdbMi &bpItem)
{
QTC_ASSERT(bpItem.childCount(), return);
QString id = bpItem.childAt(0).m_data;
Breakpoint bp = breakHandler()->findBreakpointByResponseId(id);
if (!bp) // FIXME adapt whole bp handling and turn into soft assert
return;
// this function got triggered by a lldb internal breakpoint event
// avoid asserts regarding unexpected state transitions
switch (bp->state()) {
case BreakpointInsertionRequested: // was a pending bp
bp->gotoState(BreakpointInsertionProceeding, BreakpointInsertionRequested);
break;
case BreakpointInserted: // was an inserted, gets updated now
bp->gotoState(BreakpointUpdateRequested, BreakpointInserted);
notifyBreakpointChangeProceeding(bp);
break;
default:
break;
}
updateBreakpointData(bp, bpItem, false);
}
void LldbEngine::loadSymbols(const QString &moduleName)
{
Q_UNUSED(moduleName)