MCPcopy Create free account
hub / github.com/TASEmulators/fceux / DebugBreakOnDialog

Method DebugBreakOnDialog

src/drivers/Qt/ConsoleDebugger.cpp:7830–8043  ·  view source on GitHub ↗

---------------------------------------------------------------------------- ---------------------------------------------------------------------------- --- Break On Count Setup Dialog ---------------------------------------------------------------------------- ----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

7828//----------------------------------------------------------------------------
7829//----------------------------------------------------------------------------
7830DebugBreakOnDialog::DebugBreakOnDialog(int type, QWidget *parent )
7831 : QDialog(parent)
7832{
7833
7834 QVBoxLayout *mainLayout, *vbox;
7835 QHBoxLayout *hbox;
7836 QGroupBox *gbox;
7837 QGridLayout *grid;
7838 fceuDecIntValidtor *validator;
7839 int refMode;
7840 bool oneShotMode;
7841 char stmp[128];
7842 QPushButton *btn;
7843
7844 FCEU_WRAPPER_LOCK();
7845
7846 prevPauseState = FCEUI_EmulationPaused();
7847
7848 if (prevPauseState == 0)
7849 {
7850 FCEUI_ToggleEmulationPause();
7851 }
7852 FCEU_WRAPPER_UNLOCK();
7853
7854 currLbl = new QLabel();
7855
7856 this->type = type;
7857
7858 if ( type )
7859 {
7860 totalCount = total_instructions;
7861 deltaCount = delta_instructions;
7862
7863 setWindowTitle( tr("Break on CPU Instruction Exceedance") );
7864 oneShotMode = breakOnInstrOneShot;
7865 refMode = breakOnInstrMode;
7866 threshold = break_instructions_limit;
7867
7868 sprintf(stmp, "Current Instruction Count: %10llu (+%llu)", totalCount, deltaCount);
7869 currLbl->setText( tr(stmp) );
7870
7871 }
7872 else
7873 {
7874 totalCount = timestampbase + (uint64)timestamp - total_cycles_base;
7875 deltaCount = timestampbase + (uint64)timestamp - delta_cycles_base;
7876
7877 if (totalCount < 0) // sanity check
7878 {
7879 ResetDebugStatisticsCounters();
7880 totalCount = 0;
7881 }
7882 if (deltaCount < 0) // sanity check
7883 {
7884 ResetDebugStatisticsCounters();
7885 deltaCount = 0;
7886 }
7887 setWindowTitle( tr("Break on CPU Cycle Exceedance") );

Callers

nothing calls this directly

Calls 5

FCEUI_EmulationPausedFunction · 0.85
setTextMethod · 0.80
trFunction · 0.50

Tested by

no test coverage detected