================ @@ -785,38 +785,50 @@ IRExecutionUnit::FindInSymbols(const std::vector<ConstString> &names, return LLDB_INVALID_ADDRESS; } + ModuleList images = target->GetImages(); + // We'll process module_sp separately, before the other modules. + images.Remove(sc.module_sp); + LoadAddressResolver resolver(target, symbol_was_missing_weak); ModuleFunctionSearchOptions function_options; function_options.include_symbols = true; function_options.include_inlines = false; for (const ConstString &name : names) { + // The lookup order here is as follows: + // 1) Functions in `sc.module_sp` + // 2) Functions in the other modules + // 3) Symbols in `sc.module_sp` + // 4) Symbols in the other modules + SymbolContextList sc_list; if (sc.module_sp) { - SymbolContextList sc_list; sc.module_sp->FindFunctions(name, CompilerDeclContext(), lldb::eFunctionNameTypeFull, function_options, sc_list); if (auto load_addr = resolver.Resolve(sc_list)) return *load_addr; + sc_list.Clear(); ---------------- DmT021 wrote:
done https://github.com/llvm/llvm-project/pull/102835 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits