summaryrefslogtreecommitdiffstats
path: root/setupdwfl.cxx
Commit message (Collapse)AuthorAgeFilesLines
* PR10678 vta-gcc: module debuginfo: relocation refers to undefined symbolMark Wielaard2009-10-021-1/+107
| | | | | | | | | | | | | | | | | libdwfl tries to resolve all relocations in a module debuginfo file and if it cannot find a symbol used in a relocation it will fail when dwfl_module_getdwarf() is called. So we must make sure all possible dependencies of the module are also in the dwfl. We do this by trying to find and parse the modules.dep file and insert all dependencies into the dwfl. * setupdwfl.cxx (elfutils_kernel_path): Lift from setup_dwfl_kernel and make static. (is_comma_dash): New function. (modname_from_path): Likewise. (setup_mod_deps): Likewise. (setup_dwfl_report_kernel_p): Call setup_mod_deps(). * testsuite/buildok/pr10678.stp: New test.
* PR10678 module reloc refers to symbol in dwarf refer to kernel symbols.Mark Wielaard2009-09-301-12/+35
| | | | | | | | | | | | | | First part of a fix for PR10678. Always include the kernel in the dwfl. This doesn't seem to impact performance noticable, so for now enable always. * setupdwfl.cxx (setup_dwfl_done): New variable, used to clean up logic in setup_dwfl_report_kernel_p(). (setup_all_deps): New static bool to indicate we want all deps (just the kernel for now, other modules coming). (setup_dwfl_report_kernel_p): Use new variables, shortcut kernel inclusion. (setup_dwfl_kernel): Setup setup_dwfl_done (false).
* Cache Dwfl's for reuse between pass 2 and pass 3.Mark Wielaard2009-09-291-20/+70
| | | | | | | | | | * setupdwfl.h: Introduce DwflPtr. * setupdwfl.cxx: Cache kernel_dwfl and user_dwfl. Keep track of last used module strings. Return cached versions if same query used. * dwflpp.h: Use DwflPtr instead of Dwfl*. * dwflpp.cxx: Use DwflPtr and don't dwfl_end(). * translate.cxx: Likewise. Run through dwfl_getmodules() with returned ptr offset.
* Handle non-regex full path kernel module dwfl setup earlier.Mark Wielaard2009-09-291-10/+14
| | | | | | * 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.
* Factor out duplicated code to setup user/module Dwfl from dwflpp/translate.Mark Wielaard2009-09-291-0/+65
| | | | | | | | | * 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().
* Handle full path .ko modules in setup_dwfl_kernel.Mark Wielaard2009-09-281-0/+26
| | | | * setupdwfl.cxx (setup_dwfl_kernel): First report all full path modules.
* Factor out duplicated code to setup kernel/module Dwfl from dwflpp/translate.Mark Wielaard2009-09-281-0/+167
* setupdwfl.h: New header file. * setupdwfl.cxx: New source file containing shared setup_dwfl_kernel() code. * dwflpp.cxx (dwfl_report_offline_predicate): Removed. (setup_kernel): Call setup_dwfl_kernel(). * translate.cxx (dwfl_report_offline_predicate2): Remove. (emit_symbol_data): Call setup_dwfl_kernel(). * Makefile.am (stap_SOURCES): Add setupdwfl.cxx. * Makefile.in: Regenerated.