Refactor debugger_frame into subclasses. Mostly trying to simplify

breakpoints.
This commit is contained in:
Robbie 2018-03-02 15:40:29 -06:00 committed by Ivan
parent 633004c820
commit 477522210e
19 changed files with 780 additions and 426 deletions

View file

@ -313,7 +313,7 @@ static bool ppu_break(ppu_thread& ppu, ppu_opcode_t op)
}
// Set or remove breakpoint
extern void ppu_breakpoint(u32 addr)
extern void ppu_breakpoint(u32 addr, bool isAdding)
{
if (g_cfg.core.ppu_decoder == ppu_decoder_type::llvm)
{
@ -322,16 +322,16 @@ extern void ppu_breakpoint(u32 addr)
const auto _break = ::narrow<u32>(reinterpret_cast<std::uintptr_t>(&ppu_break));
if (ppu_ref(addr) == _break)
{
// Remove breakpoint
ppu_ref(addr) = ppu_cache(addr);
}
else
if (isAdding)
{
// Set breakpoint
ppu_ref(addr) = _break;
}
else
{
// Remove breakpoint
ppu_ref(addr) = ppu_cache(addr);
}
}
void ppu_thread::on_spawn()