[Bug translator/25549] Systemtap unable to find many probe points available in code compiled with LTO enable

mark at klomp dot org sourceware-bugzilla@sourceware.org
Thu May 7 11:36:28 GMT 2020


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

--- Comment #7 from Mark Wielaard <mark at klomp dot org> ---
Thanks, I can replicate it with those binaries. And the problem is precisely
where you thought it was. This is a cross-CU abstract_origin reference and
dwarf_decl_file was using the line table of the original DIE, not of the
abstract DIE (attribute) that was eventually resolved.

The following elfutils patch fixes it:

diff --git a/libdw/dwarf_decl_file.c b/libdw/dwarf_decl_file.c
index 5657132f..d4aa0a18 100644
--- a/libdw/dwarf_decl_file.c
+++ b/libdw/dwarf_decl_file.c
@@ -55,7 +55,7 @@ dwarf_decl_file (Dwarf_Die *die)
     }

   /* Get the array of source files for the CU.  */
-  struct Dwarf_CU *cu = die->cu;
+  struct Dwarf_CU *cu = attr_mem.cu;
   if (cu->lines == NULL)
     {
       Dwarf_Lines *lines;

I'll audit the other code that uses dwarf_attr_integrate, to see if this is a
more common mistake.

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


More information about the Systemtap mailing list