Example #1
0
Debugger::Debugger(QWidget *parent)
	: QMainWindow( parent )
	, ui(new Ui::Debugger)
	, m_pItemAtPc( 0 )
	, m_autoStepping( false )
{
	ui->setupUi(this);

	connect( ui->tableWidgetCode, SIGNAL(cellDoubleClicked(int,int)), this, SLOT(setBreakpoint(int, int)) );

	connect( ui->actionStep_Into, SIGNAL(triggered()), this, SIGNAL(stepInto()) );
	connect( ui->actionStep_Over, SIGNAL(triggered()), this, SIGNAL(stepOver()) );
	connect( ui->actionStep_Skip, SIGNAL(triggered()), this, SIGNAL(stepSkip()) );
	connect( ui->actionContinue, SIGNAL(triggered()), this, SLOT(setupExecution()) );

	connect( ui->radioButtonP, SIGNAL(clicked()), this, SLOT(updateP()) );
	connect( ui->radioButtonX, SIGNAL(clicked()), this, SLOT(updateX()) );
	connect( ui->radioButtonY, SIGNAL(clicked()), this, SLOT(updateY()) );
	connect( ui->radioButtonL, SIGNAL(clicked()), this, SLOT(updateL()) );

	connect( ui->lineEditX0, SIGNAL(editingFinished()), this, SLOT(setRegisterX0()) );
	connect( ui->lineEditX1, SIGNAL(editingFinished()), this, SLOT(setRegisterX1()) );
	connect( ui->lineEditY0, SIGNAL(editingFinished()), this, SLOT(setRegisterY0()) );
	connect( ui->lineEditY1, SIGNAL(editingFinished()), this, SLOT(setRegisterY1()) );
	connect( ui->lineEditA0, SIGNAL(editingFinished()), this, SLOT(setRegisterA0()) );
	connect( ui->lineEditA1, SIGNAL(editingFinished()), this, SLOT(setRegisterA1()) );
	connect( ui->lineEditA2, SIGNAL(editingFinished()), this, SLOT(setRegisterA2()) );
	connect( ui->lineEditB0, SIGNAL(editingFinished()), this, SLOT(setRegisterB0()) );
	connect( ui->lineEditB1, SIGNAL(editingFinished()), this, SLOT(setRegisterB1()) );
	connect( ui->lineEditB2, SIGNAL(editingFinished()), this, SLOT(setRegisterB2()) );
	connect( ui->lineEditR0, SIGNAL(editingFinished()), this, SLOT(setRegisterR0()) );
	connect( ui->lineEditR1, SIGNAL(editingFinished()), this, SLOT(setRegisterR1()) );
	connect( ui->lineEditR2, SIGNAL(editingFinished()), this, SLOT(setRegisterR2()) );
	connect( ui->lineEditR3, SIGNAL(editingFinished()), this, SLOT(setRegisterR3()) );
	connect( ui->lineEditR4, SIGNAL(editingFinished()), this, SLOT(setRegisterR4()) );
	connect( ui->lineEditR5, SIGNAL(editingFinished()), this, SLOT(setRegisterR5()) );
	connect( ui->lineEditR6, SIGNAL(editingFinished()), this, SLOT(setRegisterR6()) );
	connect( ui->lineEditR7, SIGNAL(editingFinished()), this, SLOT(setRegisterR7()) );
	connect( ui->lineEditN0, SIGNAL(editingFinished()), this, SLOT(setRegisterN0()) );
	connect( ui->lineEditN1, SIGNAL(editingFinished()), this, SLOT(setRegisterN1()) );
	connect( ui->lineEditN2, SIGNAL(editingFinished()), this, SLOT(setRegisterN2()) );
	connect( ui->lineEditN3, SIGNAL(editingFinished()), this, SLOT(setRegisterN3()) );
	connect( ui->lineEditN4, SIGNAL(editingFinished()), this, SLOT(setRegisterN4()) );
	connect( ui->lineEditN5, SIGNAL(editingFinished()), this, SLOT(setRegisterN5()) );
	connect( ui->lineEditN6, SIGNAL(editingFinished()), this, SLOT(setRegisterN6()) );
	connect( ui->lineEditN7, SIGNAL(editingFinished()), this, SLOT(setRegisterN7()) );
	connect( ui->lineEditM0, SIGNAL(editingFinished()), this, SLOT(setRegisterM0()) );
	connect( ui->lineEditM1, SIGNAL(editingFinished()), this, SLOT(setRegisterM1()) );
	connect( ui->lineEditM2, SIGNAL(editingFinished()), this, SLOT(setRegisterM2()) );
	connect( ui->lineEditM3, SIGNAL(editingFinished()), this, SLOT(setRegisterM3()) );
	connect( ui->lineEditM4, SIGNAL(editingFinished()), this, SLOT(setRegisterM4()) );
	connect( ui->lineEditM5, SIGNAL(editingFinished()), this, SLOT(setRegisterM5()) );
	connect( ui->lineEditM6, SIGNAL(editingFinished()), this, SLOT(setRegisterM6()) );
	connect( ui->lineEditM7, SIGNAL(editingFinished()), this, SLOT(setRegisterM7()) );
	connect( ui->lineEditSR, SIGNAL(editingFinished()), this, SLOT(setRegisterSR()) );
	connect( ui->lineEditPC, SIGNAL(editingFinished()), this, SLOT(setRegisterPC()) );
	connect( ui->lineEditLC, SIGNAL(editingFinished()), this, SLOT(setRegisterLC()) );
}
void RenderPartition::execute(void)
{
    if(_bDone == false)
    {
        setupExecution();
        doExecution   ();
    }

    GroupStore::iterator gIt  = _vGroupStore.begin();
    GroupStore::iterator gEnd = _vGroupStore.end  ();

    while(gIt != gEnd)
    {
        (*gIt)->execute();
//        (*gIt)->exit   ();

        ++gIt;
    }
}
void RenderPartition::execute(HardwareContext *pContext, DrawEnv *pEnv)
{
#ifdef OSG_RENPART_DUMP_PAR
    fprintf(stderr, "execute %p %d\n", this, UInt32(_ubState));
    fflush(stderr);
#endif

    switch(_ubState)
    {
        case Setup:
        {
            this->setupExecution(true);
            ++_ubState;
        }
        break;

        case Execute:
        {
            this->doExecution();
            ++_ubState;
        }
        break;

        case Full:
        {
            if(_bDone == false)
            {
                setupExecution();
                doExecution   ();
            }
        }
        break;
    }

#ifdef OSG_RENPART_DUMP_PAR
    fprintf(stderr, "execute done %p %d\n", this, UInt32(_ubState));
    fflush(stderr);
#endif
}