GCC Middle and Back End API Reference
ctfc.h File Reference
#include "config.h"
#include "system.h"
#include "tree.h"
#include "fold-const.h"
#include "dwarf2ctf.h"
#include "ctf.h"
#include "btf.h"
Include dependency graph for ctfc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ctf_string
 
struct  ctf_strtable
 
struct  ctf_encoding
 
struct  ctf_arinfo
 
struct  ctf_funcinfo
 
struct  ctf_sliceinfo
 
struct  ctf_itype
 
struct  ctf_dmdef
 
struct  ctf_func_arg
 
struct  ctf_dtdef
 
struct  ctf_dvdef
 
struct  ctf_srcloc
 
struct  ctfc_dtd_hasher
 
struct  ctfc_dvd_hasher
 
struct  ctf_container
 

Macros

#define CTF_NULL_TYPEID   0
 
#define CTF_INIT_TYPEID   1
 
#define ctti_size   _u._size
 
#define ctti_type   _u._type
 
#define CTF_FUNC_VARARG   0x1
 
#define ctf_dmd_list_next(elem)   ((ctf_dmdef_t *)((elem)->dmd_next))
 
#define ctf_farg_list_next(elem)   ((ctf_func_arg_t *)((elem)->farg_next))
 
#define CTF_STRTAB   0 /* CTF string table. @endverbatim */
 
#define CTF_AUX_STRTAB   1 /* CTF auxilliary string table. @endverbatim */
 
#define CTF_ADD_NONROOT   0 /* CTF type only visible in nested scope. @endverbatim */
 
#define CTF_ADD_ROOT   1 /* CTF type visible at top-level scope. @endverbatim */
 

Typedefs

typedef uint64_t ctf_id_t
 
typedef struct ctf_string ctf_string_t
 
typedef struct ctf_strtable ctf_strtable_t
 
typedef struct ctf_encoding ctf_encoding_t
 
typedef struct ctf_arinfo ctf_arinfo_t
 
typedef struct ctf_funcinfo ctf_funcinfo_t
 
typedef struct ctf_sliceinfo ctf_sliceinfo_t
 
typedef struct ctf_itype ctf_itype_t
 
typedef struct ctf_dmdef ctf_dmdef_t
 
typedef struct ctf_func_arg ctf_func_arg_t
 
typedef struct ctf_dtdef ctf_dtdef_t
 
typedef struct ctf_dvdef ctf_dvdef_t
 
typedef ctf_dvdef_tctf_dvdef_ref
 
typedef ctf_dtdef_tctf_dtdef_ref
 
typedef struct ctf_srcloc ctf_srcloc_t
 
typedef ctf_srcloc_tctf_srcloc_ref
 
typedef struct ctf_container ctf_container_t
 
typedef ctf_container_tctf_container_ref
 
typedef bool(* funcs_traverse_callback) (ctf_dtdef_ref, void *)
 

Enumerations

enum  ctf_dtu_d_union_enum {
  CTF_DTU_D_MEMBERS , CTF_DTU_D_ARRAY , CTF_DTU_D_ENCODING , CTF_DTU_D_ARGUMENTS ,
  CTF_DTU_D_SLICE
}
 

Functions

enum ctf_dtu_d_union_enum ctf_dtu_d_union_selector (ctf_dtdef_ref)
 
void ctfc_delete_container (ctf_container_ref)
 
bool ctfc_is_empty_container (ctf_container_ref)
 
unsigned int ctfc_get_num_ctf_types (ctf_container_ref)
 
unsigned int ctfc_get_num_ctf_vars (ctf_container_ref)
 
ctf_strtable_tctfc_get_strtab (ctf_container_ref, int)
 
size_t ctfc_get_strtab_len (ctf_container_ref, int)
 
size_t ctfc_get_num_vlen_bytes (ctf_container_ref)
 
void ctf_init (void)
 
void ctf_output (const char *filename)
 
void ctf_finalize (void)
 
void btf_output (const char *filename)
 
void btf_init_postprocess (void)
 
void btf_finalize (void)
 
ctf_container_ref ctf_get_tu_ctfc (void)
 
bool ctf_type_exists (ctf_container_ref, dw_die_ref, ctf_id_t *)
 
void ctf_add_cuname (ctf_container_ref, const char *)
 
ctf_dtdef_ref ctf_dtd_lookup (const ctf_container_ref ctfc, dw_die_ref die)
 
ctf_dvdef_ref ctf_dvd_lookup (const ctf_container_ref ctfc, dw_die_ref die)
 
bool ctf_dvd_ignore_lookup (const ctf_container_ref ctfc, dw_die_ref die)
 
const charctf_add_string (ctf_container_ref, const char *, uint32_t *, int)
 
ctf_id_t ctf_add_reftype (ctf_container_ref, uint32_t, ctf_id_t, uint32_t, dw_die_ref)
 
ctf_id_t ctf_add_enum (ctf_container_ref, uint32_t, const char *, HOST_WIDE_INT, bool, dw_die_ref)
 
ctf_id_t ctf_add_slice (ctf_container_ref, uint32_t, ctf_id_t, uint32_t, uint32_t, dw_die_ref)
 
ctf_id_t ctf_add_float (ctf_container_ref, uint32_t, const char *, const ctf_encoding_t *, dw_die_ref)
 
ctf_id_t ctf_add_integer (ctf_container_ref, uint32_t, const char *, const ctf_encoding_t *, dw_die_ref)
 
ctf_id_t ctf_add_unknown (ctf_container_ref, uint32_t, const char *, const ctf_encoding_t *, dw_die_ref)
 
ctf_id_t ctf_add_pointer (ctf_container_ref, uint32_t, ctf_id_t, dw_die_ref)
 
ctf_id_t ctf_add_array (ctf_container_ref, uint32_t, const ctf_arinfo_t *, dw_die_ref)
 
ctf_id_t ctf_add_forward (ctf_container_ref, uint32_t, const char *, uint32_t, dw_die_ref)
 
ctf_id_t ctf_add_typedef (ctf_container_ref, uint32_t, const char *, ctf_id_t, dw_die_ref)
 
ctf_id_t ctf_add_function (ctf_container_ref, uint32_t, const char *, const ctf_funcinfo_t *, dw_die_ref, bool, int)
 
ctf_id_t ctf_add_sou (ctf_container_ref, uint32_t, const char *, uint32_t, size_t, dw_die_ref)
 
int ctf_add_enumerator (ctf_container_ref, ctf_id_t, const char *, HOST_WIDE_INT, dw_die_ref)
 
int ctf_add_member_offset (ctf_container_ref, dw_die_ref, const char *, ctf_id_t, uint64_t)
 
int ctf_add_function_arg (ctf_container_ref, dw_die_ref, const char *, ctf_id_t)
 
int ctf_add_variable (ctf_container_ref, const char *, ctf_id_t, dw_die_ref, unsigned int, dw_die_ref)
 
ctf_id_t ctf_lookup_tree_type (ctf_container_ref, const tree)
 
ctf_id_t get_btf_id (ctf_id_t)
 
bool traverse_btf_func_types (funcs_traverse_callback, void *)
 
int ctfc_get_dtd_srcloc (ctf_dtdef_ref, ctf_srcloc_ref)
 
int ctfc_get_dvd_srcloc (ctf_dvdef_ref, ctf_srcloc_ref)
 

Variables

ctf_container_ref tu_ctfc
 

Macro Definition Documentation

◆ CTF_ADD_NONROOT

#define CTF_ADD_NONROOT   0 /* CTF type only visible in nested scope. @endverbatim */
The compiler demarcates whether types are visible at top-level scope or not.
The only example so far of a type not visible at top-level scope is slices.
CTF_ADD_NONROOT is used to indicate the latter.   

Referenced by ctf_add_enum(), ctf_add_generic(), ctf_add_sou(), and gen_ctf_sou_type().

◆ CTF_ADD_ROOT

◆ CTF_AUX_STRTAB

#define CTF_AUX_STRTAB   1 /* CTF auxilliary string table. @endverbatim */

◆ ctf_dmd_list_next

◆ ctf_farg_list_next

#define ctf_farg_list_next ( elem)    ((ctf_func_arg_t *)((elem)->farg_next))

◆ CTF_FUNC_VARARG

#define CTF_FUNC_VARARG   0x1
Function arguments end with varargs.   

Referenced by gen_ctf_function_type().

◆ CTF_INIT_TYPEID

#define CTF_INIT_TYPEID   1
Value to start generating the CTF type ID from.   

Referenced by ctfc_is_empty_container(), and init_ctf_container().

◆ CTF_NULL_TYPEID

#define CTF_NULL_TYPEID   0
ctfc.h - Declarations and definitions related to the CTF container.
   Copyright (C) 2019-2024 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.   
This file defines the data structures and functions used by the compiler
to generate the CTF debug info.  The definitions below are compiler internal
representations and closely reflect the CTF format requirements in <ctf.h>.

The contents of the CTF container are used eventually for emission of both
CTF (ctfout.cc) and BTF debug info (btfout.cc), as the two type debug formats
are close cousins.   
Invalid CTF type ID definition.   

Referenced by btf_init_postprocess(), ctf_add_enumerator(), ctf_do_die(), ctf_lookup_tree_type(), gen_ctf_array_type(), gen_ctf_base_type(), gen_ctf_modifier_type(), gen_ctf_pointer_type(), gen_ctf_subrange_type(), gen_ctf_type(), output_asm_ctf_sou_fields(), output_asm_ctf_type(), output_asm_ctf_vlen_bytes(), and output_ctf_vars().

◆ CTF_STRTAB

#define CTF_STRTAB   0 /* CTF string table. @endverbatim */
Markers for which string table from the CTF container to use.   

Referenced by ctf_output(), output_asm_btf_func_args_list(), and output_btf_datasec_types().

◆ ctti_size

#define ctti_size   _u._size

◆ ctti_type

#define ctti_type   _u._type

Typedef Documentation

◆ ctf_arinfo_t

Array information for CTF generation.   

◆ ctf_container_ref

◆ ctf_container_t

CTF container structure.
It is the context passed around when generating ctf debug info.  There is
one container per translation unit.   

◆ ctf_dmdef_t

Struct/union/enum member definition for CTF generation.   

◆ ctf_dtdef_ref

◆ ctf_dtdef_t

◆ ctf_dvdef_ref

◆ ctf_dvdef_t

◆ ctf_encoding_t

Encoding information for integers, floating-point values etc.  The flags
field will contain values appropriate for the type defined in <ctf.h>.   

◆ ctf_func_arg_t

◆ ctf_funcinfo_t

Function information for CTF generation.   

◆ ctf_id_t

CTF type ID.   

◆ ctf_itype_t

CTF type representation internal to the compiler.  It closely reflects the
ctf_type_t type node in <ctf.h> except the tags.   

◆ ctf_sliceinfo_t

◆ ctf_srcloc_ref

◆ ctf_srcloc_t

Location information for CTF Types and CTF Variables.   

◆ ctf_string_t

CTF string table element (list node).   

◆ ctf_strtable_t

Internal representation of CTF string table.   

◆ funcs_traverse_callback

typedef bool(* funcs_traverse_callback) (ctf_dtdef_ref, void *)

Enumeration Type Documentation

◆ ctf_dtu_d_union_enum

Helper enum and api for the GTY machinery to work on union dtu_d.   
Enumerator
CTF_DTU_D_MEMBERS 
CTF_DTU_D_ARRAY 
CTF_DTU_D_ENCODING 
CTF_DTU_D_ARGUMENTS 
CTF_DTU_D_SLICE 

Function Documentation

◆ btf_finalize()

void btf_finalize ( void )
extern
Reset all state for BTF generation so that we can rerun the compiler within
the same process.   

References btf_id_map, btf_info_section, btf_var_ids, ctf_get_tu_ctfc(), ctfc_delete_container(), datasecs, free(), funcs, holes, i, NULL, num_types_added, num_types_created, num_vars_added, tu_ctfc, and voids.

Referenced by ctf_debug_finalize().

◆ btf_init_postprocess()

void btf_init_postprocess ( void )
extern
Postprocess the CTF debug data post initialization.

During the postprocess pass:

- Prepare the sorted list of BTF types.

  The sorted list of BTF types is, firstly, used for lookup (during the BTF
  generation process) of CTF/BTF types given a typeID.

  Secondly, in the emitted BTF section, BTF Types need to be in the sorted
  order of their type IDs.  The BTF types section is viewed as an array,
  with type IDs used to index into that array.  It is essential that every
  type be placed at the exact index corresponding to its ID, or else
  references to that type from other types will no longer be correct.

- References to void types are converted to reference BTF_VOID_TYPEID. In
  CTF, a distinct type is used to encode void.

- Bitfield struct/union members are converted to BTF encoding. CTF uses
  slices to encode bitfields, but BTF does not have slices and encodes
  bitfield information directly in the variable-length btf_member
  descriptions following the struct or union type.

- Unrepresentable types are removed. We cannot have any invalid BTF types
  appearing in the output so they must be removed, and type ids of other
  types and references adjust accordingly. This also involves ensuring that
  BTF descriptions of struct members referring to unrepresentable types are
  not emitted, as they would be nonsensical.

- Adjust inner- and inter-type references-by-ID to account for removed
  types, and construct the types list.   

References btf_adjust_type_id(), btf_dtd_postprocess_cb(), BTF_VOID_TYPEID, ctf_add_reftype(), CTF_ADD_ROOT, ctf_dvd_lookup(), ctf_get_tu_ctfc(), CTF_NULL_TYPEID, ctf_container::ctfc_types, ctf_container::ctfc_types_list, symtab_node::decl, hash_table< Descriptor, Lazy, Allocator >::elements(), FOR_EACH_VARIABLE, ggc_alloc(), holes, i, init_btf_id_map(), lookup_decl_die(), NULL, num_types_added, num_types_created, set_btf_id(), hash_table< Descriptor, Lazy, Allocator >::traverse(), TREE_TYPE, tu_ctfc, TYPE_READONLY, VOID_TYPE_P, and voids.

Referenced by ctf_debug_init_postprocess().

◆ btf_output()

◆ ctf_add_array()

ctf_id_t ctf_add_array ( ctf_container_ref ctfc,
uint32_t flag,
const ctf_arinfo_t * arp,
dw_die_ref die )
extern

◆ ctf_add_cuname()

void ctf_add_cuname ( ctf_container_ref ctfc,
const char * filename )
extern
Add the compilation unit (CU) name string to the CTF string table.  The
CU name has a prepended pwd string if it is a relative path.  Also set the
CU name offset in the CTF container.   

References CONST_CAST, ctf_add_string(), DIR_SEPARATOR, get_src_pwd(), ggc_alloc(), ggc_alloc_atomic(), ggc_strdup, and NULL.

Referenced by btf_output(), and ctf_output().

◆ ctf_add_enum()

ctf_id_t ctf_add_enum ( ctf_container_ref ctfc,
uint32_t flag,
const char * name,
HOST_WIDE_INT size,
bool eunsigned,
dw_die_ref die )
extern

◆ ctf_add_enumerator()

◆ ctf_add_float()

ctf_id_t ctf_add_float ( ctf_container_ref ctfc,
uint32_t flag,
const char * name,
const ctf_encoding_t * ep,
dw_die_ref die )
extern

References ctf_add_encoded(), and ggc_alloc().

Referenced by gen_ctf_base_type().

◆ ctf_add_forward()

ctf_id_t ctf_add_forward ( ctf_container_ref ctfc,
uint32_t flag,
const char * name,
uint32_t kind,
dw_die_ref die )
extern

◆ ctf_add_function()

ctf_id_t ctf_add_function ( ctf_container_ref ctfc,
uint32_t flag,
const char * name,
const ctf_funcinfo_t * ctc,
dw_die_ref die,
bool from_global_func,
int linkage )
extern

◆ ctf_add_function_arg()

int ctf_add_function_arg ( ctf_container_ref ctfc,
dw_die_ref func,
const char * name,
ctf_id_t type )
extern

◆ ctf_add_integer()

ctf_id_t ctf_add_integer ( ctf_container_ref ctfc,
uint32_t flag,
const char * name,
const ctf_encoding_t * ep,
dw_die_ref die )
extern

◆ ctf_add_member_offset()

int ctf_add_member_offset ( ctf_container_ref ctfc,
dw_die_ref sou,
const char * name,
ctf_id_t type,
uint64_t bit_offset )
extern

◆ ctf_add_pointer()

ctf_id_t ctf_add_pointer ( ctf_container_ref ctfc,
uint32_t flag,
ctf_id_t ref,
dw_die_ref die )
extern

References ctf_add_reftype(), and ggc_alloc().

Referenced by gen_ctf_pointer_type().

◆ ctf_add_reftype()

◆ ctf_add_slice()

ctf_id_t ctf_add_slice ( ctf_container_ref ctfc,
uint32_t flag,
ctf_id_t ref,
uint32_t bit_offset,
uint32_t bit_size,
dw_die_ref die )
extern

◆ ctf_add_sou()

ctf_id_t ctf_add_sou ( ctf_container_ref ctfc,
uint32_t flag,
const char * name,
uint32_t kind,
size_t size,
dw_die_ref die )
extern

◆ ctf_add_string()

const char * ctf_add_string ( ctf_container_ref ctfc,
const char * name,
uint32_t * name_offset,
int aux_str = CTF_STRTAB )
extern

◆ ctf_add_typedef()

ctf_id_t ctf_add_typedef ( ctf_container_ref ctfc,
uint32_t flag,
const char * name,
ctf_id_t ref,
dw_die_ref die )
extern

◆ ctf_add_unknown()

ctf_id_t ctf_add_unknown ( ctf_container_ref ctfc,
uint32_t flag,
const char * name,
const ctf_encoding_t * ep,
dw_die_ref die )
extern

References ctf_add_encoded(), and ggc_alloc().

Referenced by gen_ctf_unknown_type().

◆ ctf_add_variable()

int ctf_add_variable ( ctf_container_ref ctfc,
const char * name,
ctf_id_t ref,
dw_die_ref die,
unsigned int external_vis,
dw_die_ref die_var_decl )
extern

◆ ctf_dtd_lookup()

◆ ctf_dtu_d_union_selector()

enum ctf_dtu_d_union_enum ctf_dtu_d_union_selector ( ctf_dtdef_ref ctftype)
Return which member of the union is used in CTFTYPE.  Used for garbage
collection.   

References CTF_DTU_D_ARGUMENTS, CTF_DTU_D_ARRAY, CTF_DTU_D_ENCODING, CTF_DTU_D_MEMBERS, CTF_DTU_D_SLICE, and ggc_alloc().

◆ ctf_dvd_ignore_lookup()

bool ctf_dvd_ignore_lookup ( const ctf_container_ref ctfc,
dw_die_ref die )
extern
Lookup the dummy CTF variable given the DWARF die for the non-defining
decl to be ignored.   

References ctf_dvdef::dvd_key, and ggc_alloc().

Referenced by btf_dvd_emit_preprocess_cb(), ctf_dvd_preprocess_cb(), and gen_ctf_variable().

◆ ctf_dvd_lookup()

ctf_dvdef_ref ctf_dvd_lookup ( const ctf_container_ref ctfc,
dw_die_ref die )
extern
Lookup CTF variable given a DWARF die for the decl.   

References ctf_dvdef::dvd_key, ggc_alloc(), and NULL.

Referenced by btf_collect_datasec(), btf_init_postprocess(), and gen_ctf_variable().

◆ ctf_finalize()

void ctf_finalize ( void )
extern
Reset all state for CTF generation so that we can rerun the compiler within
the same process.   

References ctf_get_tu_ctfc(), ctf_info_section, ctfc_delete_container(), NULL, and tu_ctfc.

Referenced by ctf_debug_finalize().

◆ ctf_get_tu_ctfc()

◆ ctf_init()

void ctf_init ( void )
extern
These APIs allow to initialize and finalize the CTF machinery and
to add types to the CTF container associated to the current
translation unit.  Used in dwarf2ctf.cc.   
CTF routines interfacing to the compiler.   

References init_ctf_container().

Referenced by ctf_debug_init().

◆ ctf_lookup_tree_type()

ctf_id_t ctf_lookup_tree_type ( ctf_container_ref ctfc,
const tree type )
extern
Given a TREE_TYPE node, return the CTF type ID for that type.   

References ctf_dtd_lookup(), CTF_NULL_TYPEID, ggc_alloc(), lookup_type_die(), and NULL.

◆ ctf_output()

◆ ctf_type_exists()

bool ctf_type_exists ( ctf_container_ref ctfc,
dw_die_ref type,
ctf_id_t * type_id )
extern
Check if CTF for TYPE has already been generated.  Mainstay for
de-duplication.  If CTF type already exists, returns TRUE and updates
the TYPE_ID for the caller.   

References ctf_dtd_lookup(), ggc_alloc(), and type_id.

Referenced by gen_ctf_array_type(), gen_ctf_function(), gen_ctf_function_type(), gen_ctf_modifier_type(), gen_ctf_pointer_type(), gen_ctf_sou_type(), gen_ctf_subrange_type(), gen_ctf_type(), gen_ctf_typedef(), and gen_ctf_unknown_type().

◆ ctfc_delete_container()

void ctfc_delete_container ( ctf_container_ref ctfc)
extern
Delete the CTF container's resources.   

References ctfc_delete_strtab(), ggc_alloc(), ggc_free(), and NULL.

Referenced by btf_finalize(), and ctf_finalize().

◆ ctfc_get_dtd_srcloc()

int ctfc_get_dtd_srcloc ( ctf_dtdef_ref dtd,
ctf_srcloc_ref loc )
extern
CTF section does not emit location information; at this time, location
information is needed for BTF CO-RE use-cases.   
Location information for CTF Types and CTF Variables.  CTF section does not
emit location information; at this time, location information is needed for
BTF CO-RE use-cases.   

References ctf_get_die_loc_col(), ctf_get_die_loc_file(), ctf_get_die_loc_line(), ctf_srcloc::ctsloc_col, ctf_srcloc::ctsloc_file, ctf_srcloc::ctsloc_line, ggc_alloc(), and NULL.

◆ ctfc_get_dvd_srcloc()

◆ ctfc_get_num_ctf_types()

unsigned int ctfc_get_num_ctf_types ( ctf_container_ref ctfc)
extern
Get the total number of CTF types in the container.   

References ggc_alloc().

Referenced by output_ctf_header().

◆ ctfc_get_num_ctf_vars()

unsigned int ctfc_get_num_ctf_vars ( ctf_container_ref ctfc)
extern
Get the total number of CTF variables in the container.   

References ggc_alloc().

Referenced by ctf_preprocess().

◆ ctfc_get_num_vlen_bytes()

size_t ctfc_get_num_vlen_bytes ( ctf_container_ref ctfc)
extern
Get the number of bytes to represent the variable length portion of all CTF
types in the CTF container.   

References ggc_alloc().

Referenced by output_ctf_header().

◆ ctfc_get_strtab()

ctf_strtable_t * ctfc_get_strtab ( ctf_container_ref ctfc,
int aux )
extern
Get reference to the CTF string table or the CTF auxilliary
string table.   

References ggc_alloc().

Referenced by ctf_add_string(), and ctfc_get_strtab_len().

◆ ctfc_get_strtab_len()

size_t ctfc_get_strtab_len ( ctf_container_ref ctfc,
int aux )
extern
Get the length of the specified string table in the CTF container.   
Get the length of the specified string table of the CTF container.   

References ctfc_get_strtab(), and ggc_alloc().

Referenced by ctf_output(), output_asm_btf_func_args_list(), and output_btf_datasec_types().

◆ ctfc_is_empty_container()

bool ctfc_is_empty_container ( ctf_container_ref ctfc)
extern
If the next ctf type id is still set to the init value, no ctf records to
report.   

References CTF_INIT_TYPEID, and ggc_alloc().

Referenced by output_btf_header(), and output_ctf_header().

◆ get_btf_id()

ctf_id_t get_btf_id ( ctf_id_t key)
extern
Return the BTF type ID of CTF type ID KEY, or BTF_INVALID_TYPEID if the CTF
type with ID KEY does not map to a BTF type.   

References btf_id_map.

Referenced by btf_asm_type(), and btf_asm_type_ref().

◆ traverse_btf_func_types()

bool traverse_btf_func_types ( funcs_traverse_callback callback,
void * data )
Traversal function for all BTF_KIND_FUNC type records.   

References FOR_EACH_VEC_ELT, funcs, and i.

Variable Documentation

◆ tu_ctfc

ctf_container_ref tu_ctfc
extern
Generate CTF.
   Copyright (C) 2019-2024 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.   
A CTF container object - one per translation unit.   

Referenced by btf_finalize(), btf_init_postprocess(), btf_output(), ctf_do_die(), ctf_finalize(), ctf_get_tu_ctfc(), ctf_output(), init_ctf_container(), and new_ctf_container().