From owner-freebsd-hackers Sun Jul 7 08:01:00 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA27515 for hackers-outgoing; Sun, 7 Jul 1996 08:01:00 -0700 (PDT) Received: from relay-2.mail.demon.net (disperse.demon.co.uk [158.152.1.77]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id IAA27480 for ; Sun, 7 Jul 1996 08:00:55 -0700 (PDT) Received: from post.demon.co.uk ([158.152.1.72]) by relay-2.mail.demon.net id ad22369; 7 Jul 96 16:00 +0100 Received: from jraynard.demon.co.uk ([158.152.42.77]) by relay-3.mail.demon.net id aa10040; 7 Jul 96 15:47 +0100 Received: (from fhackers@localhost) by jraynard.demon.co.uk (8.6.12/8.6.12) id JAA00837; Sun, 7 Jul 1996 09:08:22 GMT Date: Sun, 7 Jul 1996 09:08:22 GMT Message-Id: <199607070908.JAA00837@jraynard.demon.co.uk> From: James Raynard To: wpaul@skynet.ctr.columbia.edu CC: hackers@freebsd.org In-reply-to: <199607061722.NAA10798@skynet.ctr.columbia.edu> (message from Bill Paul on Sat, 6 Jul 1996 13:22:32 -0400 (EDT)) Subject: Re: gdb and dynamic symbol information Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > A while ago I discovered that gdb for the SunOS 4.1.x, Solaris 2.x > (SPARC and x86, probably PPC too), IRIX 5.x targets can read dynamic > symbol information from stripped binaries. (There may be other targets > where this is possible; these are just the ones I know off the top of my > head.) This is to say that if you have a dynamically linked binary that > has been stripped, you can still run gdb on it and accomplish a fair > amount of useful things. This is true even if the executable has _not_ > been compiled with -g. This is especially useful when trying to track > down problems with vendor software for which source is not available. > (Ever binary-edit an executable to toggle on a hidden debug flag? :) There's a program called 'unstrip' that does the same kind of thing and is probably easier to follow than poking around in the innermost depths of gdb. I had a look at porting it a while back but didn't really know enough about SunOS's executable format (or, to tell the truth, FreeBSD's). -- James Raynard, Edinburgh, Scotland james@jraynard.demon.co.uk http://www.freebsd.org/~jraynard/