1

I am trying to install debug symbols for gcc. Searching around I have:

gcc-4.7-dbgsym/xenial,now 4.7.4-3ubuntu12 amd64 [installed]
debug symbols for package gcc-4.7

gcc-4.7-multilib-dbgsym/xenial,now 4.7.4-3ubuntu12 amd64 [installed]
debug symbols for package gcc-4.7-multilib

gdb does not find the debug symbols when I load gcc-4.7 into the debugger. So I checked to see which files these packages had installed:

$>  dpkg-query -L gcc-4.7-multilib-dbgsym 
/.
$>  dpkg-query -L gcc-4.7-dbgsym 
/.  

It seems these packages are empty? Am I doing something wrong? Or how can I check if the debug symbols are actually installed.

Checking under /usr/lib/debug I didn't find anything.

1 Answers1

0

I ended up getting the GCC source directly from apt:

apt get source gcc

This installs the gcc source into a local directory. From here, I compiled GCC with debug flags and no optimizations. The compilation takes a very long time, so you might consider loading the gcc binary through gdb and merely pointing to the source like this, basically using the dir command. This may lead to some unexpected behavior as GCC will still have optimizations on.