From: "mail at milianw dot de" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug libdw/25173] New: dwarf_getsrc_die fails for rust code
Date: Thu, 07 Nov 2019 19:25:00 -0000 [thread overview]
Message-ID: <bug-25173-10460@http.sourceware.org/bugzilla/> (raw)
https://sourceware.org/bugzilla/show_bug.cgi?id=25173
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
...
00000000000227f0
<_ZN4core3fmt3num53_$LT$impl$u20$core..fmt..UpperHex$u20$for$u20$i32$GT$3fmt17hd6956218784a7031E>:
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
0x00000000000227f0
/rustc/9fda7c2237db910e41d6a712e9a2139b352e558b//src/libcore/fmt/num.rs:142
$ eu-addr2line -e ./main -a 227f0
0x00000000000227f0
??:0
```
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.
next reply other threads:[~2019-11-07 19:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-07 19:25 mail at milianw dot de [this message]
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
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@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).