summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dwflpp.cxx56
-rw-r--r--dwflpp.h3
2 files changed, 38 insertions, 21 deletions
diff --git a/dwflpp.cxx b/dwflpp.cxx
index 39967a2c..0bba3f1e 100644
--- a/dwflpp.cxx
+++ b/dwflpp.cxx
@@ -75,7 +75,21 @@ dwflpp::dwflpp(systemtap_session & session, const string& name, bool kernel_p):
if (kernel_p)
setup_kernel(name);
else
- setup_user(name);
+ {
+ vector<string> modules;
+ modules.push_back(name);
+ setup_user(modules);
+ }
+}
+
+
+dwflpp::dwflpp(systemtap_session & session, const vector<string>& names):
+ sess(session), module(NULL), module_bias(0), mod_info(NULL),
+ module_start(0), module_end(0), cu(NULL), dwfl(NULL),
+ module_dwarf(NULL), function(NULL), blacklist_enabled(false),
+ pc_cached_scopes(0), num_cached_scopes(0), cached_scopes(NULL)
+{
+ setup_user(names);
}
@@ -369,7 +383,7 @@ dwflpp::setup_kernel(const string& name, bool debuginfo_needed)
void
-dwflpp::setup_user(const string& module_name, bool debuginfo_needed)
+dwflpp::setup_user(const vector<string>& modules, bool debuginfo_needed)
{
if (! sess.module_cache)
sess.module_cache = new module_cache ();
@@ -393,24 +407,26 @@ dwflpp::setup_user(const string& module_name, bool debuginfo_needed)
throw semantic_error ("cannot open dwfl");
dwfl_report_begin (dwfl);
- // XXX: should support buildid-based naming
-
- Dwfl_Module *mod = dwfl_report_offline (dwfl,
- module_name.c_str(),
- module_name.c_str(),
- -1);
- // XXX: save mod!
-
- if (debuginfo_needed)
- dwfl_assert (string("missing process ") +
- module_name +
- string(" ") +
- sess.architecture +
- string(" debuginfo"),
- mod);
-
- if (!module)
- module = mod;
+ vector<string>::const_iterator it;
+ for (it = modules.begin(); it != modules.end(); ++it)
+ {
+ // XXX: should support buildid-based naming
+
+ const string& module_name = *it;
+ Dwfl_Module *mod = dwfl_report_offline (dwfl,
+ module_name.c_str(),
+ module_name.c_str(),
+ -1);
+ // XXX: save mod!
+
+ if (debuginfo_needed)
+ dwfl_assert (string("missing process ") +
+ module_name +
+ string(" ") +
+ sess.architecture +
+ string(" debuginfo"),
+ mod);
+ }
// NB: the result of an _offline call is the assignment of
// virtualized addresses to relocatable objects such as
diff --git a/dwflpp.h b/dwflpp.h
index a2c38ad8..20bcc0d0 100644
--- a/dwflpp.h
+++ b/dwflpp.h
@@ -167,6 +167,7 @@ struct dwflpp
std::string function_name;
dwflpp(systemtap_session & session, const std::string& user_module, bool kernel_p);
+ dwflpp(systemtap_session & session, const std::vector<std::string>& user_modules);
~dwflpp();
void get_module_dwarf(bool required = false, bool report = true);
@@ -281,7 +282,7 @@ private:
Dwarf_Die * function;
void setup_kernel(const std::string& module_name, bool debuginfo_needed = true);
- void setup_user(const std::string& module_name, bool debuginfo_needed = true);
+ void setup_user(const std::vector<std::string>& modules, bool debuginfo_needed = true);
typedef std::map<Dwarf*, std::vector<Dwarf_Die>*> module_cu_cache_t;
module_cu_cache_t module_cu_cache;