From 497f19d74912d0b6adf729f88509c71a45cacdd4 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 29 Sep 2009 11:22:30 +0200 Subject: Handle non-regex full path kernel module dwfl setup earlier. * setupdwfl.cxx (setup_dwfl_kernel(unsigned*,systemtap_session&)): Don't switch around offline_search_modname and offline_search_names here. (setup_dwfl_kernel(string&,unsigned*,systemtap_session&): But here. --- setupdwfl.cxx | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/setupdwfl.cxx b/setupdwfl.cxx index 33d481ef..f5a306be 100644 --- a/setupdwfl.cxx +++ b/setupdwfl.cxx @@ -145,14 +145,6 @@ setup_dwfl_kernel (unsigned *modules_found, systemtap_session &s) *offline_modules_found = 0; // First try to report full path modules. - if (offline_search_modname != NULL - && offline_search_modname[0] == '/') - { - // Insert it in the set and handle it below. - offline_search_names.insert(offline_search_modname); - offline_search_modname = NULL; - } - set::iterator it = offline_search_names.begin(); while (it != offline_search_names.end()) { @@ -192,8 +184,20 @@ setup_dwfl_kernel(const std::string &name, unsigned *found, systemtap_session &s) { - offline_search_modname = name.c_str(); - offline_search_names.clear(); + const char *modname = name.c_str(); + set names; // Default to empty + + /* Support full path kernel modules, these cannot be regular + expressions, so just put them in the search set. */ + if (name[0] == '/') + { + names.insert(name); + modname = NULL; + } + + offline_search_modname = modname; + offline_search_names = names; + return setup_dwfl_kernel(found, s); } -- cgit