I'm trying to download debugging symbols to Debian OS, I've done some research and saw this web : https://wiki.debian.org/HowToGetABacktrace , but i could not know the name of the package to download it. Please help me.
Asked
Active
Viewed 1,727 times
1 Answers
1
This depends on what app you want to debug. Say you want to debug /bin/ls
.
First you need to find out what package provides this file:
$ dpkg -S /bin/ls
coreutils: /bin/ls
Package name is coreutils
. Next you need to install debug symbols for this package following instructions in https://wiki.debian.org/HowToGetABacktrace#Installing_the_debugging_symbols. It should be either coreutils-dbgsym
or coreutils-dbg
package. So the command to install debug symbols package would be one of these:
# apt-get install coreutils-dbgsym
or
# apt-get install coreutils-dbg

ks1322
- 33,961
- 14
- 109
- 164
-
I had this problem when I was debugging : https://stackoverflow.com/questions/47119328/strcpy-sse2-unaligned-with-fno-builtin . Then I did some research and I saw this post : https://stackoverflow.com/questions/15306090/cant-step-into-string-h-function-with-gdb/15306144#15306144 which told you to install debug symbols, but I still could not know what package should I download as I don't know what app I'm debugging either ( sorry, cause I'm new to Kali linux and Debian OS). – bensua Nov 05 '17 at 22:37
-
I see. Actually you are debugging `strcpy` which is part of libc.so. libc.so is a shared library which is linked to every app by default. So you need to install debugging symbols for libc.so: `sudo apt-get install libc6-dbg`. – ks1322 Nov 06 '17 at 10:18
-
So I did what you said and checked it. It showed the libc6 is detached, is this why I still got the problem with strcpy().`root@19:~# apt-cache search libc6 | grep dbg libc6-dbg - GNU C Library: detached debugging symbols libc6-i386-dbgsym - Debug symbols for libc6-i386 libc6-x32-dbgsym - Debug symbols for libc6-x32 ` – bensua Nov 06 '17 at 11:11
-
I use 64-bit OS btw. – bensua Nov 06 '17 at 11:15