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


Phil Edwards wrote:

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

I looks like, that the #defines are the only difference, if
you switch -g3 on. -g ist the same as -g2.

from flags.h:

enum debug_info_level
{
  DINFO_LEVEL_NONE, /* Write no debugging info.  */
  DINFO_LEVEL_TERSE, /* Write minimal info to support tracebacks only.  */
  DINFO_LEVEL_NORMAL, /* Write info for all declarations (and line table).  */
  DINFO_LEVEL_VERBOSE /* Write normal info plus #define/#undef info.  */
};

    hope this helps
    Joerg
   


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