mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-17 07:49:21 +00:00
PPCSymbolDB: Fix callers not updating
Fixes regression from http://github.com/dolphin-emu/dolphin/pull/13821
This commit is contained in:
parent
e6ed939952
commit
d946656b87
2 changed files with 10 additions and 5 deletions
|
@ -236,13 +236,17 @@ std::string PPCSymbolDB::GetDescription(u32 addr) const
|
||||||
void PPCSymbolDB::FillInCallers()
|
void PPCSymbolDB::FillInCallers()
|
||||||
{
|
{
|
||||||
std::lock_guard lock(m_mutex);
|
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();
|
p.second.callers.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& entry : m_functions)
|
for (auto& entry : *functions)
|
||||||
{
|
{
|
||||||
Common::Symbol& f = entry.second;
|
Common::Symbol& f = entry.second;
|
||||||
for (const Common::SCall& call : f.calls)
|
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 Common::SCall new_call(entry.first, call.call_address);
|
||||||
const u32 function_address = call.function;
|
const u32 function_address = call.function;
|
||||||
|
|
||||||
auto func_iter = m_functions.find(function_address);
|
auto func_iter = functions->find(function_address);
|
||||||
if (func_iter != m_functions.end())
|
if (func_iter != functions->end())
|
||||||
{
|
{
|
||||||
Common::Symbol& called_function = func_iter->second;
|
Common::Symbol& called_function = func_iter->second;
|
||||||
called_function.callers.push_back(new_call);
|
called_function.callers.push_back(new_call);
|
||||||
|
@ -622,7 +626,7 @@ bool PPCSymbolDB::LoadMap(const Core::CPUThreadGuard& guard, std::string filenam
|
||||||
|
|
||||||
Index(&new_functions);
|
Index(&new_functions);
|
||||||
DetermineNoteLayers(&new_notes);
|
DetermineNoteLayers(&new_notes);
|
||||||
FillInCallers();
|
FillInCallers(&new_functions);
|
||||||
|
|
||||||
std::lock_guard lock(m_mutex);
|
std::lock_guard lock(m_mutex);
|
||||||
std::swap(m_functions, new_functions);
|
std::swap(m_functions, new_functions);
|
||||||
|
|
|
@ -57,4 +57,5 @@ private:
|
||||||
static void AddKnownNote(u32 start_addr, u32 size, const std::string& name, XNoteMap* notes);
|
static void AddKnownNote(u32 start_addr, u32 size, const std::string& name, XNoteMap* notes);
|
||||||
|
|
||||||
static void DetermineNoteLayers(XNoteMap* notes);
|
static void DetermineNoteLayers(XNoteMap* notes);
|
||||||
|
static void FillInCallers(XFuncMap* functions);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue