This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: stabs and macro information


On Thu, Apr 17, 2003 at 12:39:21PM -0400, David Taylor wrote:
> > > They are an inferior debug format, extremely hard to parse or
> > > extend.  GCC's and GDB's current implementations of DWARF-2 (and 3) are
> > > somewhat lacking, but it's all fixable.
> > 
> > And, more importantly, in the process of being fixed.
> > :)
> 
> Ummm, I would have to disagree about the first part.
> 
> STABS is pretty easy to extend.  I haven't done the GDB part yet; but,
> while I imagine it will take longer to do than the GCC part, I don't
> expect it to take a long time and I expect that the bulk of the time
> will be becoming enough familiar with the macro table stuff in GDB to
> make the right calls.  How to modify GDB's STABS parser looks pretty
> straightforward.

No.  Your extensions are an example of a kind which would be easy to
add; but for some C++ concepts which DWARF-2 can express, it would be a
heck of a lot harder.  Inline functions, templates, namespaces (Sun has
recent extensions for at least this one), virtual inheritance (we can
do this now but you'll see what I mean about gross extensions if you
look at how!), et cetera.

A better example is .debug_loc; location lists in stabs would be
extremely difficult to integrate into the stabs text format.

> That the problems with GCC's and GDB's implementations of DWARF are
> being addressed is important.
> 
> I feel that saying that DWARF is a superior *format* is irrelevant if
> the implementation is not superior.  As the implementation improves
> and the size of the DWARF info decreases, people will be more likely
> to embrace DWARF.  The size of the information is an issue for us.

These are not the only implementations in the world.  Sadly, right now
they aren't close to the best, either.  There are some interesting
existance proofs, in e.g. the Intel tools.

As for text vs binary - there are at least two good DWARF-2 dumpers,
readelf and dwarfdump; I find their output a whole lot easier to make
sense of than stabs.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]