bebbo / binutils-gdb

Unofficial mirror of sourceware binutils-gdb repository. Updated daily.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git
GNU General Public License v2.0
3 stars 3 forks source link

addr2line does not work #8

Closed Midar closed 5 years ago

Midar commented 5 years ago

On a file that has not been stripped, and for which m68k-amigaos-nm shows plenty of symbols, addr2line is not able to map any address back to a function:

$ m68k-amigaos-nm tests/tests | awk '$2 == "T" { print $1 }' | m68k-amigaos-addr2line -e tests/tests | fgrep -v '??'
$ 

So, as you can see, not a single symbol can be found by addr2line. And there are plenty of symbols:

$ m68k-amigaos-nm tests/tests | awk '$2 == "T" { count++ } END { print count }'
753
$ 
bebbo commented 5 years ago

plus you have to specify -f

m68k-amigaos-addr2line 1234 -fe testprogram