Re: indicating a debug image

2008-10-16 Thread Nate Eldredge

On Thu, 16 Oct 2008, Chuck Robey wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I was wondering, for FreeBSD images, is there a symbol that one could look for,
to indicate if image had debug symbols?  I know you could destroy that by just
stripping, I just wanted to know if there is any way to definitely tell, short
of firing up gdb and looking for info.


There's really three possibilities:

1. Image has no symbols
2. Image has only non-debug symbols (e.g. global functions and variables)
3. Image has debug symbols (e.g. line numbers, local variables)

strip(1) or gcc -s produces #1.  gcc without -g produces #2.  gcc -g 
produces #3.


You can distinguish #1 because 'nm image' will give no output.  nm and 
objdump don't appear able to distinguish #2 and #3, but readelf -w will 
give a bunch of output for #3 and none for #2.


Does that help?

--

Nate Eldredge
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


indicating a debug image

2008-10-16 Thread Chuck Robey
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I was wondering, for FreeBSD images, is there a symbol that one could look for,
to indicate if image had debug symbols?  I know you could destroy that by just
stripping, I just wanted to know if there is any way to definitely tell, short
of firing up gdb and looking for info.

Thanks
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkj3zV4ACgkQz62J6PPcoOn7FQCfSmBRRDLHJE71x/86IF+ELGKi
beEAoJLb/2SpNhg9YGmaioGkSCcySVlw
=4AbD
-END PGP SIGNATURE-
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"