diff options
-rw-r--r-- | tapsets.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tapsets.cxx b/tapsets.cxx index 1c098425..7a321dce 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -958,6 +958,9 @@ struct dwflpp void setup_user(string module_name, bool debuginfo_needed = true) { + if (! sess.module_cache) + sess.module_cache = new module_cache (); + static const char *debuginfo_path_arr = "+:.debug:/usr/lib/debug:build"; static const char *debuginfo_env_arr = getenv("SYSTEMTAP_DEBUGINFO_PATH"); // NB: kernel_build_tree doesn't enter into this, as it's for @@ -4993,9 +4996,6 @@ void dwarf_cast_expanding_visitor::visit_cast_op (cast_op* e) if (e->module.empty()) e->module = "kernel"; // "*" may also be reasonable to search all kernel modules - if (! s.module_cache) - s.module_cache = new module_cache (); - string code; exp_type type = pe_long; try @@ -5655,10 +5655,6 @@ dwarf_builder::build(systemtap_session & sess, dwflpp* dw = 0; - if (! sess.module_cache) - sess.module_cache = new module_cache (); - - string module_name; if (has_null_param (parameters, TOK_KERNEL) || get_param (parameters, TOK_MODULE, module_name)) |