Example #1
0
/**
 * Should be called before returning back emulation to tell the CPU core
 * to call us after each instruction if "real-time" debugging like
 * breakpoints has been set.
 */
void DebugCpu_SetDebugging(void)
{
    bCpuProfiling = Profile_CpuStart();
	nCpuActiveCBs = BreakCond_BreakPointCount(false);
    
	if (nCpuActiveCBs || nCpuSteps || bCpuProfiling)
		M68000_SetSpecial(SPCFLAG_DEBUGGER);
	else
		M68000_UnsetSpecial(SPCFLAG_DEBUGGER);
}
Example #2
0
/**
 * Should be called before returning back emulation to tell the CPU core
 * to call us after each instruction if "real-time" debugging like
 * breakpoints has been set.
 */
void DebugCpu_SetDebugging(void)
{
	bCpuProfiling = Profile_CpuStart();
	nCpuActiveCBs = BreakCond_CpuBreakPointCount();

	if (nCpuActiveCBs || nCpuSteps || bCpuProfiling || History_TrackCpu()
	    || LOG_TRACE_LEVEL((TRACE_CPU_DISASM|TRACE_CPU_SYMBOLS))
	    || ConOutDevice != CONOUT_DEVICE_NONE)
	{
		M68000_SetSpecial(SPCFLAG_DEBUGGER);
		nCpuInstructions = 0;
	}	
	else
		M68000_UnsetSpecial(SPCFLAG_DEBUGGER);
}
Example #3
0
File: main.c Project: jsdf/previous
/**
 * Optionally ask user whether to quit and set bQuitProgram accordingly
 */
void Main_RequestQuit(void)
{
	if (ConfigureParams.Memory.bAutoSave)
	{
		bQuitProgram = true;
		MemorySnapShot_Capture(ConfigureParams.Memory.szAutoSaveFileName, false);
	}
	else if (ConfigureParams.Log.bConfirmQuit)
	{
		bQuitProgram = false;	/* if set true, dialog exits */
		bQuitProgram = DlgAlert_Query("All unsaved data will be lost.\nDo you really want to quit?");
	}
	else
	{
		bQuitProgram = true;
	}

	if (bQuitProgram)
	{
		/* Assure that CPU core shuts down */
		M68000_SetSpecial(SPCFLAG_BRK);
	}
}
Example #4
0
/**
 * NF_DEBUGGER - invoke debugger
 */
static bool nf_debugger(Uint32 stack, Uint32 subid, Uint32 *retval)
{
    LOG_TRACE(TRACE_NATFEATS, "NF_DEBUGGER()\n");
    M68000_SetSpecial(SPCFLAG_DEBUGGER);
    return true;
}