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:
@@ -106,9 +106,7 @@ void PlainGdbAdapter::handleFileExecAndSymbols(const GdbResponse &response)
|
||||
{
|
||||
QTC_ASSERT(state() == InferiorStarting, qDebug() << state());
|
||||
if (response.resultClass == GdbResultDone) {
|
||||
//m_breakHandler->clearBreakMarkers();
|
||||
setState(InferiorRunningRequested);
|
||||
m_engine->postCommand(_("-exec-run"), GdbEngine::RunRequest, CB(handleExecRun));
|
||||
emit inferiorPrepared();
|
||||
} else {
|
||||
QString msg = tr("Starting executable failed:\n") +
|
||||
__(response.data.findChild("msg").data());
|
||||
@@ -116,6 +114,12 @@ void PlainGdbAdapter::handleFileExecAndSymbols(const GdbResponse &response)
|
||||
}
|
||||
}
|
||||
|
||||
void PlainGdbAdapter::startInferiorPhase2()
|
||||
{
|
||||
setState(InferiorRunningRequested);
|
||||
m_engine->postCommand(_("-exec-run"), GdbEngine::RunRequest, CB(handleExecRun));
|
||||
}
|
||||
|
||||
void PlainGdbAdapter::handleExecRun(const GdbResponse &response)
|
||||
{
|
||||
if (response.resultClass == GdbResultRunning) {
|
||||
|
||||
Reference in New Issue
Block a user