From 5f8ca04fbb0682ff8647b4df5de68cd1042e312d Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 29 Sep 2009 00:12:26 +0200 Subject: Factor out duplicated code to setup user/module Dwfl from dwflpp/translate. * setupdwfl.h: Add setup_dwfl_user() and is_user_module(). * setupdwfl.cxx: Likewise. * dwflpp.cxx (setup_user): Use setup_dwfl_user(). * translate.cxx (emit_symbol_data): Likewise and is_user_module(). * tapsets.cxx (dwarf_cast_expanding_visitor::visit_cast_op): Use is_user_module(). --- setupdwfl.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'setupdwfl.h') diff --git a/setupdwfl.h b/setupdwfl.h index 7884e4da..67a66397 100644 --- a/setupdwfl.h +++ b/setupdwfl.h @@ -14,6 +14,7 @@ #include #include +#include extern "C" { #include @@ -25,4 +26,13 @@ Dwfl *setup_dwfl_kernel(const std::string &name, Dwfl *setup_dwfl_kernel(const std::set &names, unsigned *found, systemtap_session &s); + +Dwfl* setup_dwfl_user(const std::string &name); +Dwfl* setup_dwfl_user(std::vector::const_iterator &begin, + const std::vector::const_iterator &end, + bool all_needed); + +// user-space files must be full paths and not end in .ko +bool is_user_module(const std::string &m); + #endif -- cgit