[Bug libdw/25173] New: dwarf_getsrc_die fails for rust code

mail at milianw dot de sourceware-bugzilla@sourceware.org
Thu Nov 7 19:25:00 GMT 2019


            Bug ID: 25173
           Summary: dwarf_getsrc_die fails for rust code
           Product: elfutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libdw
          Assignee: unassigned at sourceware dot org
          Reporter: mail at milianw dot de
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

In hotspot/perfparser I notice that we fail to find srcfile information via
`dwarf_getsrc_die` for a given address. To reproduce, eu-addr2line can be
compared to addr2line from binutils:

$ cat main.rs 
fn main() {
    println!("Hello, world!");

$ rustc main.rs
$ objdump -S ./main
   227f0:       48 81 ec 88 00 00 00    sub    $0x88,%rsp
   227f7:       48 89 f0                mov    %rsi,%rax
   227fa:       8b 0f                   mov    (%rdi),%ecx
   227fc:       4c 8d 84 24 88 00 00    lea    0x88(%rsp),%r8
   22803:       00 
   22804:       45 31 c9                xor    %r9d,%r9d
   22807:       66 0f 1f 84 00 00 00    nopw   0x0(%rax,%rax,1)
$ addr2line -e ./main -a 227f0
$ eu-addr2line -e ./main -a 227f0

I have zero experience with rust and too little understanding of DWARF still to
know what the exact reason here is. It would be great if elfutils could support
rust here too like binutils does.

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

More information about the Elfutils-devel mailing list