diff options
| author | dreamsyntax <dreamsyntax@gmail.com> | 2025-08-08 15:43:34 -0700 |
|---|---|---|
| committer | dreamsyntax <dreamsyntax@gmail.com> | 2025-08-09 09:36:17 -0700 |
| commit | d946656b873c1e98e5d14fc3033bcf7dfd1a4e7e (patch) | |
| tree | 802e79da3554d60147c9273f8b051cd6dd3e89bb | |
| parent | e6ed939952f108aeaedc2763b391f2471203305e (diff) | |
PPCSymbolDB: Fix callers not updating
Fixes regression from http://github.com/dolphin-emu/dolphin/pull/13821
| -rw-r--r-- | Source/Core/Core/PowerPC/PPCSymbolDB.cpp | 14 | ||||
| -rw-r--r-- | Source/Core/Core/PowerPC/PPCSymbolDB.h | 1 |
2 files changed, 10 insertions, 5 deletions
diff --git a/Source/Core/Core/PowerPC/PPCSymbolDB.cpp b/Source/Core/Core/PowerPC/PPCSymbolDB.cpp index 4bfe2abd3d..250d901bc2 100644 --- a/Source/Core/Core/PowerPC/PPCSymbolDB.cpp +++ b/Source/Core/Core/PowerPC/PPCSymbolDB.cpp @@ -236,13 +236,17 @@ std::string PPCSymbolDB::GetDescription(u32 addr) const void PPCSymbolDB::FillInCallers() { std::lock_guard lock(m_mutex); + FillInCallers(&m_functions); +} - for (auto& p : m_functions) +void PPCSymbolDB::FillInCallers(XFuncMap* functions) +{ + for (auto& p : *functions) { p.second.callers.clear(); } - for (auto& entry : m_functions) + for (auto& entry : *functions) { Common::Symbol& f = entry.second; for (const Common::SCall& call : f.calls) @@ -250,8 +254,8 @@ void PPCSymbolDB::FillInCallers() const Common::SCall new_call(entry.first, call.call_address); const u32 function_address = call.function; - auto func_iter = m_functions.find(function_address); - if (func_iter != m_functions.end()) + auto func_iter = functions->find(function_address); + if (func_iter != functions->end()) { Common::Symbol& called_function = func_iter->second; called_function.callers.push_back(new_call); @@ -622,7 +626,7 @@ bool PPCSymbolDB::LoadMap(const Core::CPUThreadGuard& guard, std::string filenam Index(&new_functions); DetermineNoteLayers(&new_notes); - FillInCallers(); + FillInCallers(&new_functions); std::lock_guard lock(m_mutex); std::swap(m_functions, new_functions); diff --git a/Source/Core/Core/PowerPC/PPCSymbolDB.h b/Source/Core/Core/PowerPC/PPCSymbolDB.h index d106f68aa4..8ebc26a810 100644 --- a/Source/Core/Core/PowerPC/PPCSymbolDB.h +++ b/Source/Core/Core/PowerPC/PPCSymbolDB.h @@ -57,4 +57,5 @@ private: static void AddKnownNote(u32 start_addr, u32 size, const std::string& name, XNoteMap* notes); static void DetermineNoteLayers(XNoteMap* notes); + static void FillInCallers(XFuncMap* functions); }; |
