From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4461 invoked by alias); 12 Oct 2017 20:49:48 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 3020 invoked by uid 48); 12 Oct 2017 20:49:44 -0000 From: "jistone at redhat dot com" To: elfutils-devel@sourceware.org Subject: [Bug tools/22288] eu-addr2line doesn't find a rust file:line Date: Thu, 12 Oct 2017 20:49:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: tools X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jistone at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned 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-SW-Source: 2017-q4/txt/msg00017.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D22288 --- Comment #2 from Josh Stone --- (In reply to Mark Wielaard from comment #1) > But if there are .debug_aranges then it seems bad to assume they > are wrong or incomplete. I think it's safe to trust that given aranges are valid, but not that they'= re complete. The binary may be composed of objects from multiple compilers, w= ith different policies toward aranges, and the final user linking it all may no= t be able to control this. > Best would be to fix rustc to generate .debug_aranges. I found that Clang also doesn't emit .debug_aranges by default, but it has -gdwarf-aranges for that. This passes to LLVM -generate-arange-section, an= d in fact "rustc -Cllvm-args=3D-generate-arange-section" does work! I can talk to upstream about making that the default, but they may well tak= e a similar stance as Clang, that it's redundant with other pc/range info. > Second best would be to have a mechanism to for scanning all CUs and > (re)create the same cache that dwarf_getaranges() would create from the > .debug_aranges section for the CU. One question is if this isn't the defa= ult > how it interacts with other users of the aranges cache like dwarf_addrdie, > dwfl_module_addrdie and dwfl_module_getsrc. The last one is what > eu-addr2line (and eu-stack) use. I think this mechanism is desirable even if rustc changes its default. Sta= rt with the aranges, and lazily augment it with a CU scan if that misses. But= I don't doubt there are tricky corners to this. --=20 You are receiving this mail because: You are on the CC list for the bug.