This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: Best set of gcc options for debugging


> Date: Thu, 8 Jul 2004 18:27:59 -0400
> From: Phil Edwards <phil@codesourcery.com>
> 
> On Thu, Jul 08, 2004 at 03:58:02PM -0500, Aaron W. LaFramboise wrote:

> > Recently, I've been having a lot of frustration using gdb with gcc 3.4.1
> > (and even more so on 3.5) with stabs.

> stabs has a set of problems associated with it that are probably never
> going to be solved, just because of the limitations with the stabs format.

I can't speak for others, but unless LD starts doing a significantly
better job at eliminating redundant dwarf info than of stabs, I expect
we'll stay with stabs for a long time to come.

STABS still has a fair bit of life left in it.

[...]
> > What is the story with -g3?  Does this actually do anything useful?
> 
> Well, under DWARF, it makes cpp macros visible to the debugger, so
> things like
> 
>     (gdb) p _NDEBUG
> 
> and
> 
>     (gdb) p DECL_WHATSIS (decl)
> 
> work.  I forget what else it turns on.

BTW, adding the macro stuff to STABS is fairly easy -- the bulk of the
machinery is already there.

To add the support for it to gcc and gdb, test it, and debug it, is
less than a days work.  (And once the lawyers do their thing, I will
gladly contribute it back.)

David
--
David Taylor
dtaylor@emc.com


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