public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "jistone at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug libdw/25173] dwarf_getsrc_die fails for rust code
Date: Mon, 18 Nov 2019 17:59:00 -0000	[thread overview]
Message-ID: <bug-25173-10460-66sZez2wdF@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-25173-10460@http.sourceware.org/bugzilla/>

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

Josh Stone <jistone at redhat dot com> changed:

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

--- Comment #3 from Josh Stone <jistone at redhat dot com> ---
(In reply to Mark Wielaard from comment #1)
> It might help if you could attach the binary. Locally (Fedora 31, rustc
> 1.38.0) I cannot replicate. Neither binutils addr2line, not elfutils
> eu-addr2line seem able to resolve addresses to source lines.

Note that rpmbuild strips Rust's rlibs (static archives), so you won't have any
debuginfo for pre-compiled code from the standard library. You should still be
able to resolve the user's own code though, as well as generic std code that
gets monomorphized in the user's compilation.

$ bat main.rs
───────┬──────────────────────────────────
       │ File: main.rs
───────┼──────────────────────────────────
   1   │ fn main() {
   2   │     println!("Hello, world!");
   3   │ }
───────┴──────────────────────────────────
$ rustc -g main.rs
$ nm main | grep main
                 U __libc_start_main@@GLIBC_2.2.5
00000000000053d0 T main
0000000000005390 t _ZN4main4main17h6b07ac6c6f06cdd6E
$ addr2line -e main 5390
/tmp/hello/src/main.rs:1
$ eu-addr2line -e main 5390
??:0

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2019-11-18 17:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07 19:25 [Bug libdw/25173] New: " mail at milianw dot de
2019-11-15 20:25 ` [Bug libdw/25173] " mark at klomp dot org
2019-11-16 20:09 ` mail at milianw dot de
2019-11-18 17:59 ` jistone at redhat dot com [this message]
2019-11-18 18:11 ` jistone at redhat dot com
2019-11-18 18:39 ` mark at klomp dot org
2019-11-18 18:47 ` jistone at redhat dot com
2019-11-20 13:12 ` mail at milianw dot de
2019-11-20 13:18 ` mark at klomp dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-25173-10460-66sZez2wdF@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=elfutils-devel@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).