Skip to content

Commit

Permalink
Merge pull request #6103 from sepalani/blr-patch
Browse files Browse the repository at this point in the history
DebugInterface: Rename InsertBLR to Patch
  • Loading branch information
leoetlino committed Oct 5, 2017
2 parents 428f0fa + f65dcdc commit 7d47b02
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Source/Core/Common/DebugInterface.h
Expand Up @@ -39,7 +39,7 @@ class DebugInterface
virtual void SetPC(unsigned int /*address*/) {}
virtual void Step() {}
virtual void RunToBreakpoint() {}
virtual void InsertBLR(unsigned int /*address*/, unsigned int /*value*/) {}
virtual void Patch(unsigned int /*address*/, unsigned int /*value*/) {}
virtual int GetColor(unsigned int /*address*/) { return 0xFFFFFFFF; }
virtual std::string GetDescription(unsigned int /*address*/) = 0;
};
2 changes: 1 addition & 1 deletion Source/Core/Core/Debugger/PPCDebugInterface.cpp
Expand Up @@ -156,7 +156,7 @@ void PPCDebugInterface::ToggleMemCheck(unsigned int address, bool read, bool wri
}
}

void PPCDebugInterface::InsertBLR(unsigned int address, unsigned int value)
void PPCDebugInterface::Patch(unsigned int address, unsigned int value)
{
PowerPC::HostWrite_U32(value, address);
PowerPC::ScheduleInvalidateCacheThreadSafe(address);
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Debugger/PPCDebugInterface.h
Expand Up @@ -42,7 +42,7 @@ class PPCDebugInterface final : public DebugInterface
void SetPC(unsigned int address) override;
void Step() override {}
void RunToBreakpoint() override;
void InsertBLR(unsigned int address, unsigned int value) override;
void Patch(unsigned int address, unsigned int value) override;
int GetColor(unsigned int address) override;
std::string GetDescription(unsigned int address) override;
};
4 changes: 2 additions & 2 deletions Source/Core/Core/HW/DSPLLE/DSPDebugInterface.cpp
Expand Up @@ -132,9 +132,9 @@ void DSPDebugInterface::ToggleMemCheck(unsigned int address, bool read, bool wri
PanicAlert("MemCheck functionality not supported in DSP module.");
}

void DSPDebugInterface::InsertBLR(unsigned int address, unsigned int value)
void DSPDebugInterface::Patch(unsigned int address, unsigned int value)
{
PanicAlert("insertBLR functionality not supported in DSP module.");
PanicAlert("Patch functionality not supported in DSP module.");
}

// =======================================================
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/HW/DSPLLE/DSPDebugInterface.h
Expand Up @@ -37,7 +37,7 @@ class DSPDebugInterface final : public DebugInterface
void SetPC(unsigned int address) override;
void Step() override {}
void RunToBreakpoint() override;
void InsertBLR(unsigned int address, unsigned int value) override;
void Patch(unsigned int address, unsigned int value) override;
int GetColor(unsigned int address) override;
std::string GetDescription(unsigned int address) override;
};
Expand Down
6 changes: 3 additions & 3 deletions Source/Core/DolphinWX/Debugger/CodeView.cpp
Expand Up @@ -227,9 +227,9 @@ void CCodeView::InsertBlrNop(int Blr)
temp.oldValue = m_debugger->ReadMemory(m_selection);
m_blrList.push_back(temp);
if (Blr == 0)
m_debugger->InsertBLR(m_selection, 0x4e800020);
m_debugger->Patch(m_selection, 0x4e800020);
else
m_debugger->InsertBLR(m_selection, 0x60000000);
m_debugger->Patch(m_selection, 0x60000000);
}
Refresh();
}
Expand Down Expand Up @@ -320,7 +320,7 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
unsigned long code;
if (dialog.GetValue().ToULong(&code, 0) && code <= std::numeric_limits<u32>::max())
{
m_debugger->InsertBLR(m_selection, code);
m_debugger->Patch(m_selection, code);
Refresh();
}
}
Expand Down

0 comments on commit 7d47b02

Please sign in to comment.