From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8D23C385B831; Sun, 5 Apr 2020 11:04:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8D23C385B831 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1586084660; bh=jvS6TTZX26fOK1W+YmCCiKdpEjsI8Ynm+ud2SoRSXvA=; h=From:To:Subject:Date:From; b=Byxz4so27ZXsiEF6uU2Ks/P/7TDGmjOZ7C3ok4pjts7kFw1+i6DPjyLIQXq6DmBQg CsLP4/BLCIQdctr5+St4t7aaVyexV+8sedmi99K6xztQsqW6t3kd7yrpTqNyOFsQ05 z9yOagRSXfUfghls5Igii9fy5cbXLA+AeYO/wxTg= From: "slyfox at inbox dot ru" To: gcc-bugs@gcc.gnu.org Subject: [Bug driver/94491] New: -g2 debugging level is not documented Date: Sun, 05 Apr 2020 11:04:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: driver X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: slyfox at inbox dot ru X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2020 11:04:20 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94491 Bug ID: 94491 Summary: -g2 debugging level is not documented Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at inbox dot ru Target Milestone: --- A tiny backstory: to profile a program I built it with '-g'. The result did= not fit in my RAM and machine crashed. Looking at the doc I found out '-g' means '-g2' (and not '-g1'). Worth documenting what -g2 actually do? Others are interested as well: https://stackoverflow.com/questions/10475040/gcc-g-vs-g3-gdb-flag-what-is-t= he-difference 'man gcc' covers only 0,1 and 3: """ -glevel -ggdblevel -gstabslevel -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 backtrac= es in parts of the program that you don't plan to debug. This includes descriptions of functions and external variables, and line number tables, but no information about local variables. Level 3 includes extra information, such as all the macro definitions present in the program. Some debuggers support macro expansion when you use -g3. If you use multiple -g options, with or without level numbers, t= he last such option is the one that is effective. -gdwarf does not accept a concatenated debug level, to avoid confusion with -gdwarf-level. Instead use an additional -glevel option to change the debug level for DWARF. """=