random git stap build running against f22 % ./stap -V Systemtap translator/driver (version 3.1/0.166, commit release-3.0-110-g713029398d38 + changes) % ./stap -p4 -e 'probe process("/bin/ls").function("main") { log(usymfile(0)) }' --vp 0044 [...] dump_unwindsyms /usr/bin/ls index=2 base=0x400000 Found build-id in /usr/bin/ls, length 20, start at 0x400284 WARNING: No debug line data for /usr/bin/ls, no error [...] wait, wha? % rpm -qf /usr/bin/ls coreutils-8.23-11.fc22.x86_64 % rpm -q coreutils-debuginfo coreutils-debuginfo-8.23-11.fc22.x86_64 % readelf -S /usr/lib/debug/usr/bin/ls.debug | grep -A1 debug.line [31] .debug_line PROGBITS 0000000000000000 00017bc3 0000000000006668 0000000000000000 0 0 1
The dwfl_errmsg (-1) looks bogus (or at least way too late). The code seems to use raw libelf calls. Here is a quick untested patch: diff --git a/translate.cxx b/translate.cxx index 4c91660..271f0e1 100644 --- a/translate.cxx +++ b/translate.cxx @@ -6453,6 +6453,7 @@ static void dump_line_tables (Dwfl_Module *m, unwindsym_dump_context *c, const char *, Dwarf_Addr) { + Dwarf* dwarf; Elf* elf; Elf_Scn* scn = NULL; Elf_Data* data; @@ -6462,7 +6463,11 @@ dump_line_tables (Dwfl_Module *m, unwindsym_dump_context *c, dwfl_module_info (m, NULL, &start, NULL, NULL, NULL, NULL, NULL); - elf = dwfl_module_getelf (m, &bias); + dwarf = dwfl_module_getdwarf (m, &bias); + if (dwarf == NULL) + return; + + elf = dwarf_getelf (dwarf); if (elf == NULL) return;