Michael Theodorides
Michael Theodorides

Reputation: 78

How to configure gdb to load symbols?

I'm trying to run the exim4 mail server that ships with Debian 7.7.0 in gdb with debug symbols. I've installed the debug symbols using apt-get install exim4-dbg which seem to be located in /usr/lib/debug. When I try to attach to the exim process I get the following: (no debug symbols found)

Attaching to process 25318
Reading symbols from /usr/sbin/exim4...(no debugging symbols found)...done.
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libresolv.so.2...(no debugging symbols found)...done.
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libnsl.so.1...(no debugging symbols found)...done.
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libcrypt.so.1...(no debugging symbols found)...done.
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libm.so.6...(no debugging symbols found)...done.
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libdl.so.2...(no debugging symbols found)...done.
Reading symbols from /usr/lib/i386-linux-gnu/libdb-5.1.so...(no debugging symbols found)...done.
Reading symbols from /usr/lib/i386-linux-gnu/libgnutls.so.26...(no debugging symbols found)...done.
Reading symbols from /lib/i386-linux-gnu/libpcre.so.3...(no debugging symbols found)...done.
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libc.so.6...(no debugging symbols found)...done.
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".
Reading symbols from /usr/lib/i386-linux-gnu/libtasn1.so.3...(no debugging symbols found)...done.
Reading symbols from /lib/i386-linux-gnu/libgcrypt.so.11...(no debugging symbols found)...done.
Reading symbols from /lib/i386-linux-gnu/libz.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/i386-linux-gnu/libp11-kit.so.0...(no debugging symbols found)...done.
Reading symbols from /lib/i386-linux-gnu/libgpg-error.so.0...(no debugging symbols found)...done.
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libnss_compat.so.2...(no debugging symbols found)...done.
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libnss_nis.so.2...(no debugging symbols found)...done.
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libnss_files.so.2...(no debugging symbols found)...done.
Reading symbols from /lib/libnss_mdns4_minimal.so.2...(no debugging symbols found)...done.
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libnss_dns.so.2...(no debugging symbols found)...done.
Reading symbols from /lib/libnss_mdns4.so.2...(no debugging symbols found)...done.
0xb765c424 in __kernel_vsyscall ()
(gdb) show debug-file-directory
The directory where separate debug symbols are searched for is "/usr/lib/debug".
(gdb) list
No symbol table is loaded.  Use the "file" command.
(gdb) 

Any help is greatly appreciated. Thanks!

Upvotes: 1

Views: 1545

Answers (1)

jayant
jayant

Reputation: 2389

You are doing the right thing. You just need to apt-get install exim4-daemon-light-dbg or exim4-daemon-heavy-dbg. Then gdb should find the symbols the way you are currently running it.

Upvotes: 1

Related Questions