예제 #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;
}
예제 #2
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!=0) {//check if we hit a breakpoint
        bpt = check_breakpoints(pc);
        if( bpt!=-1 ) {
            run = 0;
            
            if(BPT_CHECK_FLAG(g_Breakpoints[bpt], BPT_FLAG_LOG))
                log_breakpoint(pc, BPT_FLAG_EXEC, 0);
        }
    }

    if(run!=2) {
        DebuggerCallback(DEBUG_UI_UPDATE, pc);  /* call front-end to notify user interface to update */
    }
    if(run==0) {
        // Emulation thread is blocked until a button is clicked.
        SDL_mutexP(mutex);
        SDL_CondWait(debugger_done_cond, mutex);
        SDL_mutexV(mutex);
    }

    previousPC = pc;
}