From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sat, 22 Jul 2000 10:33:43 -0700 From: Mike Haertel Message-Id: <200007221733.KAA88238@ducky.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] software ports In-Reply-To: <200007221537.LAA00818@cse.psu.edu> References: <200007221537.LAA00818@cse.psu.edu> Topicbox-Message-UUID: e8d02212-eac8-11e9-9e20-41e7f4b1d025 In comp.os.plan9, you wrote: >Without that, I'm sure we'll just hit a debugging wall. >Anyone know what gdb expects? With Elf binaries, gdb can work with two different kinds of debugging symbols: Berkeley dbx-style "stabs" (which gdb expects to find in Elf sections named ".stab" and ".stabstr"), or AT&T-style DWARF debugging symbols, which have a different set of ELF section names. ftp://tsx-11.mit.edu/pub/linux/packages/GCC/ELF.doc.tar.gz (describes basic Elf file format, but not debugging symbols) There is some documentation for the DWARF2 debugging format in ftp://sgigate.sgi.com/pub/dwarf. The "stabs" debugging format is described in the dbx(5) man page under 4.3BSD. Unfortunately, this documentation does not seem to exist in any of the recent free *BSD's; this is a valuable man page and I don't know what became of it. If you have a printed copy of the old Usenix 4.3BSD manuals you can find it there (that's what I have), or if you have a 4.3bsd tape sitting around you'll find it there. Anyway the stabs format has probably evolved somewhat since the 4.3bsd man page was written, moreover I think gdb has its own slightly idiosyncratic variation that fixes some problems with the original dbx format. So if you want a well-documented format you're probably better off with DWARF.