This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Best set of gcc options for debugging
- From: "Joerg Beyer" <j dot beyer at web dot de>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 09 Jul 2004 09:38:44 +0200
- Subject: Re: Best set of gcc options for debugging
- Organization: http://freemail.web.de/
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