addr2line wrong search path for debug files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
binutils (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I cannot make `addr2line` to work. It does look for symbols at three (*unexisting*) paths:
/usr/bin/*.debug
/usr/bin/
/usr/lib/
But it just seems to ignore the path where all debugging symbols are actually installed by default:
/usr/lib/
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
$ 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:
/usr/lib/
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("/
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
> 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:
/usr/lib/
- What happened instead
The `addr2line` program does look for the debug file at three unexisting locations:
/usr/bin/*.debug
/usr/bin/
/usr/lib/
but it does not look for the debug file at the correct location.
Status changed to 'Confirmed' because the bug affects multiple users.