PPCSymbolDB: Move instance to PowerPCManager

This commit is contained in:
mitaclaw
2024-03-10 11:43:12 -07:00
parent 7117d115e7
commit c24fa93965
41 changed files with 201 additions and 160 deletions

View File

@ -376,11 +376,11 @@ bool CBoot::FindMapFile(std::string* existing_map_file, std::string* writable_ma
return false;
}
bool CBoot::LoadMapFromFilename(const Core::CPUThreadGuard& guard)
bool CBoot::LoadMapFromFilename(const Core::CPUThreadGuard& guard, PPCSymbolDB& ppc_symbol_db)
{
std::string strMapFilename;
bool found = FindMapFile(&strMapFilename, nullptr);
if (found && g_symbolDB.LoadMap(guard, strMapFilename))
if (found && ppc_symbol_db.LoadMap(guard, strMapFilename))
{
UpdateDebugger_MapLoaded();
return true;
@ -514,9 +514,9 @@ bool CBoot::BootUp(Core::System& system, const Core::CPUThreadGuard& guard,
{
SConfig& config = SConfig::GetInstance();
if (!g_symbolDB.IsEmpty())
if (auto& ppc_symbol_db = system.GetPPCSymbolDB(); !ppc_symbol_db.IsEmpty())
{
g_symbolDB.Clear();
ppc_symbol_db.Clear();
UpdateDebugger_MapLoaded();
}
@ -595,7 +595,7 @@ bool CBoot::BootUp(Core::System& system, const Core::CPUThreadGuard& guard,
ppc_state.pc = executable.reader->GetEntryPoint();
if (executable.reader->LoadSymbols(guard))
if (executable.reader->LoadSymbols(guard, system.GetPPCSymbolDB()))
{
UpdateDebugger_MapLoaded();
HLE::PatchFunctions(system);