mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-11 16:49:28 +02:00
DSPLLE: Setting breakpoints and stepping through code now works in the (still rather basic) DSP debugger. Decided not to share the breakpoints code between PPC and DSP because it can be done much more efficiently for the DSP case due to the very limited memory space.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3575 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -157,33 +157,59 @@ int RunCyclesDebug(int cycles)
|
||||
{
|
||||
if (g_dsp.cr & CR_HALT)
|
||||
return 0;
|
||||
Step();
|
||||
cycles--;
|
||||
}
|
||||
|
||||
while (cycles > 0)
|
||||
{
|
||||
if (g_dsp.cr & CR_HALT) {
|
||||
return 0;
|
||||
}
|
||||
if (dsp_breakpoints.IsAddressBreakPoint(g_dsp.pc))
|
||||
{
|
||||
DSPCore_SetState(DSPCORE_STEPPING);
|
||||
return cycles;
|
||||
}
|
||||
DSPCore_CheckExternalInterrupt();
|
||||
Step();
|
||||
cycles--;
|
||||
if (cycles < 0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
DSPCore_CheckExternalInterrupt();
|
||||
|
||||
// Now, let's run a few cycles with idle skipping.
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
if (g_dsp.cr & CR_HALT)
|
||||
return 0;
|
||||
if (dsp_breakpoints.IsAddressBreakPoint(g_dsp.pc))
|
||||
{
|
||||
DSPCore_SetState(DSPCORE_STEPPING);
|
||||
return cycles;
|
||||
}
|
||||
// Idle skipping.
|
||||
if (DSPAnalyzer::code_flags[g_dsp.pc] & DSPAnalyzer::CODE_IDLE_SKIP)
|
||||
return 0;
|
||||
|
||||
Step();
|
||||
cycles--;
|
||||
if (cycles < 0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Finally, run the rest of the block without.
|
||||
while (cycles > 0)
|
||||
{
|
||||
if (dsp_breakpoints.IsAddressBreakPoint(g_dsp.pc))
|
||||
{
|
||||
DSPCore_SetState(DSPCORE_STEPPING);
|
||||
return cycles;
|
||||
}
|
||||
Step();
|
||||
cycles--;
|
||||
}
|
||||
|
||||
return cycles;
|
||||
}
|
||||
|
||||
// Used by non-thread mode. Meant to be efficient.
|
||||
int RunCycles(int cycles)
|
||||
{
|
||||
DSPCore_CheckExternalInterrupt();
|
||||
|
||||
if (cycles < 18)
|
||||
{
|
||||
for (int i = 0; i < cycles; i++)
|
||||
|
Reference in New Issue
Block a user