GdbCookie cmd = m_cookieForToken.take(token);
- // FIXME: this falsely rejects results from the custom dumper recognition
- // procedure, too...
- if (record.token < m_oldestAcceptableToken && cmd.type >= 300) {
+ if (record.token < m_oldestAcceptableToken) {
//qDebug() << "### SKIPPING OLD RESULT " << record.toString();
//QMessageBox::information(m_mainWindow, tr("Skipped"), "xxx");
return;
sendCommand("attach " + QString::number(q->m_attachedPID));
} else {
// StartInternal or StartExternal
- emit gdbInputAvailable(QString(), QString());
sendCommand("-file-exec-and-symbols " + fileName, GdbFileExecAndSymbols);
//sendCommand("file " + fileName, GdbFileExecAndSymbols);
#ifdef Q_OS_MAC
sendCommand("sharedlibrary apply-load-rules all");
#endif
- //setTokenBarrier();
if (!q->m_processArgs.isEmpty())
sendCommand("-exec-arguments " + q->m_processArgs.join(" "));
#ifndef Q_OS_MAC
{
q->resetLocation();
setTokenBarrier();
- emit gdbInputAvailable(QString(), QString());
qq->notifyInferiorRunningRequested();
sendCommand("-exec-continue", GdbExecContinue);
}
void GdbEngine::stepExec()
{
setTokenBarrier();
- emit gdbInputAvailable(QString(), QString());
qq->notifyInferiorRunningRequested();
sendCommand("-exec-step", GdbExecStep);
}
void GdbEngine::nextExec()
{
setTokenBarrier();
- emit gdbInputAvailable(QString(), QString());
qq->notifyInferiorRunningRequested();
sendCommand("-exec-next", GdbExecNext);
}
/*!
\fn void GdbEngine::setTokenBarrier()
- \brief Sets up internal structures to handle a new debugger turn.
+ \brief Discard the results of all pending watch-updating commands.
This method is called at the beginning of all step/next/finish etc.
debugger functions.
+ If non-watch-updating commands with call-backs are still in the pipe,
+ it will complain.
*/
void GdbEngine::setTokenBarrier()
{
+ foreach (const GdbCookie &ck, m_cookieForToken)
+ QTC_ASSERT(ck.synchronized || ck.type == GdbInvalidCommand, return);
+ emit gdbInputAvailable(QString(), "--- token barrier ---");
m_oldestAcceptableToken = currentToken();
}
QTC_ASSERT(frameIndex < stackHandler->stackSize(), return);
if (oldIndex != frameIndex) {
+ setTokenBarrier();
+
// Assuming this always succeeds saves a roundtrip.
// Otherwise the lines below would need to get triggered
// after a response to this -stack-select-frame here.
Q_UNUSED(on);
// FIXME: a bit too harsh, but otherwise the treeview sometimes look funny
//m_expandedINames.clear();
+ setTokenBarrier();
updateLocals();
}
// everything might have changed, force re-evaluation
// FIXME: Speed this up by re-using variables and only
// marking values as 'unknown'
+ setTokenBarrier();
updateLocals();
}
void GdbEngine::updateLocals()
{
- setTokenBarrier();
-
m_pendingRequests = 0;
PENDING_DEBUG("\nRESET PENDING");