summaryrefslogtreecommitdiffstats
path: root/setupdwfl.cxx
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-09-29 11:22:30 +0200
committerMark Wielaard <mjw@redhat.com>2009-09-29 11:58:25 +0200
commit497f19d74912d0b6adf729f88509c71a45cacdd4 (patch)
tree79ed5097ae80d1ce0dc8a810efdbc3f7de5cbeaf /setupdwfl.cxx
parent7459222ac78c139918b6c9297634742ed975959f (diff)
downloadsystemtap-steved-497f19d74912d0b6adf729f88509c71a45cacdd4.tar.gz
systemtap-steved-497f19d74912d0b6adf729f88509c71a45cacdd4.tar.xz
systemtap-steved-497f19d74912d0b6adf729f88509c71a45cacdd4.zip
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.
Diffstat (limited to 'setupdwfl.cxx')
-rw-r--r--setupdwfl.cxx24
1 files 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<string>::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<string> 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);
}