public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1853] CTF/BTF documentation
@ 2021-06-28 17:29 Jose E. Marchesi
  0 siblings, 0 replies; only message in thread
From: Jose E. Marchesi @ 2021-06-28 17:29 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:824a6a52a6c2892c8d4a4a889a425bdaf207634f

commit r12-1853-g824a6a52a6c2892c8d4a4a889a425bdaf207634f
Author: Indu Bhagat <indu.bhagat@oracle.com>
Date:   Thu May 20 11:20:50 2021 -0700

    CTF/BTF documentation
    
    This commit documents the new command line options introduced by the
    CTF and BTF debug formats.
    
    2021-06-28  Indu Bhagat  <indu.bhagat@oracle.com>
    
            * doc/invoke.texi: Document the CTF and BTF debug info options.

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

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index af2ce189fae..2dc6a2106d9 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -466,6 +466,7 @@ Objective-C and Objective-C++ Dialects}.
 @item Debugging Options
 @xref{Debugging Options,,Options for Debugging Your Program}.
 @gccoptlist{-g  -g@var{level}  -gdwarf  -gdwarf-@var{version} @gol
+-gbtf -gctf  -gctf@var{level} @gol
 -ggdb  -grecord-gcc-switches  -gno-record-gcc-switches @gol
 -gstabs  -gstabs+  -gstrict-dwarf  -gno-strict-dwarf @gol
 -gas-loc-support  -gno-as-loc-support @gol
@@ -9647,7 +9648,9 @@ in the ``exploded graph'' and diagnostics associated with them.
 @cindex debugging information options
 
 To tell GCC to emit extra information for use by a debugger, in almost 
-all cases you need only to add @option{-g} to your other options.
+all cases you need only to add @option{-g} to your other options.  Some debug
+formats can co-exist (like DWARF with CTF) when each of them is enabled
+explicitly by adding the respective command line option to your other options.
 
 GCC allows you to use @option{-g} with
 @option{-O}.  The shortcuts taken by optimized code may occasionally
@@ -9708,6 +9711,33 @@ other DWARF-related options such as
 @option{-fno-dwarf2-cfi-asm}) retain a reference to DWARF Version 2
 in their names, but apply to all currently-supported versions of DWARF.
 
+@item -gbtf
+@opindex gbtf
+Request BTF debug information.  BTF is the default debugging format for the
+eBPF target.  On other targets, like x86, BTF debug information can be
+generated along with DWARF debug information when both of the debug formats are
+enabled explicitly via their respective command line options.
+
+@item -gctf
+@itemx -gctf@var{level}
+@opindex gctf
+Request CTF debug information and use level to specify how much CTF debug
+information should be produced.  If @option{-gctf} is specified
+without a value for level, the default level of CTF debug information is 2.
+
+CTF debug information can be generated along with DWARF debug information when
+both of the debug formats are enabled explicitly via their respective command
+line options.
+
+Level 0 produces no CTF debug information at all.  Thus, @option{-gctf0}
+negates @option{-gctf}.
+
+Level 1 produces CTF information for tracebacks only.  This includes callsite
+information, but does not include type information.
+
+Level 2 produces type information for entities (functions, data objects etc.)
+at file-scope or global-scope only.
+
 @item -gstabs
 @opindex gstabs
 Produce debugging information in stabs format (if that is supported),


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-28 17:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-28 17:29 [gcc r12-1853] CTF/BTF documentation Jose E. Marchesi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).