summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2024-03-10 06:18:23 +0100
committerGitHub <noreply@github.com>2024-03-10 06:18:23 +0100
commitb89a88afbc5fb93c737e7d74eda25e19b26e7c8f (patch)
treebfda3bb503a20a5b04ef6d1946b764b6d3c67791 /Source/Core
parentadac827a0404c9ba650726e9c52e3dc90b7a722d (diff)
parent0f36654d2b11a3c5fdd173b25418da6cf260af8a (diff)
Merge pull request #12615 from mitaclaw/ppc-symbol-db-member
PPCSymbolDB: Eliminate Redundant Member
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/PowerPC/PPCSymbolDB.cpp8
-rw-r--r--Source/Core/Core/PowerPC/PPCSymbolDB.h4
2 files changed, 4 insertions, 8 deletions
diff --git a/Source/Core/Core/PowerPC/PPCSymbolDB.cpp b/Source/Core/Core/PowerPC/PPCSymbolDB.cpp
index 767a2f31c7..bf0229f292 100644
--- a/Source/Core/Core/PowerPC/PPCSymbolDB.cpp
+++ b/Source/Core/Core/PowerPC/PPCSymbolDB.cpp
@@ -28,9 +28,7 @@
PPCSymbolDB g_symbolDB;
-PPCSymbolDB::PPCSymbolDB() : debugger{&Core::System::GetInstance().GetPowerPC().GetDebugInterface()}
-{
-}
+PPCSymbolDB::PPCSymbolDB() = default;
PPCSymbolDB::~PPCSymbolDB() = default;
@@ -510,6 +508,8 @@ bool PPCSymbolDB::SaveCodeMap(const Core::CPUThreadGuard& guard, const std::stri
// Write ".text" at the top
f.WriteString(".text\n");
+ const auto& ppc_debug_interface = guard.GetSystem().GetPowerPC().GetDebugInterface();
+
u32 next_address = 0;
for (const auto& function : m_functions)
{
@@ -530,7 +530,7 @@ bool PPCSymbolDB::SaveCodeMap(const Core::CPUThreadGuard& guard, const std::stri
// Write the code
for (u32 address = symbol.address; address < next_address; address += 4)
{
- const std::string disasm = debugger->Disassemble(&guard, address);
+ const std::string disasm = ppc_debug_interface.Disassemble(&guard, address);
f.WriteString(fmt::format("{0:08x} {1:<{2}.{3}} {4}\n", address, symbol.name,
SYMBOL_NAME_LIMIT, SYMBOL_NAME_LIMIT, disasm));
}
diff --git a/Source/Core/Core/PowerPC/PPCSymbolDB.h b/Source/Core/Core/PowerPC/PPCSymbolDB.h
index d5e2f3de8f..74714d011c 100644
--- a/Source/Core/Core/PowerPC/PPCSymbolDB.h
+++ b/Source/Core/Core/PowerPC/PPCSymbolDB.h
@@ -11,7 +11,6 @@
namespace Core
{
class CPUThreadGuard;
-class DebugInterface;
} // namespace Core
// This has functionality overlapping Debugger_Symbolmap. Should merge that stuff in here later.
@@ -39,9 +38,6 @@ public:
void PrintCalls(u32 funcAddr) const;
void PrintCallers(u32 funcAddr) const;
void LogFunctionCall(u32 addr);
-
-private:
- Core::DebugInterface* debugger;
};
extern PPCSymbolDB g_symbolDB;