[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gdb and dynamically loaded code

From: hjl@lucon.org (H.J. Lu)
> How do you debug a stripped binary? Unless I am wrong, if you want 
> to debug ld-linux.so.1, you have to compile it with -g and don't strip
> it. It doesn't cost much in disk space.

I think he was making the point that the .dynsym section is present in
"stripped" dynamic executables, but that GDB does not take advantage of
it. I understand that it doesn't provide all of the information you
need for source debugging, but it is probably sufficient to tell the
debugger where to set the breakpoint for a function. This would be a
useful thing to have, because we don't by default distribute shared
libraries with full debugging symbols. We do provide debugging packages
for some libraries that contain static (I think) versions compiled with
-g, but those are optional.

I guess ld-linux.so is a special case - we can provide it unstripped.


Bruce Perens K6BP   Bruce@Pixar.com
Finger bruce@master.Debian.org for PGP public key.
PGP fingerprint = 88 6A 15 D0 65 D4 A3 A6  1F 89 6A 76 95 24 87 B3 

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com

Reply to: