Search code examples
binutils

addr2line - inline function code line missing


I have a android arm64 trace:

#02 pc 00000000000c61c0  /system/lib64/libmedia.so (_ZN7android10AudioTrack16AudioTrackThread10threadLoopEv+84)

I use below command to parser the code line information:

aarch64-linux-addr2line -f -C -e symbols/system/lib64/libmedia.so 00000000000c61cc
android::Condition::wait(android::Mutex&)
/proc/self/cwd/system/core/include/utils/Condition.h:106

Obviously, wait() is a inline function so addr2line didn't find the code line in threadLoop but use the wait() code line instead.

How to get the right line number in threadLoop? I am using binutils-2.28 to build addr2line tool.


Solution

  • Have you tried the -i option?

      -i --inlines           Unwind inlined functions