Exemplo n.º 1
0
void update_debugger(uint32 pc)
// Update debugger state and display.
// Should be called after each R4300 instruction
// Checks for breakpoint hits on PC
{
    int bpt;
    
    if(run==2) {
        bpt = check_breakpoints(pc);
        if( bpt==-1 ) {
            //previousPC = pc;
            return;
        }
        else {
            run = 0;
            switch_button_to_run();
            
            if(BPT_CHECK_FLAG(g_Breakpoints[bpt], BPT_FLAG_LOG))
                log_breakpoint(pc, BPT_FLAG_EXEC, 0);
        }
    }
    else if ( previousPC == pc ) {
        return;
    }
    if(run==0) {
        update_debugger_frontend( pc );

        // Emulation thread is blocked until a button is clicked.
        SDL_mutexP(mutex);
        SDL_CondWait(debugger_done_cond, mutex);
        SDL_mutexV(mutex);
    }

    previousPC = pc;
}
Exemplo n.º 2
0
void update_debugger()
// Update debugger state and display.
// Should be called after each R4300 instruction.
{
	if(run==2) {
		if( check_breakpoints(PC->addr)==-1 ) {
			previousPC = PC->addr;
			return;
		}
		else {
			run = 0;
			switch_button_to_run();
			gdk_beep();
		}
	}

	if(registers_opened) {
		gdk_threads_enter();
		update_registers();
		gdk_threads_leave();
	}	
	if(desasm_opened) {
		gdk_threads_enter();
		update_desasm( PC->addr );
		gdk_threads_leave();
	}
	/*if(regTLB_opened) {
		gdk_threads_enter();
		update_TLBwindow();
		gdk_threads_leave();
	}*/
	previousPC = PC->addr;

	// Emulation thread is blocked until a button is clicked.
	pthread_cond_wait(&debugger_done_cond, &mutex);
}