"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.