Enabled trace instruction function. Still TODO, try to make it more efficient.

This commit is contained in:
Matthew Budd 2020-10-01 06:14:35 -04:00
parent 08da8fd76e
commit 2524667d12
4 changed files with 27 additions and 5 deletions

View File

@ -865,10 +865,5 @@ void DebugCycle()
if(debug_loggingCD)
LogCDData(opcode, A, size);
#ifdef WIN32
//This needs to be windows only or else the linux build system will fail since logging is declared in a
//windows source file
FCEUD_TraceInstruction(opcode, size);
#endif
}

View File

@ -114,6 +114,12 @@ TraceLoggerDialog_t::TraceLoggerDialog_t(QWidget *parent)
startStopButton = new QPushButton( tr("Start Logging") );
autoUpdateCbox = new QCheckBox( tr("Automatically update this window while logging") );
if ( logging )
{
startStopButton->setText( tr("Stop Logging") );
}
connect( startStopButton, SIGNAL(clicked(void)), this, SLOT(toggleLoggingOnOff(void)) );
hbox = new QHBoxLayout();
hbox->addWidget( logLastCbox );
hbox->addWidget( logMaxLinesComboBox );
@ -194,6 +200,21 @@ void TraceLoggerDialog_t::closeWindow(void)
done(0);
deleteLater();
}
//----------------------------------------------------
void TraceLoggerDialog_t::toggleLoggingOnOff(void)
{
logging = !logging;
if ( logging )
{
startStopButton->setText( tr("Stop Logging") );
}
else
{
startStopButton->setText( tr("Start Logging") );
}
}
//----------------------------------------------------
//todo: really speed this up
void FCEUD_TraceInstruction(uint8 *opcode, int size)
{

View File

@ -91,5 +91,6 @@ class TraceLoggerDialog_t : public QDialog
public slots:
void closeWindow(void);
private slots:
void toggleLoggingOnOff(void);
};

View File

@ -1709,6 +1709,11 @@ void FCEUD_DebugBreakpoint(int bp_num)
}
}
void FCEUD_TraceInstruction(uint8 *opcode, int size)
{
// Place holder to allow for compiling. GTK GUI doesn't support this. Qt Does.
}
static void closeDebuggerWindow (GtkWidget * w, GdkEvent * e, debuggerWin_t * dw)
{
std::list < debuggerWin_t * >::iterator it;