Added debugger step back button. Functionality still TODO.
This commit is contained in:
parent
525deb2a8f
commit
09117e5286
Binary file not shown.
Before Width: | Height: | Size: 220 B After Width: | Height: | Size: 17 KiB |
|
@ -18,6 +18,7 @@
|
|||
<file>icons/debug-pause.png</file>
|
||||
<file>icons/StepInto.png</file>
|
||||
<file>icons/StepOver.png</file>
|
||||
<file>icons/StepBack.png</file>
|
||||
<file>icons/StepOut.png</file>
|
||||
<file>icons/RunPpuFrame.png</file>
|
||||
<file>icons/RunPpuHalfFrame.png</file>
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
#include "Qt/HexEditor.h"
|
||||
#include "Qt/ConsoleDebugger.h"
|
||||
#include "Qt/ConsoleUtilities.h"
|
||||
#include "Qt/TraceLogger.h"
|
||||
#include "Qt/ColorMenu.h"
|
||||
|
||||
// Where are these defined?
|
||||
|
@ -588,6 +589,16 @@ QMenuBar *ConsoleDebugger::buildMenuBar(void)
|
|||
|
||||
debugMenu->addAction(act);
|
||||
|
||||
// Debug -> Step Back
|
||||
stepBackMenuAct = act = new QAction(tr("Step &Back"), this);
|
||||
act->setShortcut(QKeySequence( tr("F9") ) );
|
||||
act->setStatusTip(tr("Step Back"));
|
||||
act->setIcon( QIcon(":icons/StepBack.png") );
|
||||
act->setEnabled(false);
|
||||
connect( act, SIGNAL(triggered()), this, SLOT(debugStepBackCB(void)) );
|
||||
|
||||
debugMenu->addAction(act);
|
||||
|
||||
// Debug -> Run to Selected Line
|
||||
act = new QAction(tr("Run to S&elected Line"), this);
|
||||
act->setShortcut(QKeySequence( tr("F1") ) );
|
||||
|
@ -831,6 +842,16 @@ QToolBar *ConsoleDebugger::buildToolBar(void)
|
|||
|
||||
toolBar->addAction(act);
|
||||
|
||||
// Debug -> Step Back
|
||||
stepBackToolAct = act = new QAction(tr("Step &Back (F9)"), this);
|
||||
//act->setShortcut(QKeySequence( tr("F9") ) );
|
||||
act->setStatusTip(tr("Step Back"));
|
||||
act->setIcon( QIcon(":icons/StepBack.png") );
|
||||
act->setEnabled(false);
|
||||
connect( act, SIGNAL(triggered()), this, SLOT(debugStepBackCB(void)) );
|
||||
|
||||
toolBar->addAction(act);
|
||||
|
||||
toolBar->addSeparator();
|
||||
|
||||
// Debug -> Run Line
|
||||
|
@ -2725,6 +2746,14 @@ void ConsoleDebugger::debugStepOverCB(void)
|
|||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void ConsoleDebugger::debugStepBackCB(void)
|
||||
{
|
||||
if (FCEUI_EmulationPaused())
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void ConsoleDebugger::debugRunToCursorCB(void)
|
||||
{
|
||||
asmView->setBreakpointAtSelectedLine();
|
||||
|
@ -4068,6 +4097,9 @@ void ConsoleDebugger::updatePeriodic(void)
|
|||
dbgPauseAct[1]->setEnabled(true);
|
||||
}
|
||||
|
||||
stepBackMenuAct->setEnabled( FCEUD_TraceLoggerRunning() );
|
||||
stepBackToolAct->setEnabled( FCEUD_TraceLoggerRunning() );
|
||||
|
||||
if ( waitingAtBp && (lastBpIdx == BREAK_TYPE_CYCLES_EXCEED) )
|
||||
{
|
||||
cpuCyclesLbl1->setStyleSheet("background-color: blue; color: white;");
|
||||
|
|
|
@ -501,6 +501,8 @@ class ConsoleDebugger : public QDialog
|
|||
|
||||
QAction *brkOnCycleExcAct;
|
||||
QAction *brkOnInstrExcAct;
|
||||
QAction *stepBackMenuAct;
|
||||
QAction *stepBackToolAct;
|
||||
|
||||
DebuggerTabWidget *tabView[2][4];
|
||||
QWidget *asmViewContainerWidget;
|
||||
|
@ -561,6 +563,7 @@ class ConsoleDebugger : public QDialog
|
|||
void debugStepIntoCB(void);
|
||||
void debugStepOutCB(void);
|
||||
void debugStepOverCB(void);
|
||||
void debugStepBackCB(void);
|
||||
void debugRunToCursorCB(void);
|
||||
void debugRunLineCB(void);
|
||||
void debugRunLine128CB(void);
|
||||
|
|
|
@ -390,7 +390,7 @@ TraceLoggerDialog_t::~TraceLoggerDialog_t(void)
|
|||
{
|
||||
updateTimer->stop();
|
||||
|
||||
logging = 0;
|
||||
//logging = 0;
|
||||
msleep(1);
|
||||
diskThread->requestInterruption();
|
||||
diskThread->quit();
|
||||
|
@ -1191,6 +1191,11 @@ static void pushMsgToLogBuffer(const char *msg)
|
|||
pushToLogBuffer(rec);
|
||||
}
|
||||
//----------------------------------------------------
|
||||
int FCEUD_TraceLoggerRunning(void)
|
||||
{
|
||||
return logging;
|
||||
}
|
||||
//----------------------------------------------------
|
||||
//todo: really speed this up
|
||||
void FCEUD_TraceInstruction(uint8 *opcode, int size)
|
||||
{
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <QLabel>
|
||||
#include <QFrame>
|
||||
#include <QTimer>
|
||||
#include <QThread>
|
||||
#include <QGroupBox>
|
||||
#include <QScrollBar>
|
||||
#include <QCloseEvent>
|
||||
|
@ -224,3 +225,5 @@ private slots:
|
|||
int initTraceLogBuffer(int maxRecs);
|
||||
|
||||
void openTraceLoggerWindow(QWidget *parent);
|
||||
|
||||
int FCEUD_TraceLoggerRunning(void);
|
||||
|
|
Loading…
Reference in New Issue