From 2a52b3e446dce0bc8c5a06a40f8b52232b1e99b1 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 6 May 2014 16:39:04 -0400 Subject: [PATCH] library probes: don't add libraries to visited_modules The dwarf_query's visited_modules set is used to keep track of which modules are visited for suggestions. It works by emptying out the visited modules into the dwarf_builder's modules_seen after we're done iterating through the modules. By the end, modules_seen contains the full list of modules to suggest from. Since .library(glob) probes resolve to multiple probes for each matching library, dwarf_builder's modules_seen will already pick each of them up from the individually created dwarf_query objects. So in the end, the modules_seen from which we make suggestions will already contain them. --- tapsets.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tapsets.cxx b/tapsets.cxx index 5d0f62272..d277555fd 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -2403,10 +2403,7 @@ query_one_library (const char *library, dwflpp & dw, void dwarf_query::query_library (const char *library) { - string library_path = - query_one_library (library, dw, user_lib, base_probe, base_loc, results); - if (!library_path.empty()) - visited_modules.insert(library_path); + query_one_library (library, dw, user_lib, base_probe, base_loc, results); } struct plt_expanding_visitor: public var_expanding_visitor -- 2.43.5