Skip to content

Commit

Permalink
Move MemCheck functionality into the virtual DebugInterface class fro…
Browse files Browse the repository at this point in the history
…m the more general MemView class.

Give DSP LLE Debugger a wxAUI facelift and add memory view to dsp debugger.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5080 8ced0084-cf51-0410-be5f-012b33b47a6e
  • Loading branch information
shuffle2 committed Feb 18, 2010
1 parent d5c094d commit 63827c7
Show file tree
Hide file tree
Showing 10 changed files with 240 additions and 302 deletions.
2 changes: 2 additions & 0 deletions Source/Core/Common/Src/DebugInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class DebugInterface
virtual void clearBreakpoint(unsigned int /*address*/){}
virtual void clearAllBreakpoints() {}
virtual void toggleBreakpoint(unsigned int /*address*/){}
virtual bool isMemCheck(unsigned int /*address*/) {return false;}
virtual void toggleMemCheck(unsigned int /*address*/){}
virtual unsigned int readMemory(unsigned int /*address*/){return 0;}
virtual void writeExtraMemory(int /*memory*/, unsigned int /*value*/, unsigned int /*address*/) {}
virtual unsigned int readExtraMemory(int /*memory*/, unsigned int /*address*/){return 0;}
Expand Down
28 changes: 28 additions & 0 deletions Source/Core/Core/Src/Debugger/PPCDebugInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,34 @@ void PPCDebugInterface::toggleBreakpoint(unsigned int address)
PowerPC::breakpoints.Add(address);
}

bool PPCDebugInterface::isMemCheck(unsigned int address)
{
return (Memory::AreMemoryBreakpointsActivated()
&& PowerPC::memchecks.GetMemCheck(address));
}

void PPCDebugInterface::toggleMemCheck(unsigned int address)
{
if (Memory::AreMemoryBreakpointsActivated()
&& !PowerPC::memchecks.GetMemCheck(address))
{
// Add Memory Check
TMemCheck MemCheck;
MemCheck.StartAddress = address;
MemCheck.EndAddress = address;
MemCheck.OnRead = true;
MemCheck.OnWrite = true;

MemCheck.Log = true;
MemCheck.Break = true;

PowerPC::memchecks.Add(MemCheck);

}
else
PowerPC::memchecks.DeleteByAddress(address);
}

void PPCDebugInterface::insertBLR(unsigned int address, unsigned int value)
{
Memory::Write_U32(value, address);
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/Core/Src/Debugger/PPCDebugInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class PPCDebugInterface : public DebugInterface
virtual void clearBreakpoint(unsigned int address);
virtual void clearAllBreakpoints();
virtual void toggleBreakpoint(unsigned int address);
virtual bool isMemCheck(unsigned int address);
virtual void toggleMemCheck(unsigned int address);
virtual unsigned int readMemory(unsigned int address);

enum {
Expand Down
Loading

0 comments on commit 63827c7

Please sign in to comment.