linux-mips
[Top] [All Lists]

Re: stabs or ecoff for Linux/mips

To: hjl@lucon.org
Subject: Re: stabs or ecoff for Linux/mips
From: Bob Zulawnik <bob.zulawnik@cportcorp.com>
Date: Mon, 11 Jun 2001 14:24:57 -0400
Cc: gdb@sourceware.cygnus.com, binutils@sourceware.cygnus.com, linux-mips@oss.sgi.com
Sender: owner-linux-mips@oss.sgi.com
"H . J . Lu" wrote:

> That matches my own experiences. In case you haven't noticed, I
> have checked in patches to switch Linux/mips to stabs in ELF :-).

For what it's worth : stabs format cannot express certain types
of debug info that mdebug (used in ecoff) can. An example of
that is so-called PDRs (Procedure Description Records) - they
describe frame size, register masks etc.). Thus, in order to
obtain information about a function (e.g. when setting a
breakpoint at the entrance to a function), gdb has to resort to 
heuristics and read the function prolog, trying to figure out
what registers are saved where, when is the frame setup complete
etc. There are assumptions made in that gdb code  (e.g.
mips32_heuristic_proc_desc() and mips16_heuristic_proc_desc())
that have to match exactly what the compiler has done (as in
"the occurrence of instruction 'x' signifies this"). Thus,
using the stabs opens the debugger to potential misinterpretations
of the code generated by the compiler (e.g. when a new type
of frame is introduced, or maybe with some weird optimization).
I understand that there are other arguments for using stabs and 
that dwarf2 is the long-term goal, this is just an FYI. 

Bob Zulawnik

<Prev in Thread] Current Thread [Next in Thread>