Skip to content

Commit

Permalink
Add ClearAllMemChecks to DebugInterface
Browse files Browse the repository at this point in the history
Breakpoints have one, but memchecks don't, despite being cleared directly in the breakpoint window.

Now DolphinWX should call the interface functions and not the direct functions of the breakpoints or memchecks for clearing.
  • Loading branch information
lioncash committed Mar 6, 2014
1 parent 9632890 commit 610a6f9
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions Source/Core/Common/DebugInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class DebugInterface
virtual void ClearBreakpoint(unsigned int /*address*/){}
virtual void ClearAllBreakpoints() {}
virtual void ToggleBreakpoint(unsigned int /*address*/){}
virtual void ClearAllMemChecks() {}
virtual bool IsMemCheck(unsigned int /*address*/) {return false;}
virtual void ToggleMemCheck(unsigned int /*address*/){}
virtual unsigned int ReadMemory(unsigned int /*address*/){return 0;}
Expand Down
5 changes: 5 additions & 0 deletions Source/Core/Core/Debugger/PPCDebugInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ void PPCDebugInterface::ToggleBreakpoint(unsigned int address)
PowerPC::breakpoints.Add(address);
}

void PPCDebugInterface::ClearAllMemChecks()
{
PowerPC::memchecks.Clear();
}

bool PPCDebugInterface::IsMemCheck(unsigned int address)
{
return (Memory::AreMemoryBreakpointsActivated()
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/Debugger/PPCDebugInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class PPCDebugInterface : public DebugInterface
virtual void ClearBreakpoint(unsigned int address) override;
virtual void ClearAllBreakpoints() override;
virtual void ToggleBreakpoint(unsigned int address) override;
virtual void ClearAllMemChecks() override;
virtual bool IsMemCheck(unsigned int address) override;
virtual void ToggleMemCheck(unsigned int address) override;
virtual unsigned int ReadMemory(unsigned int address) override;
Expand Down
5 changes: 5 additions & 0 deletions Source/Core/Core/HW/DSPLLE/DSPDebugInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ bool DSPDebugInterface::IsMemCheck(unsigned int address)
return false;
}

void DSPDebugInterface::ClearAllMemChecks()
{
PanicAlert("MemCheck functionality not supported in DSP module.");
}

void DSPDebugInterface::ToggleMemCheck(unsigned int address)
{
PanicAlert("MemCheck functionality not supported in DSP module.");
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/HW/DSPLLE/DSPDebugInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class DSPDebugInterface : public DebugInterface
virtual void ClearBreakpoint(unsigned int address);
virtual void ClearAllBreakpoints();
virtual void ToggleBreakpoint(unsigned int address);
virtual void ClearAllMemChecks();
virtual bool IsMemCheck(unsigned int address);
virtual void ToggleMemCheck(unsigned int address);
virtual unsigned int ReadMemory(unsigned int address);
Expand Down
5 changes: 3 additions & 2 deletions Source/Core/DolphinWX/Debugger/BreakpointWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,9 @@ void CBreakPointWindow::OnSelectBP(wxListEvent& event)
// Clear all breakpoints and memchecks
void CBreakPointWindow::OnClear(wxCommandEvent& WXUNUSED(event))
{
PowerPC::breakpoints.Clear();
PowerPC::memchecks.Clear();
PowerPC::debug_interface.ClearAllBreakpoints();
PowerPC::debug_interface.ClearAllMemChecks();

NotifyUpdate();
}

Expand Down

0 comments on commit 610a6f9

Please sign in to comment.