mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-31 06:38:01 +00:00
Use a fake exception to exit early in case of memory breakpoints.
Change TMemCheck::Action to return whether to break rather than calling PPCDebugInterface::BreakNow, as this simplified the implementation; then remove said method, as that was its only caller. One "interface" method down, many to go...
This commit is contained in:
parent
dd7ab4812b
commit
2264e7b087
9 changed files with 42 additions and 14 deletions
|
@ -207,7 +207,7 @@ TMemCheck *MemChecks::GetMemCheck(u32 address)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
void TMemCheck::Action(DebugInterface *debug_interface, u32 iValue, u32 addr, bool write, int size, u32 pc)
|
||||
bool TMemCheck::Action(DebugInterface *debug_interface, u32 iValue, u32 addr, bool write, int size, u32 pc)
|
||||
{
|
||||
if ((write && OnWrite) || (!write && OnRead))
|
||||
{
|
||||
|
@ -220,9 +220,9 @@ void TMemCheck::Action(DebugInterface *debug_interface, u32 iValue, u32 addr, bo
|
|||
);
|
||||
}
|
||||
|
||||
if (Break)
|
||||
debug_interface->BreakNow();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -40,7 +40,8 @@ struct TMemCheck
|
|||
|
||||
u32 numHits;
|
||||
|
||||
void Action(DebugInterface *dbg_interface, u32 _iValue, u32 addr,
|
||||
// returns whether to break
|
||||
bool Action(DebugInterface *dbg_interface, u32 _iValue, u32 addr,
|
||||
bool write, int size, u32 pc);
|
||||
};
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ public:
|
|||
virtual void SetPC(unsigned int /*address*/) {}
|
||||
virtual void Step() {}
|
||||
virtual void RunToBreakpoint() {}
|
||||
virtual void BreakNow() {}
|
||||
virtual void InsertBLR(unsigned int /*address*/, unsigned int /*value*/) {}
|
||||
virtual int GetColor(unsigned int /*address*/){return 0xFFFFFFFF;}
|
||||
virtual std::string GetDescription(unsigned int /*address*/) = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue