I cannot make `addr2line` to work. It does look for symbols at three (*unexisting*) paths:
/usr/bin/*.debug
/usr/bin/.debug/*.debug
/usr/lib/debug/usr/bin/*.debug
But it just seems to ignore the path where all debugging symbols are actually installed by default:
/usr/lib/debug/.build-id/
I run `addr2line` like this:
addr2line -f -C -e <PathToExecFile> <Addr>
Am I missing some configuration switch, system option, or anything similar?
------------
Now some proofs for what I'm stating.
Here, I'll be using the program `screen` as an example:
Here we empirically found out where the debug symbols for `screen` are:
/usr/lib/debug/.build-id/e9/d3cd5073daa6b7365b3787673143edeec589d3.debug
Now we run `strace addr2line` to see where it tries to access...
# Get any valid object address
$ objdump -T /usr/bin/screen
> 00000000006697e0
# Use the object address in addr2line
$ strace -f addr2line -f -C \
-e /usr/bin/screen 0x00000000006697e0 2>&1 | grep debug
> open("/usr/bin/d3cd5073daa6b7365b3787673143edeec589d3.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/bin/.debug/d3cd5073daa6b7365b3787673143edeec589d3.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/debug/usr/bin/d3cd5073daa6b7365b3787673143edeec589d3.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
Here we see the 3 paths I mentioned earlier, but no signs of the desired one.
I expected that the `strace` command shown avobe would access the debug files at their actual location:
/usr/lib/debug/.build-id/e9/d3cd5073daa6b7365b3787673143edeec589d3.debug
- What happened instead
The `addr2line` program does look for the debug file at three unexisting locations:
/usr/bin/*.debug
/usr/bin/.debug/*.debug
/usr/lib/debug/usr/bin/*.debug
but it does not look for the debug file at the correct location.
I cannot make `addr2line` to work. It does look for symbols at three (*unexisting*) paths: bin/*.debug bin/.debug/ *.debug lib/debug/ usr/bin/ *.debug
/usr/
/usr/
/usr/
But it just seems to ignore the path where all debugging symbols are actually installed by default: lib/debug/ .build- id/
/usr/
I run `addr2line` like this:
addr2line -f -C -e <PathToExecFile> <Addr>
Am I missing some configuration switch, system option, or anything similar?
------------
Now some proofs for what I'm stating.
Here, I'll be using the program `screen` as an example:
$ sudo apt-get install screen screen-dbg ld-linux- x86-64. so.2, for GNU/Linux 2.6.32, sha1]=e9d3cd507 3daa6b7365b3787 673143edeec589d 3, stripped debug/. build-id/ e9/d3cd5073daa6 b7365b378767314 3edeec589d3. debug
$ file /usr/bin/screen
> /usr/bin/screen: setgid ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked, interpreter /lib64/
BuildID[
$ dpkg -L screen-dbg
> /usr/lib/
Here we empirically found out where the debug symbols for `screen` are: lib/debug/ .build- id/e9/d3cd5073d aa6b7365b378767 3143edeec589d3. debug
/usr/
Now we run `strace addr2line` to see where it tries to access...
# Get any valid object address
$ objdump -T /usr/bin/screen
> 00000000006697e0
# Use the object address in addr2line usr/bin/ d3cd5073daa6b73 65b3787673143ed eec589d3. debug", O_RDONLY) = -1 ENOENT (No such file or directory) "/usr/bin/ .debug/ d3cd5073daa6b73 65b3787673143ed eec589d3. debug", O_RDONLY) = -1 ENOENT (No such file or directory) "/usr/lib/ debug/usr/ bin/d3cd5073daa 6b7365b37876731 43edeec589d3. debug", O_RDONLY) = -1 ENOENT (No such file or directory)
$ strace -f addr2line -f -C \
-e /usr/bin/screen 0x00000000006697e0 2>&1 | grep debug
> open("/
open(
open(
Here we see the 3 paths I mentioned earlier, but no signs of the desired one.
------------
Additional information:
- Ubuntu release
$ lsb_release -rd
> Description: Ubuntu 16.04.4 LTS
Release: 16.04
- Package version
$ apt-cache policy binutils 1ubuntu1~ 16.04.6 1ubuntu1~ 16.04.6 1ubuntu1~ 16.04.6 500 archive. ubuntu. com/ubuntu xenial-updates/main amd64 Packages security. ubuntu. com/ubuntu xenial- security/ main amd64 Packages dpkg/status
2.26-8ubuntu2 500 archive. ubuntu. com/ubuntu xenial/main amd64 Packages
> binutils:
Installed: 2.26.1-
Candidate: 2.26.1-
Version table:
*** 2.26.1-
500 http://
500 http://
100 /var/lib/
500 http://
- What I expected to happen
I expected that the `strace` command shown avobe would access the debug files at their actual location: lib/debug/ .build- id/e9/d3cd5073d aa6b7365b378767 3143edeec589d3. debug
/usr/
- What happened instead
The `addr2line` program does look for the debug file at three unexisting locations: bin/*.debug bin/.debug/ *.debug lib/debug/ usr/bin/ *.debug
/usr/
/usr/
/usr/
but it does not look for the debug file at the correct location.