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

@ -0,0 +1,32 @@
#include "breakpoint_handler.h"
extern void ppu_breakpoint(u32 loc, bool isAdding);
breakpoint_handler::breakpoint_handler() :m_breakpoints()
{
}
breakpoint_handler::~breakpoint_handler()
{
}
bool breakpoint_handler::HasBreakpoint(u32 loc) const
{
return m_breakpoints.find(loc) != m_breakpoints.end();
}
bool breakpoint_handler::AddBreakpoint(u32 loc)
{
m_breakpoints.insert(loc);
ppu_breakpoint(loc, true);
return true;
}
bool breakpoint_handler::RemoveBreakpoint(u32 loc)
{
m_breakpoints.erase(loc);
ppu_breakpoint(loc, false);
return true;
}