This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils 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 libdw/25173] dwarf_getsrc_die fails for rust code


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.

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