This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: stabs or ecoff for Linux/mips
- To: hjl at lucon dot org
- Subject: Re: stabs or ecoff for Linux/mips
- From: Bob Zulawnik <bob dot zulawnik at cportcorp dot com>
- Date: Mon, 11 Jun 2001 14:24:57 -0400
- CC: gdb at sourceware dot cygnus dot com, binutils at sourceware dot cygnus dot com, linux-mips at oss dot sgi dot 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