forked from qt-creator/qt-creator
fix initial breakpoint setting
as it turns out, it is not possible to set pending breakpoints until gdb has loaded as image. so add some hooks to enable adapters to trigger the initial breakpoint syncing at the right time. do not add additional states (say, InferiorPreparing), as it would just complicate things.
This commit is contained in:
@@ -1639,8 +1639,7 @@ void TrkGdbAdapter::handleTargetRemote(const GdbResponse &record)
|
||||
{
|
||||
QTC_ASSERT(state() == InferiorStarting, qDebug() << state());
|
||||
if (record.resultClass == GdbResultDone) {
|
||||
setState(InferiorRunningRequested);
|
||||
m_engine->postCommand(_("-exec-continue"), GdbEngine::RunRequest, CB(handleFirstContinue));
|
||||
emit inferiorPrepared();
|
||||
} else {
|
||||
QString msg = tr("Connecting to trk server adapter failed:\n")
|
||||
+ _(record.data.findChild("msg").data());
|
||||
@@ -1648,6 +1647,12 @@ void TrkGdbAdapter::handleTargetRemote(const GdbResponse &record)
|
||||
}
|
||||
}
|
||||
|
||||
void TrkGdbAdapter::startInferiorPhase2()
|
||||
{
|
||||
setState(InferiorRunningRequested);
|
||||
m_engine->postCommand(_("-exec-continue"), GdbEngine::RunRequest, CB(handleFirstContinue));
|
||||
}
|
||||
|
||||
void TrkGdbAdapter::handleFirstContinue(const GdbResponse &record)
|
||||
{
|
||||
QTC_ASSERT(state() == InferiorRunning, qDebug() << state());
|
||||
|
||||
Reference in New Issue
Block a user