debugger: basic support for reverse debugging

works only with gbd 7.0 so far.
This commit is contained in:
hjk
2009-05-25 17:19:42 +02:00
parent a31ce64b9c
commit 5ff00c84ae
9 changed files with 74 additions and 5 deletions

View File

@@ -928,6 +928,10 @@ void GdbEngine::handleAqcuiredInferior()
if (theDebuggerBoolSetting(ListSourceFiles))
reloadSourceFiles();
// Reverse debugging. FIXME: Should only be used when available.
if (theDebuggerBoolSetting(EnableReverseDebugging))
postCommand(_("target record"));
tryLoadDebuggingHelpers();
#ifndef Q_OS_MAC
@@ -1664,14 +1668,20 @@ void GdbEngine::stepExec()
{
setTokenBarrier();
qq->notifyInferiorRunningRequested();
postCommand(_("-exec-step"), CB(handleExecRun));
if (qq->isReverseDebugging())
postCommand(_("reverse-step"), CB(handleExecRun));
else
postCommand(_("-exec-step"), CB(handleExecRun));
}
void GdbEngine::stepIExec()
{
setTokenBarrier();
qq->notifyInferiorRunningRequested();
postCommand(_("-exec-step-instruction"), CB(handleExecRun));
if (qq->isReverseDebugging())
postCommand(_("reverse-stepi"), CB(handleExecRun));
else
postCommand(_("-exec-step-instruction"), CB(handleExecRun));
}
void GdbEngine::stepOutExec()
@@ -1685,14 +1695,20 @@ void GdbEngine::nextExec()
{
setTokenBarrier();
qq->notifyInferiorRunningRequested();
postCommand(_("-exec-next"), CB(handleExecRun));
if (qq->isReverseDebugging())
postCommand(_("reverse-next"), CB(handleExecRun));
else
postCommand(_("-exec-next"), CB(handleExecRun));
}
void GdbEngine::nextIExec()
{
setTokenBarrier();
qq->notifyInferiorRunningRequested();
postCommand(_("-exec-next-instruction"), CB(handleExecRun));
if (qq->isReverseDebugging())
postCommand(_("reverse-nexti"), CB(handleExecRun));
else
postCommand(_("exec-next-instruction"), CB(handleExecRun));
}
void GdbEngine::runToLineExec(const QString &fileName, int lineNumber)