From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8C7BA395B046; Thu, 7 May 2020 11:36:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8C7BA395B046 From: "mark at klomp dot org" To: systemtap@sourceware.org Subject: [Bug translator/25549] Systemtap unable to find many probe points available in code compiled with LTO enable Date: Thu, 07 May 2020 11:36:28 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: translator X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at klomp dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: systemtap@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Systemtap mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2020 11:36:28 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25549 --- Comment #7 from Mark Wielaard --- 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 =3D die->cu; + struct Dwarf_CU *cu =3D attr_mem.cu; if (cu->lines =3D=3D NULL) { Dwarf_Lines *lines; I'll audit the other code that uses dwarf_attr_integrate, to see if this is= a more common mistake. --=20 You are receiving this mail because: You are the assignee for the bug.=