On Mon, 2010-05-17 at 11:12 -0700, Tom Rini wrote: > On Mon, 2010-05-17 at 10:45 -0700, Khem Raj wrote: > > what is -g3 offering over -g at -O2 and how good the additional debug info > > is ? > > -g3 offers lots of stuff, spelled out in some doc or another is macro > expansion, for example. I don't know if it offers enough stuff that you > say don't need the sources themselves around still too tho. Koen?
The gcc manual is not terribly illuminating on this subject: http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#Debugging-Options just says that it "... includes extra information, such as all the macro definitions present in the program. Some debuggers support macro expansion when you use -g3." The definitions in flags.h suggest that, in fact, -g3 doesn't really add much apart from macros: 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. */ }; ... and, from a quick inspection of dwarf2out.c, I didn't see anything else very obvious that is added by DINFO_LEVEL_VERBOSE. So, all in all, I can't find a great deal of evidence to suggest that compiling at -g3 really does enhance the debugging experience all that much. I've certainly never used that option myself and haven't really felt the poorer for it. I'd be interested to hear what exactly the feature is that the Angstrom folks feel the lack of renders the -dbg packages unusable with -g2. p. _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
