I've got some crash files for recoll from which I would like to extract a symbolic stack trace. Unfortunately, there are no debug symbols available for this package, so my stack traces are mostly unhelpful.
The crash files are generated by apport for /usr/bin/recoll
,
so I want to use symbols from an external file
rather than compiling from source with debugging symbols
(because then I'd have to reproduce the crash).
Based on the build ID, I'd expect them to go under
/usr/lib/debug/.build-id/7e/83e15f5cfae88cef2850e4a510f4d4849ae6b9.debug
:
$ file /usr/bin/recoll
/usr/bin/recoll: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/l, for GNU/Linux 3.2.0, BuildID[sha1]=7e83e15f5cfae88cef2850e4a510f4d4849ae6b9, stripped
$ gdb
(gdb) show debug-file-directory
The directory where separate debug symbols are searched for is "/usr/lib/debug".
I know I could add to the debug-file-directory
, something like this:
(gdb) set debug-file-directory /usr/lib/debug:/home/nathaniel/mysymbols
but I still need to compile the object file,
and I'm having trouble finding sufficient documentation
on how to do this with apt/dpkg.
Sure, I can use apt-get source -b recoll
to download and build it,
but the build ID isn't the same and the final executable is still stripped.
I'm guessing this is because -fdebug-prefix-map
isn't the same.
$ sudo apt-get build-dep recoll
$ apt-get source -b recoll
<snip>
./configure CFLAGS="-g -O2 -fdebug-prefix-map=/home/nathaniel/apt-get-source/recoll/recoll-1.23.7=.
<snip>
$ file recoll-1.23.7/qtgui/recoll
recoll-1.23.7/qtgui/recoll: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/l, for GNU/Linux 3.2.0, BuildID[sha1]=be2479236c840a60c71848f9d8257b68856f28f5, not stripped
$ file recoll-1.23.7/debian/recoll/usr/bin/recoll
recoll-1.23.7/debian/recoll/usr/bin/recoll: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/l, for GNU/Linux 3.2.0, BuildID[sha1]=be2479236c840a60c71848f9d8257b68856f28f5, stripped
so my question is:
How can I manually compile and install the debugging symbols for the recoll package on Ubuntu 18.04?
Related:
- Where are the debug symbols for plasmashell (Kubuntu 19.04)?
- OpenJDK - Installing JDK Debug Symbols manually
- https://randomascii.wordpress.com/2013/02/20/symbols-on-linux-part-three-linux-versus-windows/
- https://stackoverflow.com/questions/14473506/gdb-core-dump-find-executable-by-build-id
- https://stackoverflow.com/questions/28787534/debug-information-file-conventions-for-debian-ubuntu
0 Answers