forked from qt-creator/qt-creator
Debugger: Start breakpoint manipulation syncronously
The original reason for this was gdb's inability to set certain break point properties in one go (commands and so parts of the setup are async anyway, and using only async paths made the overall setup simpler. The need to tweak some properties asyncronously still remains, but for the caller side it's better when at least the initial round is synchronous. Change-Id: Ibe542533a6026c7f0f4e49f4244b7e9d2aea7062 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -1174,19 +1174,19 @@ void BreakHandler::removeAlienBreakpoint(const QString &rid)
|
||||
void BreakHandler::requestBreakpointInsertion(const Breakpoint &bp)
|
||||
{
|
||||
bp->gotoState(BreakpointInsertionRequested, BreakpointNew);
|
||||
QTimer::singleShot(0, m_engine, [this, bp] { m_engine->insertBreakpoint(bp); });
|
||||
m_engine->insertBreakpoint(bp);
|
||||
}
|
||||
|
||||
void BreakHandler::requestBreakpointUpdate(const Breakpoint &bp)
|
||||
{
|
||||
bp->gotoState(BreakpointUpdateRequested, BreakpointInserted);
|
||||
QTimer::singleShot(0, m_engine, [this, bp] { m_engine->updateBreakpoint(bp); });
|
||||
m_engine->updateBreakpoint(bp);
|
||||
}
|
||||
|
||||
void BreakHandler::requestBreakpointRemoval(const Breakpoint &bp)
|
||||
{
|
||||
bp->gotoState(BreakpointRemoveRequested, BreakpointInserted);
|
||||
QTimer::singleShot(0, m_engine, [this, bp] { m_engine->removeBreakpoint(bp); });
|
||||
m_engine->removeBreakpoint(bp);
|
||||
}
|
||||
|
||||
void BreakHandler::requestBreakpointEnabling(const Breakpoint &bp, bool enabled)
|
||||
|
@@ -316,11 +316,9 @@ void LldbEngine::setupEngine()
|
||||
BreakpointManager::claimBreakpointsForEngine(this);
|
||||
// Some extra roundtrip to make sure we end up behind all commands triggered
|
||||
// from claimBreakpointsForEngine().
|
||||
QTimer::singleShot(0, this, [this] {
|
||||
DebuggerCommand cmd3("executeRoundtrip");
|
||||
cmd3.callback = [this](const DebuggerResponse &) { notifyEngineSetupOk(); };
|
||||
runCommand(cmd3);
|
||||
});
|
||||
DebuggerCommand cmd3("executeRoundtrip");
|
||||
cmd3.callback = [this](const DebuggerResponse &) { notifyEngineSetupOk(); };
|
||||
runCommand(cmd3);
|
||||
} else {
|
||||
notifyEngineSetupFailed();
|
||||
}
|
||||
|
Reference in New Issue
Block a user