https://gcc.gnu.org/g:fe78f75233f19504578934f56481313fb17dd597

commit r16-8446-gfe78f75233f19504578934f56481313fb17dd597
Author: Sandra Loosemore <[email protected]>
Date:   Fri Apr 3 17:28:56 2026 +0000

    doc: Document -g2 debugging level [PR94491]
    
    gcc/ChangeLog
            PR debug/94491
            * doc/invoke.texi (Debugging Options): Explicitly document what
            -g2 does instead of just saying it's the default.

Diff:
---
 gcc/doc/invoke.texi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 126978c8bbb5..44d7a8f14a9b 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -12920,6 +12920,12 @@ 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 2 is the normal setting to produce debuggable code.  The debug output
+includes all the information from level 1, plus information about
+local variables and typedefs to allow stepping through code and examining
+its state.  For C++ code, additional information is also emitted to assist
+in debugging namespace, class, and template functions.
+
 Level 3 includes extra information, such as all the macro definitions
 present in the program.  Some debuggers support macro expansion when
 you use @option{-g3}.

Reply via email to