Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 178421 - backtraces guide redundant flag recommendations
Summary: backtraces guide redundant flag recommendations
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs on www.gentoo.org
Classification: Unclassified
Component: Other documents (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Gentoo Quality Assurance Team
URL: http://www.gentoo.org/proj/en/qa/back...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-13 19:55 UTC by Ryan Hill (RETIRED)
Modified: 2007-05-13 21:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
backtraces.xml.diff (backtraces.xml.diff,1.36 KB, patch)
2007-05-13 19:55 UTC, Ryan Hill (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Hill (RETIRED) gentoo-dev 2007-05-13 19:55:17 UTC
The backtraces guide states:

"The basic flag to add in this case is -g. That tells the compiler to include extra information in objects, such as filenames and line numbers. This is usually enough to have basic backtraces, but the flags -g2 and -ggdb add more information."

but -g is equivalent to -g2. (like -ggdb is equivalent to -ggdb2 but that's beside the point)
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2007-05-13 19:55:58 UTC
Created attachment 119140 [details, diff]
backtraces.xml.diff
Comment 2 Jan Kundrát (RETIRED) gentoo-dev 2007-05-13 20:08:24 UTC
Thanks, but we (GDP) generally don't touch other project's docs -> reassigning to QA.
Comment 3 SpanKY gentoo-dev 2007-05-13 20:56:14 UTC
where do you see the statement that "-g2" is equivalent to "-g"
Comment 4 Ryan Hill (RETIRED) gentoo-dev 2007-05-13 21:31:33 UTC
-glevel
-ggdblevel
-gstabslevel
-gcofflevel
-gxcofflevel
-gvmslevel
    Request debugging information and also use level to specify how much information. The default level is 2.

    Level 0 produces no debug information at all. Thus, -g0 negates -g.

    Level 1 produces minimal information, enough for making backtraces in parts of the program that you don't plan to debug. This includes descriptions of functions and external variables, but no information about local variables and no line numbers.

    Level 3 includes extra information, such as all the macro definitions present in the program. Some debuggers support macro expansion when you use -g3. 

http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#Debugging-Options
Comment 5 SpanKY gentoo-dev 2007-05-13 21:46:06 UTC
my look through the source code didnt turn up such visibility which is why i was asking ... thanks, merged