This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/20288] dwfl/elfutils problem when gathering line-record data for *symfile/*symline functions


https://sourceware.org/bugzilla/show_bug.cgi?id=20288

Mark Wielaard <mjw at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mjw at redhat dot com

--- Comment #1 from Mark Wielaard <mjw at redhat dot com> ---
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;

-- 
You are receiving this mail because:
You are the assignee for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]