Related articles |
---|
How do debuggers work? omtzigt-theo@CS.YALE.EDU (Erwinus Theodorus Leonardus Omtzigt (Theo)) (1991-11-27) |
Re: How do debuggers work? tynor@prism.gatech.edu (1991-12-03) |
Re: How do debuggers work? davea@quasar.wpd.sgi.com (1991-12-03) |
Re: How do debuggers work? pardo@cs.washington.edu (1991-12-04) |
Re: How do debuggers work? plains!ortmann@uunet.uu.net (1991-12-04) |
Re: How do debuggers work? hasan@emx.utexas.edu (1991-12-04) |
Re: How do debuggers work? meissner@osf.org (1991-12-05) |
Re: How do debuggers work? gaynor@remus.rutgers.edu (1991-12-05) |
Re: How do debuggers work? bliss@sp64.csrd.uiuc.edu (1991-12-05) |
Re: How do debuggers work? cherrman@borland.com (1991-12-06) |
Re: How do debuggers work? jnelson@gauche.zko.dec.com (1991-12-09) |
Re: How do debuggers work? meissner@osf.org (1991-12-15) |
Re: How do debuggers work? tedg@apollo.HP.COM (1991-12-19) |
Newsgroups: | comp.compilers |
From: | meissner@osf.org |
Keywords: | debug, assembler |
Organization: | Compilers Central |
References: | 91-12-011 |
Date: | Thu, 5 Dec 91 11:06:36 -0500 |
Steve Tynor writes:
| Can anyone point me towards some literature/manuals/sample code which
| might educate me? The current platform is SunOS 4.1.1. I've read the a.out
| man page (and peeked at the a.out.h), but it leaves a lot of details to my
| imagination... Eventually, I'll want to port to other platforms, so info
| on other debuggers/.o formats would also be helpful.
I can't help you with regard to SunOS, but you might want to check out the
following:
If you are using System V.[23] COFF (Common Object File Format), you might
want to look at:
Understand and Using COFF
by Gintaras R. Gircys
Published by O'Reilly & Associates, Inc.
ISBN 0-937175-31-5
(my version cost $21.95 in August 1989)
If you are using System V.4 Dwarf debugging, the programming language
special interest group PLSIG is about to release their specifications for
Dwarf for public review. You can contact them through the mail address
plsig-request@uiunix.UI.ORG.
If you are using the MIPS Extended COFF object file format, I found that
the Assembly Language Programmer's Guide that DEC ships (order number
3201DOC) covers ECOFF, though it is a little skimpy. You also might want
to check out the mips-tfile program in my patches to GCC 1.39. Mips-tfile
is a hack (in the original sense of the word) that provides full debug
support on MIPS based systems by reading the object file after the
assembler is done and rewriting the symbol table to include debug
information as provided in comments in the assembly source. This is
needed because the MIPS assembler provides no means of creating local
symbols (the native MIPS compiler bypasses the first phase of the
assembler and creates the symbol table itself). You can get a copy of my
patches via anonymous FTP from the machine foobar.cs.colorado.edu, in the
pub/Gcc-For-Pmax directory. GCC 2.00 will include it directly, and
provide a hook to run a program after the assembler is finished (GCC 1.39
uses an assembler cover program which runs the real assembler and then
mips-tfile). Note, this is covered by the GNU public license....
The latest version of the GNU debugger (GDB) has abstracted access to
object file formats into a library (bfd). Work in going on to make the
library complete enough to write an assembler or linker in addition to the
debugger. You can get GDB at most major FTP archives, or by going to the
offical repository on prep.ai.mit.edu in the pub/gnu directory.
If you limit your target compilers to GCC, you might be able to bypass the
need for munging about in the object file, by dropping the appropriate
information for the debug info via asm("...") constructs that use the
appropriate stabs. It might however confuse the debugger to have two
descriptions of a given variable.
--
Michael Meissner email: meissner@osf.org phone: 617-621-8861
Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.