public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: stabs or ecoff for Linux/mips
@ 2001-06-11 11:25 Bob Zulawnik
  0 siblings, 0 replies; 7+ messages in thread
From: Bob Zulawnik @ 2001-06-11 11:25 UTC (permalink / raw)
  To: hjl; +Cc: gdb, binutils, linux-mips

"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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: stabs or ecoff for Linux/mips
       [not found]   ` <873d9cnmad.fsf@cgsoftware.com>
@ 2001-06-07 12:24     ` H . J . Lu
  0 siblings, 0 replies; 7+ messages in thread
From: H . J . Lu @ 2001-06-07 12:24 UTC (permalink / raw)
  To: Daniel Berlin; +Cc: Stan Shebs, GDB, binutils, linux-mips

On Thu, Jun 07, 2001 at 03:05:14PM -0400, Daniel Berlin wrote:
> Stan Shebs <shebs@apple.com> writes:
> 
> > "H . J . Lu" wrote:
> >> 
> >> What is the better debug format for Linux/mips in the terms of gdb
> >> and binutils, stabs or ecoff? I know the future is dwarf2. But I need
> >> something stable now. Since Linux/x86 uses stabs, I lean toward to
> >> stabs. Any comments?
> > 
> > Go with stabs and ELF.  Neither ecoff's base file format nor the debug
> > info were particularly well-documented (I remember some of the bits in
> > GNU being figured out by reverse engineering!), perpetuating it will
> > just make your life more difficult in the long run.  It will also be
> > easier to move to dwarf2 when the opportunity arises.
> 
> mdebugread is also an evil piece of code. 

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


H.J.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: stabs or ecoff for Linux/mips
  2001-06-07 11:13   ` H . J . Lu
  2001-06-07 11:20     ` Ian Lance Taylor
@ 2001-06-07 11:27     ` Andrew Cagney
  1 sibling, 0 replies; 7+ messages in thread
From: Andrew Cagney @ 2001-06-07 11:27 UTC (permalink / raw)
  To: H . J . Lu; +Cc: GDB, binutils, linux-mips

> On Thu, Jun 07, 2001 at 02:04:45PM -0400, Andrew Cagney wrote:
> 
>> dwarf2
>> stabs
>> not ecoff (er, isn't ecoff an object format like coff? I guess you mean 
>> something like Dwarf1)
> 
> 
> Ok. I meant stabs in ecoff vs. stabs in elf.


dwarf2 in elf

Again ``There is nothing unstable about dwarf2 in elf''.


	Andrew


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: stabs or ecoff for Linux/mips
  2001-06-07 11:13   ` H . J . Lu
@ 2001-06-07 11:20     ` Ian Lance Taylor
  2001-06-07 11:27     ` Andrew Cagney
  1 sibling, 0 replies; 7+ messages in thread
From: Ian Lance Taylor @ 2001-06-07 11:20 UTC (permalink / raw)
  To: H . J . Lu; +Cc: Andrew Cagney, GDB, binutils, linux-mips

"H . J . Lu" <hjl@lucon.org> writes:

> On Thu, Jun 07, 2001 at 02:04:45PM -0400, Andrew Cagney wrote:
> > dwarf2
> > stabs
> > not ecoff (er, isn't ecoff an object format like coff? I guess you mean 
> > something like Dwarf1)

ECOFF is both an object file format and a debugging format.  Irix (at
least Irix 5) uses the ECOFF debugging format with the ELF object file
format (ECOFF smuggled in ELF).

The ECOFF debugging format can also be called mdebug or Third Eye, but
most people simply call it ECOFF.

Ian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: stabs or ecoff for Linux/mips
       [not found] ` <3B1FC23D.3020900@cygnus.com>
@ 2001-06-07 11:13   ` H . J . Lu
  2001-06-07 11:20     ` Ian Lance Taylor
  2001-06-07 11:27     ` Andrew Cagney
  0 siblings, 2 replies; 7+ messages in thread
From: H . J . Lu @ 2001-06-07 11:13 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: GDB, binutils, linux-mips

On Thu, Jun 07, 2001 at 02:04:45PM -0400, Andrew Cagney wrote:
> dwarf2
> stabs
> not ecoff (er, isn't ecoff an object format like coff? I guess you mean 
> something like Dwarf1)

Ok. I meant stabs in ecoff vs. stabs in elf.

> 
> As Dan will probably be quick to point out, you'll get better C++ 
> support with dwarf2.
> 
> There is nothing unstable about dwarf2.  GDB's support for it has been 
> around for yonks.

It is more than just gdb. For a complete dwarf2 support, we need gcc
and binutils. I don't think we are there yet, at least not with stable
release.

H.J.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: stabs or ecoff for Linux/mips
  2001-06-07  9:34 H . J . Lu
@ 2001-06-07 10:05 ` Ian Lance Taylor
  0 siblings, 0 replies; 7+ messages in thread
From: Ian Lance Taylor @ 2001-06-07 10:05 UTC (permalink / raw)
  To: H . J . Lu; +Cc: binutils

"H . J . Lu" <hjl@lucon.org> writes:

> What is the better debug format for Linux/mips in the terms of gdb
> and binutils, stabs or ecoff? I know the future is dwarf2. But I need
> something stable now. Since Linux/x86 uses stabs, I lean toward to
> stabs. Any comments?

Stabs is better.  ECOFF can not really support C++.  Note that when
using ECOFF, most GNU tools actually use stabs smuggled in ECOFF (see
ECOFF_IS_STAB, et. al., in include/coff/ecoff.h).  Since the SGI MIPS
ELF toolchain uses ECOFF smuggled in ELF, the GNU tools tend to use
use stabs smuggled in ECOFF smuggled in ELF.  For GNU/Linux/MIPS, it's
probably simpler to use stabs in ELF.

Ian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* stabs or ecoff for Linux/mips
@ 2001-06-07  9:34 H . J . Lu
  2001-06-07 10:05 ` Ian Lance Taylor
  0 siblings, 1 reply; 7+ messages in thread
From: H . J . Lu @ 2001-06-07  9:34 UTC (permalink / raw)
  To: binutils

What is the better debug format for Linux/mips in the terms of gdb
and binutils, stabs or ecoff? I know the future is dwarf2. But I need
something stable now. Since Linux/x86 uses stabs, I lean toward to
stabs. Any comments?


H.J.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-06-11 11:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-11 11:25 stabs or ecoff for Linux/mips Bob Zulawnik
     [not found] <20010607093149.B13198@lucon.org>
     [not found] ` <3B1FCAC9.2110A024@apple.com>
     [not found]   ` <873d9cnmad.fsf@cgsoftware.com>
2001-06-07 12:24     ` H . J . Lu
     [not found] <20010607093332.C13198@lucon.org>
     [not found] ` <3B1FC23D.3020900@cygnus.com>
2001-06-07 11:13   ` H . J . Lu
2001-06-07 11:20     ` Ian Lance Taylor
2001-06-07 11:27     ` Andrew Cagney
  -- strict thread matches above, loose matches on Subject: below --
2001-06-07  9:34 H . J . Lu
2001-06-07 10:05 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).