mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Common/DebugInterface: Mark a few member functions as const
Quite a few member functions act as a means to query information. Given these don't actually modify object state, they can be made const.
This commit is contained in:
@ -140,13 +140,13 @@ void DSPDebugInterface::ClearPatches()
|
||||
m_patches.ClearPatches();
|
||||
}
|
||||
|
||||
std::string DSPDebugInterface::Disassemble(u32 address)
|
||||
std::string DSPDebugInterface::Disassemble(u32 address) const
|
||||
{
|
||||
// we'll treat addresses as line numbers.
|
||||
return Symbols::GetLineText(address);
|
||||
}
|
||||
|
||||
std::string DSPDebugInterface::GetRawMemoryString(int memory, u32 address)
|
||||
std::string DSPDebugInterface::GetRawMemoryString(int memory, u32 address) const
|
||||
{
|
||||
if (DSPCore_GetState() == State::Stopped)
|
||||
return "";
|
||||
@ -179,22 +179,22 @@ std::string DSPDebugInterface::GetRawMemoryString(int memory, u32 address)
|
||||
return "";
|
||||
}
|
||||
|
||||
u32 DSPDebugInterface::ReadMemory(u32 address)
|
||||
u32 DSPDebugInterface::ReadMemory(u32 address) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 DSPDebugInterface::ReadInstruction(u32 address)
|
||||
u32 DSPDebugInterface::ReadInstruction(u32 address) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool DSPDebugInterface::IsAlive()
|
||||
bool DSPDebugInterface::IsAlive() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DSPDebugInterface::IsBreakpoint(u32 address)
|
||||
bool DSPDebugInterface::IsBreakpoint(u32 address) const
|
||||
{
|
||||
int real_addr = Symbols::Line2Addr(address);
|
||||
if (real_addr >= 0)
|
||||
@ -240,7 +240,7 @@ void DSPDebugInterface::ToggleBreakpoint(u32 address)
|
||||
}
|
||||
}
|
||||
|
||||
bool DSPDebugInterface::IsMemCheck(u32 address, size_t size)
|
||||
bool DSPDebugInterface::IsMemCheck(u32 address, size_t size) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -258,7 +258,7 @@ void DSPDebugInterface::ToggleMemCheck(u32 address, bool read, bool write, bool
|
||||
// =======================================================
|
||||
// Separate the blocks with colors.
|
||||
// -------------
|
||||
u32 DSPDebugInterface::GetColor(u32 address)
|
||||
u32 DSPDebugInterface::GetColor(u32 address) const
|
||||
{
|
||||
// Scan backwards so we don't miss it. Hm, actually, let's not - it looks pretty good.
|
||||
int addr = -1;
|
||||
@ -289,12 +289,12 @@ u32 DSPDebugInterface::GetColor(u32 address)
|
||||
}
|
||||
// =============
|
||||
|
||||
std::string DSPDebugInterface::GetDescription(u32 address)
|
||||
std::string DSPDebugInterface::GetDescription(u32 address) const
|
||||
{
|
||||
return ""; // g_symbolDB.GetDescription(address);
|
||||
}
|
||||
|
||||
u32 DSPDebugInterface::GetPC()
|
||||
u32 DSPDebugInterface::GetPC() const
|
||||
{
|
||||
return Symbols::Addr2Line(DSP::g_dsp.pc);
|
||||
}
|
||||
|
@ -53,26 +53,26 @@ public:
|
||||
bool HasEnabledPatch(u32 address) const override;
|
||||
void ClearPatches() override;
|
||||
|
||||
std::string Disassemble(u32 address) override;
|
||||
std::string GetRawMemoryString(int memory, u32 address) override;
|
||||
std::string Disassemble(u32 address) const override;
|
||||
std::string GetRawMemoryString(int memory, u32 address) const override;
|
||||
int GetInstructionSize(int instruction) override { return 1; }
|
||||
bool IsAlive() override;
|
||||
bool IsBreakpoint(u32 address) override;
|
||||
bool IsAlive() const override;
|
||||
bool IsBreakpoint(u32 address) const override;
|
||||
void SetBreakpoint(u32 address) override;
|
||||
void ClearBreakpoint(u32 address) override;
|
||||
void ClearAllBreakpoints() override;
|
||||
void ToggleBreakpoint(u32 address) override;
|
||||
void ClearAllMemChecks() override;
|
||||
bool IsMemCheck(u32 address, size_t size) override;
|
||||
bool IsMemCheck(u32 address, size_t size) const override;
|
||||
void ToggleMemCheck(u32 address, bool read = true, bool write = true, bool log = true) override;
|
||||
u32 ReadMemory(u32 address) override;
|
||||
u32 ReadInstruction(u32 address) override;
|
||||
u32 GetPC() override;
|
||||
u32 ReadMemory(u32 address) const override;
|
||||
u32 ReadInstruction(u32 address) const override;
|
||||
u32 GetPC() const override;
|
||||
void SetPC(u32 address) override;
|
||||
void Step() override {}
|
||||
void RunToBreakpoint() override;
|
||||
u32 GetColor(u32 address) override;
|
||||
std::string GetDescription(u32 address) override;
|
||||
u32 GetColor(u32 address) const override;
|
||||
std::string GetDescription(u32 address) const override;
|
||||
|
||||
void Clear() override;
|
||||
|
||||
|
Reference in New Issue
Block a user