diff --git a/pcsx2/DebugTools/SymbolImporter.cpp b/pcsx2/DebugTools/SymbolImporter.cpp index 2a964420bc..5d3eeb9783 100644 --- a/pcsx2/DebugTools/SymbolImporter.cpp +++ b/pcsx2/DebugTools/SymbolImporter.cpp @@ -212,11 +212,6 @@ void SymbolImporter::AnalyseElf( SymbolGuardian::GenerateFunctionHashes(temp_database, reader); } - if (m_interrupt_import_thread) - return; - - ScanForFunctions(temp_database, worker_symbol_file, options); - if (m_interrupt_import_thread) return; @@ -227,6 +222,14 @@ void SymbolImporter::AnalyseElf( return; database.merge_from(temp_database); + + if (m_interrupt_import_thread) + return; + + // The function scanner has to be run on the main database so that + // functions created before the importer was run are still + // considered. Otherwise, duplicate functions will be created. + ScanForFunctions(database, worker_symbol_file, options); }); }); }