summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-09-28 23:30:49 +0200
committerMark Wielaard <mjw@redhat.com>2009-09-28 23:32:13 +0200
commitdc3f293b2581a31e78edad07cf41f7c10106ab4b (patch)
tree4a76a08a8ce875627dd18004936c9b6477c1a2c1
parent378e78575a79f55233cdcfa6118822bbe33d32e9 (diff)
downloadsystemtap-steved-dc3f293b2581a31e78edad07cf41f7c10106ab4b.tar.gz
systemtap-steved-dc3f293b2581a31e78edad07cf41f7c10106ab4b.tar.xz
systemtap-steved-dc3f293b2581a31e78edad07cf41f7c10106ab4b.zip
Handle full path .ko modules in setup_dwfl_kernel.
* setupdwfl.cxx (setup_dwfl_kernel): First report all full path modules.
-rw-r--r--setupdwfl.cxx26
1 files changed, 26 insertions, 0 deletions
diff --git a/setupdwfl.cxx b/setupdwfl.cxx
index 1cec0828..49667152 100644
--- a/setupdwfl.cxx
+++ b/setupdwfl.cxx
@@ -129,6 +129,32 @@ setup_dwfl_kernel (unsigned *modules_found, systemtap_session &s)
offline_modules_found = modules_found;
*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())
+ {
+ if ((*it)[0] == '/')
+ {
+ const char *cname = (*it).c_str();
+ Dwfl_Module *mod = dwfl_report_offline (dwfl, cname, cname, -1);
+ if (mod)
+ (*offline_modules_found)++;
+ offline_search_names.erase(it);
+ }
+ it++;
+ }
+
+ // We always need this, even when offline_search_modname is NULL
+ // and offline_search_names is empty because we still might want
+ // the kernel vmlinux reported.
int rc = dwfl_linux_kernel_report_offline (dwfl,
elfutils_kernel_path.c_str(),
&setup_dwfl_report_kernel_p);