Index: source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp =================================================================== --- source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp +++ source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp @@ -78,14 +78,11 @@ bool ModuleContainsASanRuntime(Module * module) { - SymbolContextList sc_list; - const bool include_symbols = true; - const bool append = true; - const bool include_inlines = true; - - size_t num_matches = module->FindFunctions(ConstString("__asan_get_alloc_stack"), NULL, eFunctionNameTypeAuto, include_symbols, include_inlines, append, sc_list); - - return num_matches > 0; + const Symbol* symbol = module->FindFirstSymbolWithNameAndType( + ConstString("__asan_get_alloc_stack"), + lldb::eSymbolTypeAny); + + return symbol != nullptr; } void Index: source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp =================================================================== --- source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp +++ source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp @@ -30,36 +30,25 @@ { if (!process_sp.get()) return NULL; - + Target & target = process_sp->GetTarget(); - - bool found_asan_runtime = false; - + const ModuleList &target_modules = target.GetImages(); Mutex::Locker modules_locker(target_modules.GetMutex()); const size_t num_modules = target_modules.GetSize(); for (size_t i = 0; i < num_modules; ++i) { Module *module_pointer = target_modules.GetModulePointerAtIndexUnlocked(i); - - SymbolContextList sc_list; - const bool include_symbols = true; - const bool append = true; - const bool include_inlines = true; - size_t num_matches = module_pointer->FindFunctions(ConstString("__asan_get_alloc_stack"), NULL, eFunctionNameTypeAuto, include_symbols, include_inlines, append, sc_list); - - if (num_matches) - { - found_asan_runtime = true; - break; - } + const Symbol* symbol = module_pointer->FindFirstSymbolWithNameAndType( + ConstString("__asan_get_alloc_stack"), + lldb::eSymbolTypeAny); + + if (symbol != nullptr) + return MemoryHistorySP(new MemoryHistoryASan(process_sp)); } - - if (! found_asan_runtime) - return MemoryHistorySP(); - return MemoryHistorySP(new MemoryHistoryASan(process_sp)); + return MemoryHistorySP(); } void