Description
When I set up any breakpoint and then launch debug session, in most cases the function GdbEngine::handleResponse(const QString &buff) does not receive gdb response message "breakpoint-modified" and the breakpoint is ignored. But if the GdbEngine source code is modified in the following way:
void GdbEngine::setupInferior()
{
CHECK_STATE(EngineSetupRequested);
const DebuggerRunParameters &rp = runParameters();
//runCommand("set follow-exec-mode new");
if (rp.breakOnMain)
runCommand({"tbreak " + mainFunction()});
// Initial attempt to set breakpoints.
if (rp.startMode != AttachCore) {
showStatusMessage(tr("Setting breakpoints..."));
showMessage(tr("Setting breakpoints..."));
///////////////////added by mine////////
QThread::msleep(2000);
//////////////////////////////////////////////////
attemptBreakpointSynchronization();
}
.....................so forth with GdbEngine::setupInferior()
Then the response message "breakpoint-modified" is received, and breakpoints are successfully activated. The longer delay, the success probability is higher.
I do not understand the internal reason of the phenomenon and I suppose, that the problem should be fixed in some other way.
Grateful in advance.