Mark Wielaard <mjw(a)redhat.com> writes:
On Thu, 2015-08-20 at 14:47 +0200, Ben Gamari wrote:
> Using elfutils 0.163, built by me with all dependencies available,
>
> $ /opt/exp/elfutils-root/bin/addr2line --version
> addr2line (elfutils) 0.163
> Copyright (C) 2012 Red Hat, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> Written by Ulrich Drepper.
>
> $ /opt/exp/elfutils-root/bin/addr2line -e inplace/lib/bin/ghc-stage2 -f
0x25a6898
> base_TextziParserCombinatorsziReadP_zdfAlternativePzuzdczlzbzg_info
> ??:0
>
> What am I doing wrong here?
Probably just a bug/missing feature in elfutils. If the binary is
statically linked it might be that we are not able to find all
information we need. There have been other reports about that.
https://bugzilla.redhat.com/show_bug.cgi?id=1053583
Given that most binaries are not static it hasn't been a problem in
practice.
Could you post the binary somewhere?
Then I will take a look at what is going wrong.
It can be found here (sorry for the size),
http://home.smart-cactus.org/~ben/ghc-stage2
With binutils I find,
$ addr2line -e inplace/lib/bin/ghc-stage2 -f 0x12011b8
ghc_Util_maybeReadFuzzzzy_info
/opt/exp/ghc/ghc//compiler/utils/Util.hs:955
If I'm interpretting gdb correctly, elfutils seems to think there is
only one CU, which sounds like it could be the issue. By my count there
should be over 700,
$ readelf -e inplace/lib/bin/ghc-stage2 -w | grep -i "File Name Table (" |
wc -l
742
Thanks a ton!
Cheers,
- Ben