GCC Middle and Back End API Reference
dwarf2out.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "target.h"
#include "function.h"
#include "rtl.h"
#include "tree.h"
#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "insn-config.h"
#include "ira.h"
#include "cgraph.h"
#include "diagnostic.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "varasm.h"
#include "version.h"
#include "flags.h"
#include "rtlhash.h"
#include "reload.h"
#include "output.h"
#include "expr.h"
#include "dwarf2out.h"
#include "dwarf2ctf.h"
#include "dwarf2codeview.h"
#include "dwarf2asm.h"
#include "toplev.h"
#include "md5.h"
#include "tree-pretty-print.h"
#include "print-rtl.h"
#include "debug.h"
#include "common/common-target.h"
#include "langhooks.h"
#include "lra.h"
#include "dumpfile.h"
#include "opts.h"
#include "tree-dfa.h"
#include "gdb/gdb-index.h"
#include "rtl-iter.h"
#include "attribs.h"
#include "file-prefix-map.h"
#include "gt-dwarf2out.h"
Include dependency graph for dwarf2out.cc:

Data Structures

struct  indirect_string_node
 
struct  indirect_string_hasher
 
struct  addr_table_entry
 
union  addr_table_entry::addr_table_entry_struct_union
 
struct  dw_loc_list_struct
 
struct  dw_line_info_struct
 
struct  dw_line_info_table
 
struct  die_struct
 
union  die_struct::die_symbol_or_type_node
 
class  set_early_dwarf
 
struct  pubname_struct
 
struct  dw_ranges
 
struct  macinfo_struct
 
struct  dw_ranges_by_label
 
struct  comdat_type_node
 
struct  limbo_die_struct
 
struct  skeleton_chain_struct
 
struct  dwarf_file_hasher
 
struct  decl_die_hasher
 
struct  variable_value_struct
 
struct  variable_value_hasher
 
struct  block_die_hasher
 
struct  die_arg_entry_struct
 
struct  var_loc_node
 
struct  var_loc_list_def
 
struct  call_arg_loc_node
 
struct  decl_loc_hasher
 
struct  cached_dw_loc_list_def
 
struct  dw_loc_list_hasher
 
struct  addr_hasher
 
struct  sym_off_pair
 
struct  checksum_attributes
 
struct  decl_table_entry
 
struct  decl_table_entry_hasher
 
struct  external_ref
 
struct  external_ref_hasher
 
struct  file_info
 
struct  dir_info
 
struct  file_name_acquire_data
 
struct  dwarf_qual_info_t
 
struct  loc_descr_context
 
struct  dwarf_procedure_info
 
struct  vlr_context
 
struct  inline_entry_data
 
struct  inline_entry_data_hasher
 
struct  macinfo_entry_hasher
 
struct  comdat_type_hasher
 
struct  loc_list_hasher
 

Macros

#define XCOFF_DEBUGGING_INFO   0
 
#define HAVE_XCOFF_DWARF_EXTRAS   0
 
#define DWARF2_DIR_SHOULD_END_WITH_SEPARATOR   0
 
#define DWARF2_INDIRECT_STRING_SUPPORT_MISSING_ON_TARGET   0
 
#define PTR_SIZE   (POINTER_SIZE / BITS_PER_UNIT)
 
#define MAX_ARTIFICIAL_LABEL_BYTES   40
 
#define DWARF_INITIAL_LENGTH_SIZE   (dwarf_offset_size == 4 ? 4 : 12)
 
#define DWARF_INITIAL_LENGTH_SIZE_STR   (dwarf_offset_size == 4 ? "-4" : "-12")
 
#define DWARF_ROUND(SIZE, BOUNDARY)    ((((SIZE) + (BOUNDARY) - 1) / (BOUNDARY)) * (BOUNDARY))
 
#define DWARF_CIE_ID    (unsigned HOST_WIDE_INT) (dwarf_offset_size == 4 ? DW_CIE_ID : DW64_CIE_ID)
 
#define NOT_INDEXED   (-1U)
 
#define NO_INDEX_ASSIGNED   (-2U)
 
#define DW_FORM_data   (dwarf_offset_size == 8 ? DW_FORM_data8 : DW_FORM_data4)
 
#define DW_FORM_ref   (dwarf_offset_size == 8 ? DW_FORM_ref8 : DW_FORM_ref4)
 
#define DEBUG_FRAME_SECTION   ".debug_frame"
 
#define FUNC_BEGIN_LABEL   "LFB"
 
#define FUNC_SECOND_SECT_LABEL   "LFSB"
 
#define FUNC_END_LABEL   "LFE"
 
#define PROLOGUE_END_LABEL   "LPE"
 
#define EPILOGUE_BEGIN_LABEL   "LEB"
 
#define FRAME_BEGIN_LABEL   "Lframe"
 
#define CIE_AFTER_SIZE_LABEL   "LSCIE"
 
#define CIE_END_LABEL   "LECIE"
 
#define FDE_LABEL   "LSFDE"
 
#define FDE_AFTER_SIZE_LABEL   "LASFDE"
 
#define FDE_END_LABEL   "LEFDE"
 
#define LINE_NUMBER_BEGIN_LABEL   "LSLT"
 
#define LINE_NUMBER_END_LABEL   "LELT"
 
#define LN_PROLOG_AS_LABEL   "LASLTP"
 
#define LN_PROLOG_END_LABEL   "LELTP"
 
#define DIE_LABEL_PREFIX   "DW"
 
#define DUMP_GSTRUCT(type, usage, criterion, generic, matches, result)    (result)
 
#define DWARF_REF_SIZE    (dwarf_version == 2 ? DWARF2_ADDR_SIZE : dwarf_offset_size)
 
#define DWARF_LARGEST_DATA_FORM_BITS    (dwarf_version >= 5 ? 128 : 64)
 
#define use_debug_types
 
#define FORCE_RESET_NEXT_VIEW(x)   ((x) = (var_loc_view)-1)
 
#define RESET_NEXT_VIEW(x)   ((x) = (var_loc_view)0)
 
#define FORCE_RESETTING_VIEW_P(x)   ((x) == (var_loc_view)-1)
 
#define RESETTING_VIEW_P(x)   ((x) == (var_loc_view)0 || FORCE_RESETTING_VIEW_P (x))
 
#define FOR_EACH_CHILD(die, c, expr)
 
#define DW_RANGES_IDX_SKELETON   ((1U << 31) - 1)
 
#define TYPE_DECL_IS_STUB(decl)
 
#define DWARF_COMPILE_UNIT_HEADER_SIZE
 
#define DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE
 
#define DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE    (DWARF_COMPILE_UNIT_HEADER_SIZE + (dwarf_version >= 5 ? 8 : 0))
 
#define DWARF_PUBNAMES_HEADER_SIZE   (2 * dwarf_offset_size + 2)
 
#define DWARF_ARANGES_HEADER_SIZE
 
#define DWARF_ARANGES_PAD_SIZE
 
#define DWARF2_ASM_LINE_DEBUG_INFO   0
 
#define DWARF2_ASM_VIEW_DEBUG_INFO   0
 
#define ZERO_VIEW_P(N)
 
#define DWARF_LINE_BASE   -10
 
#define DWARF_LINE_OPCODE_BASE   ((int)DW_LNS_set_isa + 1)
 
#define DWARF_LINE_RANGE   (254-DWARF_LINE_OPCODE_BASE+1)
 
#define DWARF_LINE_DEFAULT_IS_STMT_START   1
 
#define DWARF_LINE_DEFAULT_MAX_OPS_PER_INSN   1
 
#define have_macinfo
 
#define DEBUG_INFO_SECTION   ".debug_info"
 
#define DEBUG_DWO_INFO_SECTION   ".debug_info.dwo"
 
#define DEBUG_LTO_INFO_SECTION   ".gnu.debuglto_.debug_info"
 
#define DEBUG_LTO_DWO_INFO_SECTION   ".gnu.debuglto_.debug_info.dwo"
 
#define DEBUG_ABBREV_SECTION   ".debug_abbrev"
 
#define DEBUG_LTO_ABBREV_SECTION   ".gnu.debuglto_.debug_abbrev"
 
#define DEBUG_DWO_ABBREV_SECTION   ".debug_abbrev.dwo"
 
#define DEBUG_LTO_DWO_ABBREV_SECTION   ".gnu.debuglto_.debug_abbrev.dwo"
 
#define DEBUG_ARANGES_SECTION   ".debug_aranges"
 
#define DEBUG_ADDR_SECTION   ".debug_addr"
 
#define DEBUG_MACINFO_SECTION   ".debug_macinfo"
 
#define DEBUG_LTO_MACINFO_SECTION   ".gnu.debuglto_.debug_macinfo"
 
#define DEBUG_DWO_MACINFO_SECTION   ".debug_macinfo.dwo"
 
#define DEBUG_LTO_DWO_MACINFO_SECTION   ".gnu.debuglto_.debug_macinfo.dwo"
 
#define DEBUG_MACRO_SECTION   ".debug_macro"
 
#define DEBUG_LTO_MACRO_SECTION   ".gnu.debuglto_.debug_macro"
 
#define DEBUG_DWO_MACRO_SECTION   ".debug_macro.dwo"
 
#define DEBUG_LTO_DWO_MACRO_SECTION   ".gnu.debuglto_.debug_macro.dwo"
 
#define DEBUG_LINE_SECTION   ".debug_line"
 
#define DEBUG_LTO_LINE_SECTION   ".gnu.debuglto_.debug_line"
 
#define DEBUG_DWO_LINE_SECTION   ".debug_line.dwo"
 
#define DEBUG_LTO_DWO_LINE_SECTION   ".gnu.debuglto_.debug_line.dwo"
 
#define DEBUG_LOC_SECTION   ".debug_loc"
 
#define DEBUG_DWO_LOC_SECTION   ".debug_loc.dwo"
 
#define DEBUG_LOCLISTS_SECTION   ".debug_loclists"
 
#define DEBUG_DWO_LOCLISTS_SECTION   ".debug_loclists.dwo"
 
#define DEBUG_PUBNAMES_SECTION
 
#define DEBUG_PUBTYPES_SECTION
 
#define DEBUG_STR_OFFSETS_SECTION   ".debug_str_offsets"
 
#define DEBUG_DWO_STR_OFFSETS_SECTION   ".debug_str_offsets.dwo"
 
#define DEBUG_LTO_DWO_STR_OFFSETS_SECTION   ".gnu.debuglto_.debug_str_offsets.dwo"
 
#define DEBUG_STR_SECTION   ".debug_str"
 
#define DEBUG_LTO_STR_SECTION   ".gnu.debuglto_.debug_str"
 
#define DEBUG_STR_DWO_SECTION   ".debug_str.dwo"
 
#define DEBUG_LTO_STR_DWO_SECTION   ".gnu.debuglto_.debug_str.dwo"
 
#define DEBUG_RANGES_SECTION   ".debug_ranges"
 
#define DEBUG_RNGLISTS_SECTION   ".debug_rnglists"
 
#define DEBUG_DWO_RNGLISTS_SECTION   ".debug_rnglists.dwo"
 
#define DEBUG_LINE_STR_SECTION   ".debug_line_str"
 
#define DEBUG_LTO_LINE_STR_SECTION   ".gnu.debuglto_.debug_line_str"
 
#define DEBUG_STR_SECTION_FLAGS
 
#define DEBUG_STR_DWO_SECTION_FLAGS   (SECTION_DEBUG | SECTION_EXCLUDE)
 
#define DEBUG_MACRO_ATTRIBUTE
 
#define TEXT_SECTION_LABEL   "Ltext"
 
#define COLD_TEXT_SECTION_LABEL   "Ltext_cold"
 
#define DEBUG_LINE_SECTION_LABEL   "Ldebug_line"
 
#define DEBUG_SKELETON_LINE_SECTION_LABEL   "Lskeleton_debug_line"
 
#define DEBUG_INFO_SECTION_LABEL   "Ldebug_info"
 
#define DEBUG_SKELETON_INFO_SECTION_LABEL   "Lskeleton_debug_info"
 
#define DEBUG_ABBREV_SECTION_LABEL   "Ldebug_abbrev"
 
#define DEBUG_SKELETON_ABBREV_SECTION_LABEL   "Lskeleton_debug_abbrev"
 
#define DEBUG_ADDR_SECTION_LABEL   "Ldebug_addr"
 
#define DEBUG_LOC_SECTION_LABEL   "Ldebug_loc"
 
#define DEBUG_RANGES_SECTION_LABEL   "Ldebug_ranges"
 
#define DEBUG_MACINFO_SECTION_LABEL   "Ldebug_macinfo"
 
#define DEBUG_MACRO_SECTION_LABEL   "Ldebug_macro"
 
#define SKELETON_COMP_DIE_ABBREV   1
 
#define SKELETON_TYPE_DIE_ABBREV   2
 
#define TEXT_END_LABEL   "Letext"
 
#define COLD_END_LABEL   "Letext_cold"
 
#define BLOCK_BEGIN_LABEL   "LBB"
 
#define BLOCK_INLINE_ENTRY_LABEL   "LBI"
 
#define BLOCK_END_LABEL   "LBE"
 
#define LINE_CODE_LABEL   "LM"
 
#define UNRELOCATED_OFFSET   ((addr_table_entry *) 1)
 
#define RELOCATED_OFFSET   (NULL)
 
#define CHECKSUM(FOO)   md5_process_bytes (&(FOO), sizeof (FOO), ctx)
 
#define CHECKSUM_BLOCK(FOO, SIZE)   md5_process_bytes ((FOO), (SIZE), ctx)
 
#define CHECKSUM_STRING(FOO)   md5_process_bytes ((FOO), strlen (FOO), ctx)
 
#define CHECKSUM(FOO)   md5_process_bytes (&(FOO), sizeof (FOO), ctx)
 
#define CHECKSUM_BLOCK(FOO, SIZE)   md5_process_bytes ((FOO), (SIZE), ctx)
 
#define CHECKSUM_STRING(FOO)   md5_process_bytes ((FOO), strlen (FOO) + 1, ctx)
 
#define CHECKSUM_SLEB128(FOO)   checksum_sleb128 ((FOO), ctx)
 
#define CHECKSUM_ULEB128(FOO)   checksum_uleb128 ((FOO), ctx)
 
#define CHECKSUM_ATTR(FOO)    if (FOO) attr_checksum_ordered (die->die_tag, (FOO), ctx, mark)
 
#define DWARF5_USE_DEBUG_LINE_STR
 

Typedefs

typedef unsigned int var_loc_view
 
typedef struct dw_loc_list_struct dw_loc_list_node
 
typedef long int dw_offset
 
typedef struct dw_line_info_struct dw_line_info_entry
 
typedef struct die_struct die_node
 
typedef struct pubname_struct pubname_entry
 
typedef struct macinfo_struct macinfo_entry
 
typedef struct limbo_die_struct limbo_die_node
 
typedef struct skeleton_chain_struct skeleton_chain_node
 
typedef struct die_arg_entry_struct die_arg_entry
 
typedef struct var_loc_list_def var_loc_list
 
typedef struct cached_dw_loc_list_def cached_dw_loc_list
 
typedef hash_table< decl_table_entry_hasherdecl_hash_type
 
typedef hash_table< external_ref_hasherexternal_ref_hash_type
 
typedef hash_table< macinfo_entry_hashermacinfo_hash_type
 
typedef hash_table< loc_list_hasherloc_list_hash_type
 

Enumerations

enum  ate_kind { ate_kind_rtx , ate_kind_rtx_dtprel , ate_kind_label }
 
enum  dw_line_info_opcode {
  LI_set_address , LI_set_line , LI_set_file , LI_set_column ,
  LI_negate_stmt , LI_set_prologue_end , LI_set_epilogue_begin , LI_set_discriminator ,
  LI_adv_address
}
 
enum  dw_scalar_form { dw_scalar_form_constant = 0x01 , dw_scalar_form_exprloc = 0x02 , dw_scalar_form_reference = 0x04 }
 
enum  dtprel_bool { dtprel_false = 0 , dtprel_true = 1 }
 

Functions

static void dwarf2out_source_line (unsigned int, unsigned int, const char *, int, bool)
 
static void dwarf2out_decl (tree)
 
static bool is_redundant_typedef (const_tree)
 
static void output_call_frame_info (int)
 
static bool matches_main_base (const char *path)
 
static unsigned int get_full_len (const dw_wide_int &op)
 
static bool should_emit_struct_debug (tree type, enum debug_info_usage usage)
 
static void switch_to_eh_frame_section (bool back)
 
static void switch_to_frame_table_section (int for_eh, bool back)
 
enum dw_cfi_oprnd_type dw_cfi_oprnd1_desc (enum dwarf_call_frame_info cfi)
 
enum dw_cfi_oprnd_type dw_cfi_oprnd2_desc (enum dwarf_call_frame_info cfi)
 
static void output_fde (dw_fde_ref fde, bool for_eh, bool second, char *section_start_label, int fde_encoding, char *augmentation, bool any_lsda_needed, int lsda_encoding)
 
static bool fde_needed_for_eh_p (dw_fde_ref fde)
 
static void dwarf2out_do_cfi_startproc (bool second)
 
dw_fde_ref dwarf2out_alloc_current_fde (void)
 
void dwarf2out_begin_prologue (unsigned int line, unsigned int column, const char *file)
 
void dwarf2out_vms_end_prologue (unsigned int line, const char *file)
 
void dwarf2out_vms_begin_epilogue (unsigned int line, const char *file)
 
static void mark_ignored_debug_section (dw_fde_ref fde, bool second)
 
void dwarf2out_end_epilogue (unsigned int line, const char *file)
 
void dwarf2out_frame_finish (void)
 
static void var_location_switch_text_section (void)
 
static void set_cur_line_info_table (section *)
 
void dwarf2out_switch_text_section (void)
 
static dw_loc_descr_ref int_loc_descriptor (poly_int64)
 
static dw_loc_descr_ref uint_loc_descriptor (unsigned HOST_WIDE_INT)
 
static const chardwarf_stack_op_name (unsigned int op)
 
static bool dwarf2out_locviews_in_attribute ()
 
static bool dwarf2out_locviews_in_loclist ()
 
static dw_loc_descr_ref new_loc_descr (enum dwarf_location_atom op, unsigned HOST_WIDE_INT oprnd1, unsigned HOST_WIDE_INT oprnd2)
 
static void add_loc_descr (dw_loc_descr_ref *list_head, dw_loc_descr_ref descr)
 
static bool dw_val_equal_p (dw_val_node *a, dw_val_node *b)
 
static bool loc_descr_equal_p_1 (dw_loc_descr_ref a, dw_loc_descr_ref b)
 
bool loc_descr_equal_p (dw_loc_descr_ref a, dw_loc_descr_ref b)
 
static void loc_descr_plus_const (dw_loc_descr_ref *list_head, poly_int64 poly_offset)
 
static dw_loc_descr_ref new_reg_loc_descr (unsigned int reg, poly_int64 offset)
 
static void loc_list_plus_const (dw_loc_list_ref list_head, poly_int64 offset)
 
static enum dwarf_location_atom dwarf_OP (enum dwarf_location_atom op)
 
static enum dwarf_attribute dwarf_AT (enum dwarf_attribute at)
 
static enum dwarf_tag dwarf_TAG (enum dwarf_tag tag)
 
static enum dwarf_form dwarf_FORM (enum dwarf_form form)
 
static unsigned long int get_base_type_offset (dw_die_ref)
 
static unsigned long size_of_loc_descr (dw_loc_descr_ref loc)
 
unsigned long size_of_locs (dw_loc_descr_ref loc)
 
static int size_of_discr_value (dw_discr_value *discr_value)
 
static int size_of_discr_list (dw_discr_list_ref discr_list)
 
static HOST_WIDE_INT extract_int (const unsigned char *, unsigned)
 
static void get_ref_die_offset_label (char *, dw_die_ref)
 
static unsigned long int get_ref_die_offset (dw_die_ref)
 
static void output_loc_operands (dw_loc_descr_ref loc, int for_eh_or_skip)
 
void output_loc_sequence (dw_loc_descr_ref loc, int for_eh_or_skip)
 
static void output_loc_operands_raw (dw_loc_descr_ref loc)
 
void output_loc_sequence_raw (dw_loc_descr_ref loc)
 
static void build_breg_loc (struct dw_loc_descr_node **head, unsigned int regno)
 
struct dw_loc_descr_nodebuild_span_loc (struct cfa_reg reg)
 
struct dw_loc_descr_nodebuild_cfa_loc (dw_cfa_location *cfa, poly_int64 offset)
 
struct dw_loc_descr_nodebuild_cfa_aligned_loc (dw_cfa_location *cfa, poly_int64 offset, HOST_WIDE_INT alignment)
 
static void dwarf2out_init (const char *)
 
static void dwarf2out_finish (const char *)
 
static void dwarf2out_early_finish (const char *)
 
static void dwarf2out_assembly_start (void)
 
static void dwarf2out_define (unsigned int, const char *)
 
static void dwarf2out_undef (unsigned int, const char *)
 
static void dwarf2out_start_source_file (unsigned, const char *)
 
static void dwarf2out_end_source_file (unsigned)
 
static void dwarf2out_function_decl (tree)
 
static void dwarf2out_begin_block (unsigned, unsigned)
 
static void dwarf2out_end_block (unsigned, unsigned)
 
static bool dwarf2out_ignore_block (const_tree)
 
static void dwarf2out_set_ignored_loc (unsigned, unsigned, const char *)
 
static void dwarf2out_early_global_decl (tree)
 
static void dwarf2out_late_global_decl (tree)
 
static void dwarf2out_type_decl (tree, int)
 
static void dwarf2out_imported_module_or_decl (tree, tree, tree, bool, bool)
 
static void dwarf2out_imported_module_or_decl_1 (tree, tree, tree, dw_die_ref)
 
static void dwarf2out_abstract_function (tree)
 
static void dwarf2out_var_location (rtx_insn *)
 
static void dwarf2out_inline_entry (tree)
 
static void dwarf2out_size_function (tree)
 
static void dwarf2out_begin_function (tree)
 
static void dwarf2out_end_function (unsigned int)
 
static void dwarf2out_register_main_translation_unit (tree unit)
 
static void dwarf2out_set_name (tree, tree)
 
static void dwarf2out_register_external_die (tree decl, const char *sym, unsigned HOST_WIDE_INT off)
 
static bool dwarf2out_die_ref_for_decl (tree decl, const char **sym, unsigned HOST_WIDE_INT *off)
 
static void maybe_reset_location_view (rtx_insn *insn, dw_line_info_table *table)
 
bool dwarf2out_default_as_loc_support (void)
 
bool dwarf2out_default_as_locview_support (void)
 
static bool output_asm_line_debug_info (void)
 
static bool asm_outputs_debug_line_str (void)
 
static bool is_pseudo_reg (const_rtx)
 
static tree type_main_variant (tree)
 
static bool is_tagged_type (const_tree)
 
static const chardwarf_tag_name (unsigned)
 
static const chardwarf_attr_name (unsigned)
 
static const chardwarf_form_name (unsigned)
 
static tree decl_ultimate_origin (const_tree)
 
static tree decl_class_context (tree)
 
static void add_dwarf_attr (dw_die_ref, dw_attr_node *)
 
static unsigned int AT_index (dw_attr_node *)
 
static void add_AT_flag (dw_die_ref, enum dwarf_attribute, unsigned)
 
static unsigned AT_flag (dw_attr_node *)
 
static void add_AT_int (dw_die_ref, enum dwarf_attribute, HOST_WIDE_INT)
 
static void add_AT_unsigned (dw_die_ref, enum dwarf_attribute, unsigned HOST_WIDE_INT)
 
static void add_AT_double (dw_die_ref, enum dwarf_attribute, HOST_WIDE_INT, unsigned HOST_WIDE_INT)
 
static void add_AT_vec (dw_die_ref, enum dwarf_attribute, unsigned int, unsigned int, unsigned char *)
 
static void add_AT_data8 (dw_die_ref, enum dwarf_attribute, unsigned char *)
 
static void add_AT_string (dw_die_ref, enum dwarf_attribute, const char *)
 
static const charAT_string (dw_attr_node *)
 
static enum dwarf_form AT_string_form (dw_attr_node *)
 
static void add_AT_die_ref (dw_die_ref, enum dwarf_attribute, dw_die_ref)
 
static void add_AT_specification (dw_die_ref, dw_die_ref)
 
static dw_die_ref AT_ref (dw_attr_node *)
 
static int AT_ref_external (dw_attr_node *)
 
static void set_AT_ref_external (dw_attr_node *, int)
 
static void add_AT_loc (dw_die_ref, enum dwarf_attribute, dw_loc_descr_ref)
 
static void add_AT_loc_list (dw_die_ref, enum dwarf_attribute, dw_loc_list_ref)
 
static dw_loc_list_ref AT_loc_list (dw_attr_node *)
 
static void add_AT_view_list (dw_die_ref, enum dwarf_attribute)
 
static addr_table_entryadd_addr_table_entry (void *, enum ate_kind)
 
static void remove_addr_table_entry (addr_table_entry *)
 
static void add_AT_addr (dw_die_ref, enum dwarf_attribute, rtx, bool)
 
static rtx AT_addr (dw_attr_node *)
 
static void add_AT_symview (dw_die_ref, enum dwarf_attribute, const char *)
 
static void add_AT_lbl_id (dw_die_ref, enum dwarf_attribute, const char *)
 
static void add_AT_lineptr (dw_die_ref, enum dwarf_attribute, const char *)
 
static void add_AT_macptr (dw_die_ref, enum dwarf_attribute, const char *)
 
static void add_AT_range_list (dw_die_ref, enum dwarf_attribute, unsigned long, bool)
 
static const charAT_lbl (dw_attr_node *)
 
static const charget_AT_low_pc (dw_die_ref)
 
static bool is_c (void)
 
static bool is_cxx (void)
 
static bool is_cxx (const_tree)
 
static bool is_fortran (void)
 
static bool is_ada (void)
 
static bool remove_AT (dw_die_ref, enum dwarf_attribute)
 
static void remove_child_TAG (dw_die_ref, enum dwarf_tag)
 
static void add_child_die (dw_die_ref, dw_die_ref)
 
static dw_die_ref new_die (enum dwarf_tag, dw_die_ref, tree)
 
static dw_die_ref strip_naming_typedef (tree, dw_die_ref)
 
static dw_die_ref lookup_type_die_strip_naming_typedef (tree)
 
static void equate_type_number_to_die (tree, dw_die_ref)
 
static var_loc_listlookup_decl_loc (const_tree)
 
static void equate_decl_number_to_die (tree, dw_die_ref)
 
static struct var_loc_nodeadd_var_loc_to_decl (tree, rtx, const char *, var_loc_view)
 
static void print_spaces (FILE *)
 
static void print_die (dw_die_ref, FILE *)
 
static void loc_checksum (dw_loc_descr_ref, struct md5_ctx *)
 
static void attr_checksum (dw_attr_node *, struct md5_ctx *, int *)
 
static void die_checksum (dw_die_ref, struct md5_ctx *, int *)
 
static void checksum_sleb128 (HOST_WIDE_INT, struct md5_ctx *)
 
static void checksum_uleb128 (unsigned HOST_WIDE_INT, struct md5_ctx *)
 
static void loc_checksum_ordered (dw_loc_descr_ref, struct md5_ctx *)
 
static void attr_checksum_ordered (enum dwarf_tag, dw_attr_node *, struct md5_ctx *, int *)
 
static void collect_checksum_attributes (struct checksum_attributes *, dw_die_ref)
 
static void die_checksum_ordered (dw_die_ref, struct md5_ctx *, int *)
 
static void checksum_die_context (dw_die_ref, struct md5_ctx *)
 
static void generate_type_signature (dw_die_ref, comdat_type_node *)
 
static bool same_loc_p (dw_loc_descr_ref, dw_loc_descr_ref, int *)
 
static bool same_dw_val_p (const dw_val_node *, const dw_val_node *, int *)
 
static bool same_attr_p (dw_attr_node *, dw_attr_node *, int *)
 
static bool same_die_p (dw_die_ref, dw_die_ref, int *)
 
static bool is_type_die (dw_die_ref)
 
static bool is_template_instantiation (dw_die_ref)
 
static bool is_declaration_die (dw_die_ref)
 
static bool should_move_die_to_comdat (dw_die_ref)
 
static dw_die_ref clone_as_declaration (dw_die_ref)
 
static dw_die_ref clone_die (dw_die_ref)
 
static dw_die_ref clone_tree (dw_die_ref)
 
static dw_die_ref copy_declaration_context (dw_die_ref, dw_die_ref)
 
static void generate_skeleton_ancestor_tree (skeleton_chain_node *)
 
static void generate_skeleton_bottom_up (skeleton_chain_node *)
 
static dw_die_ref generate_skeleton (dw_die_ref)
 
static dw_die_ref remove_child_or_replace_with_skeleton (dw_die_ref, dw_die_ref, dw_die_ref)
 
static void break_out_comdat_types (dw_die_ref)
 
static void copy_decls_for_unworthy_types (dw_die_ref)
 
static void add_sibling_attributes (dw_die_ref)
 
static void output_location_lists (dw_die_ref)
 
static int constant_size (unsigned HOST_WIDE_INT)
 
static unsigned long size_of_die (dw_die_ref)
 
static void calc_die_sizes (dw_die_ref)
 
static void calc_base_type_die_sizes (void)
 
static void mark_dies (dw_die_ref)
 
static void unmark_dies (dw_die_ref)
 
static void unmark_all_dies (dw_die_ref)
 
static unsigned long size_of_pubnames (vec< pubname_entry, va_gc > *)
 
static unsigned long size_of_aranges (void)
 
static enum dwarf_form value_format (dw_attr_node *)
 
static void output_value_format (dw_attr_node *)
 
static void output_abbrev_section (void)
 
static void output_die_abbrevs (unsigned long, dw_die_ref)
 
static void output_die (dw_die_ref)
 
static void output_compilation_unit_header (enum dwarf_unit_type)
 
static void output_comp_unit (dw_die_ref, int, const unsigned char *)
 
static void output_comdat_type_unit (comdat_type_node *, bool)
 
static const chardwarf2_name (tree, int)
 
static void add_pubname (tree, dw_die_ref)
 
static void add_enumerator_pubname (const char *, dw_die_ref)
 
static void add_pubname_string (const char *, dw_die_ref)
 
static void add_pubtype (tree, dw_die_ref)
 
static void output_pubnames (vec< pubname_entry, va_gc > *)
 
static void output_aranges (void)
 
static unsigned int add_ranges (const_tree, bool=false)
 
static void add_ranges_by_labels (dw_die_ref, const char *, const char *, bool *, bool)
 
static void output_ranges (void)
 
static dw_line_info_tablenew_line_info_table (void)
 
static void output_line_info (bool)
 
static void output_file_names (void)
 
static bool is_base_type (tree)
 
static dw_die_ref subrange_type_die (tree, tree, tree, tree, dw_die_ref)
 
static int decl_quals (const_tree)
 
static dw_die_ref modified_type_die (tree, int, bool, dw_die_ref)
 
static dw_die_ref generic_parameter_die (tree, tree, bool, dw_die_ref)
 
static dw_die_ref template_parameter_pack_die (tree, tree, dw_die_ref)
 
static unsigned int debugger_reg_number (const_rtx)
 
static void add_loc_descr_op_piece (dw_loc_descr_ref *, int)
 
static dw_loc_descr_ref reg_loc_descriptor (rtx, enum var_init_status)
 
static dw_loc_descr_ref one_reg_loc_descriptor (unsigned int, enum var_init_status)
 
static dw_loc_descr_ref multiple_reg_loc_descriptor (rtx, rtx, enum var_init_status)
 
static dw_loc_descr_ref based_loc_descr (rtx, poly_int64, enum var_init_status)
 
static bool is_based_loc (const_rtx)
 
static bool resolve_one_addr (rtx *)
 
static dw_loc_descr_ref concat_loc_descriptor (rtx, rtx, enum var_init_status)
 
static dw_loc_descr_ref loc_descriptor (rtx, machine_mode mode, enum var_init_status)
 
static void add_loc_descr_to_each (dw_loc_list_ref list, dw_loc_descr_ref ref)
 
static void add_loc_list (dw_loc_list_ref *ret, dw_loc_list_ref list)
 
static dw_loc_list_ref loc_list_from_tree (tree, int, struct loc_descr_context *)
 
static dw_loc_descr_ref loc_descriptor_from_tree (tree, int, struct loc_descr_context *)
 
static tree field_type (const_tree)
 
static unsigned int simple_type_align_in_bits (const_tree)
 
static unsigned int simple_decl_align_in_bits (const_tree)
 
static unsigned HOST_WIDE_INT simple_type_size_in_bits (const_tree)
 
static dw_loc_descr_ref field_byte_offset (const_tree, struct vlr_context *, HOST_WIDE_INT *)
 
static void add_AT_location_description (dw_die_ref, enum dwarf_attribute, dw_loc_list_ref)
 
static void add_data_member_location_attribute (dw_die_ref, tree, struct vlr_context *)
 
static bool add_const_value_attribute (dw_die_ref, machine_mode, rtx)
 
static void insert_int (HOST_WIDE_INT, unsigned, unsigned char *)
 
static void insert_wide_int (const wide_int_ref &, unsigned char *, int)
 
static unsigned insert_float (const_rtx, unsigned char *)
 
static rtx rtl_for_decl_location (tree)
 
static bool add_location_or_const_value_attribute (dw_die_ref, tree, bool)
 
static bool tree_add_const_value_attribute (dw_die_ref, tree)
 
static bool tree_add_const_value_attribute_for_decl (dw_die_ref, tree)
 
static void add_desc_attribute (dw_die_ref, tree)
 
static void add_gnat_descriptive_type_attribute (dw_die_ref, tree, dw_die_ref)
 
static void add_comp_dir_attribute (dw_die_ref)
 
static void add_scalar_info (dw_die_ref, enum dwarf_attribute, tree, int, struct loc_descr_context *)
 
static void add_bound_info (dw_die_ref, enum dwarf_attribute, tree, struct loc_descr_context *)
 
static void add_subscript_info (dw_die_ref, tree, bool)
 
static void add_byte_size_attribute (dw_die_ref, tree)
 
static void add_alignment_attribute (dw_die_ref, tree)
 
static void add_bit_offset_attribute (dw_die_ref, tree)
 
static void add_bit_size_attribute (dw_die_ref, tree)
 
static void add_prototyped_attribute (dw_die_ref, tree)
 
static void add_abstract_origin_attribute (dw_die_ref, tree)
 
static void add_pure_or_virtual_attribute (dw_die_ref, tree)
 
static void add_src_coords_attributes (dw_die_ref, tree)
 
static void add_name_and_src_coords_attributes (dw_die_ref, tree, bool=false)
 
static void add_discr_value (dw_die_ref, dw_discr_value *)
 
static void add_discr_list (dw_die_ref, dw_discr_list_ref)
 
static dw_discr_list_ref AT_discr_list (dw_attr_node *)
 
static dw_die_ref scope_die_for (tree, dw_die_ref)
 
static bool local_scope_p (dw_die_ref)
 
static bool class_scope_p (dw_die_ref)
 
static bool class_or_namespace_scope_p (dw_die_ref)
 
static void add_type_attribute (dw_die_ref, tree, int, bool, dw_die_ref)
 
static void add_calling_convention_attribute (dw_die_ref, tree)
 
static const chartype_tag (const_tree)
 
static tree member_declared_type (const_tree)
 
static void gen_array_type_die (tree, dw_die_ref)
 
static void gen_descr_array_type_die (tree, struct array_descr_info *, dw_die_ref)
 
static dw_die_ref gen_enumeration_type_die (tree, dw_die_ref, bool)
 
static dw_die_ref gen_formal_parameter_die (tree, tree, bool, dw_die_ref)
 
static dw_die_ref gen_formal_parameter_pack_die (tree, tree, dw_die_ref, tree *)
 
static void gen_unspecified_parameters_die (tree, dw_die_ref)
 
static void gen_formal_types_die (tree, dw_die_ref)
 
static void gen_subprogram_die (tree, dw_die_ref)
 
static void gen_variable_die (tree, tree, dw_die_ref)
 
static void gen_const_die (tree, dw_die_ref)
 
static void gen_label_die (tree, dw_die_ref)
 
static void gen_lexical_block_die (tree, dw_die_ref)
 
static void gen_inlined_subroutine_die (tree, dw_die_ref)
 
static void gen_field_die (tree, struct vlr_context *, dw_die_ref)
 
static void gen_ptr_to_mbr_type_die (tree, dw_die_ref)
 
static dw_die_ref gen_compile_unit_die (const char *)
 
static void gen_inheritance_die (tree, tree, tree, dw_die_ref)
 
static void gen_member_die (tree, dw_die_ref)
 
static void gen_struct_or_union_type_die (tree, dw_die_ref, enum debug_info_usage)
 
static void gen_subroutine_type_die (tree, dw_die_ref)
 
static void gen_typedef_die (tree, dw_die_ref)
 
static void gen_type_die (tree, dw_die_ref, bool=false)
 
static void gen_block_die (tree, dw_die_ref)
 
static void decls_for_scope (tree, dw_die_ref, bool=true)
 
static bool is_naming_typedef_decl (const_tree)
 
static dw_die_ref get_context_die (tree)
 
static void gen_namespace_die (tree, dw_die_ref)
 
static dw_die_ref gen_namelist_decl (tree, dw_die_ref, tree)
 
static dw_die_ref gen_decl_die (tree, tree, struct vlr_context *, dw_die_ref)
 
static dw_die_ref force_decl_die (tree)
 
static dw_die_ref force_type_die (tree)
 
static dw_die_ref setup_namespace_context (tree, dw_die_ref)
 
static dw_die_ref declare_in_namespace (tree, dw_die_ref)
 
static struct dwarf_file_datalookup_filename (const char *)
 
static void retry_incomplete_types (void)
 
static void gen_type_die_for_member (tree, tree, dw_die_ref)
 
static void gen_generic_params_dies (tree)
 
static void gen_tagged_type_die (tree, dw_die_ref, enum debug_info_usage, bool=false)
 
static void gen_type_die_with_usage (tree, dw_die_ref, enum debug_info_usage, bool=false)
 
static void splice_child_die (dw_die_ref, dw_die_ref)
 
static int file_info_cmp (const void *, const void *)
 
static dw_loc_list_ref new_loc_list (dw_loc_descr_ref, const char *, var_loc_view, const char *, var_loc_view, const char *)
 
static void output_loc_list (dw_loc_list_ref)
 
static chargen_internal_sym (const char *)
 
static bool want_pubnames (void)
 
static void prune_unmark_dies (dw_die_ref)
 
static void prune_unused_types_mark_generic_parms_dies (dw_die_ref)
 
static void prune_unused_types_mark (dw_die_ref, int)
 
static void prune_unused_types_walk (dw_die_ref)
 
static void prune_unused_types_walk_attribs (dw_die_ref)
 
static void prune_unused_types_prune (dw_die_ref)
 
static void prune_unused_types (void)
 
static int maybe_emit_file (struct dwarf_file_data *fd)
 
static const charAT_vms_delta1 (dw_attr_node *)
 
static const charAT_vms_delta2 (dw_attr_node *)
 
static void append_entry_to_tmpl_value_parm_die_table (dw_die_ref, tree)
 
static void gen_remaining_tmpl_value_param_die_attribute (void)
 
static bool generic_type_p (tree)
 
static void schedule_generic_params_dies_gen (tree t)
 
static void gen_scheduled_generic_parms_dies (void)
 
static void resolve_variable_values (void)
 
static const charcomp_dir_string (void)
 
static void hash_loc_operands (dw_loc_descr_ref, inchash::hash &)
 
static enum dwarf_location_atom dw_addr_op (enum dtprel_bool dtprel)
 
static dw_loc_descr_ref new_addr_loc_descr (rtx addr, enum dtprel_bool dtprel)
 
static dw_die_ref comp_unit_die (void)
 
void dwarf2out_set_demangle_name_func (const char *(*func)(const char *))
 
static const chardwarf_tag_name (unsigned int tag)
 
static const chardwarf_attr_name (unsigned int attr)
 
static const chardwarf_form_name (unsigned int form)
 
enum dw_val_class AT_class (dw_attr_node *a)
 
static void add_AT_flag (dw_die_ref die, enum dwarf_attribute attr_kind, unsigned int flag)
 
HOST_WIDE_INT AT_int (dw_attr_node *a)
 
unsigned HOST_WIDE_INT AT_unsigned (dw_attr_node *a)
 
dw_wide_intalloc_dw_wide_int (const wide_int_ref &w)
 
static void add_AT_wide (dw_die_ref die, enum dwarf_attribute attr_kind, const wide_int_ref &w)
 
static void add_AT_data8 (dw_die_ref die, enum dwarf_attribute attr_kind, unsigned char data8[8])
 
static void add_AT_low_high_pc (dw_die_ref die, const char *lbl_low, const char *lbl_high, bool force_direct)
 
static struct indirect_string_nodefind_AT_string_in_table (const char *str, hash_table< indirect_string_hasher > *table, enum insert_option insert=INSERT)
 
static struct indirect_string_nodefind_AT_string (const char *str, enum insert_option insert=INSERT)
 
static void set_indirect_string (struct indirect_string_node *node)
 
int reset_indirect_string (indirect_string_node **h, void *)
 
static void add_filepath_AT_string (dw_die_ref die, enum dwarf_attribute attr_kind, const char *str)
 
static enum dwarf_form find_string_form (struct indirect_string_node *node)
 
static void change_AT_die_ref (dw_attr_node *ref, dw_die_ref new_die)
 
dw_loc_descr_ref AT_loc (dw_attr_node *a)
 
static dw_loc_list_refAT_loc_list_ptr (dw_attr_node *a)
 
static dw_val_nodeview_list_to_loc_list_val_node (dw_val_node *val)
 
void init_addr_table_entry (addr_table_entry *e, enum ate_kind kind, void *addr)
 
static void remove_loc_list_addr_table_entries (dw_loc_descr_ref descr)
 
int index_addr_table_entry (addr_table_entry **h, unsigned int *index)
 
enum dwarf_tag dw_get_die_tag (dw_die_ref die)
 
dw_die_ref dw_get_die_child (dw_die_ref die)
 
dw_die_ref dw_get_die_sib (dw_die_ref die)
 
static void add_AT_file (dw_die_ref die, enum dwarf_attribute attr_kind, struct dwarf_file_data *fd)
 
static struct dwarf_file_dataAT_file (dw_attr_node *a)
 
static void add_AT_range_list (dw_die_ref die, enum dwarf_attribute attr_kind, long unsigned int offset, bool force_direct)
 
dw_attr_nodeget_AT (dw_die_ref die, enum dwarf_attribute attr_kind)
 
static dw_die_ref get_die_parent (dw_die_ref die)
 
const charget_AT_string (dw_die_ref die, enum dwarf_attribute attr_kind)
 
int get_AT_flag (dw_die_ref die, enum dwarf_attribute attr_kind)
 
unsigned get_AT_unsigned (dw_die_ref die, enum dwarf_attribute attr_kind)
 
dw_die_ref get_AT_ref (dw_die_ref die, enum dwarf_attribute attr_kind)
 
struct dwarf_file_dataget_AT_file (dw_die_ref die, enum dwarf_attribute attr_kind)
 
static bool is_fortran (const_tree decl)
 
static bool is_rust (void)
 
static bool is_dlang (void)
 
static void remove_child_with_prev (dw_die_ref child, dw_die_ref prev)
 
static void replace_child (dw_die_ref old_child, dw_die_ref new_child, dw_die_ref prev)
 
static void move_all_children (dw_die_ref old_parent, dw_die_ref new_parent)
 
static void add_child_die_after (dw_die_ref die, dw_die_ref child_die, dw_die_ref after_die)
 
static void reparent_child (dw_die_ref child, dw_die_ref new_parent)
 
dw_die_ref new_die_raw (enum dwarf_tag tag_value)
 
dw_die_ref lookup_type_die (tree type)
 
static dw_die_ref maybe_create_die_with_external_ref (tree)
 
dw_die_ref lookup_decl_die (tree decl)
 
static dw_die_ref lookup_block_die (tree block)
 
static void equate_block_to_die (tree block, dw_die_ref die)
 
static void add_AT_external_die_ref (dw_die_ref die, enum dwarf_attribute attr_kind, const char *symbol, HOST_WIDE_INT offset)
 
static HOST_WIDE_INT decl_piece_bitsize (rtx piece)
 
static rtxdecl_piece_varloc_ptr (rtx piece)
 
static rtx_expr_listdecl_piece_node (rtx loc_note, HOST_WIDE_INT bitsize, rtx next)
 
static rtx construct_piece_list (rtx loc_note, HOST_WIDE_INT bitpos, HOST_WIDE_INT bitsize)
 
static void adjust_piece_list (rtx *dest, rtx *src, rtx *inner, HOST_WIDE_INT bitpos, HOST_WIDE_INT piece_bitpos, HOST_WIDE_INT bitsize, rtx loc_note)
 
static void print_signature (FILE *outfile, char *sig)
 
static void print_discr_value (FILE *outfile, dw_discr_value *discr_value)
 
static void print_loc_descr (dw_loc_descr_ref, FILE *)
 
static void print_dw_val (dw_val_node *val, bool recurse, FILE *outfile)
 
static void print_attribute (dw_attr_node *a, bool recurse, FILE *outfile)
 
DEBUG_FUNCTION void debug_dwarf_loc_descr (dw_loc_descr_ref loc)
 
DEBUG_FUNCTION void debug_dwarf_die (dw_die_ref die)
 
DEBUG_FUNCTION void debug (die_struct &ref)
 
DEBUG_FUNCTION void debug (die_struct *ptr)
 
DEBUG_FUNCTION void debug_dwarf (void)
 
DEBUG_FUNCTION void verify_die (dw_die_ref die)
 
static void check_die (dw_die_ref die)
 
static void die_odr_checksum (int tag, const char *name, md5_ctx *ctx)
 
static void compute_comp_unit_symbol (dw_die_ref unit_die)
 
static bool is_cu_die (dw_die_ref c)
 
static bool is_unit_die (dw_die_ref c)
 
static bool is_namespace_die (dw_die_ref c)
 
static bool is_template_parameter (dw_die_ref die)
 
static bool is_nested_in_subprogram (dw_die_ref die)
 
static bool contains_subprogram_definition (dw_die_ref die)
 
static dw_die_ref copy_ancestor_tree (dw_die_ref unit, dw_die_ref die, decl_hash_type *decl_table)
 
static void copy_dwarf_procs_ref_in_attrs (dw_die_ref die, comdat_type_node *type_node, hash_map< dw_die_ref, dw_die_ref > &copied_dwarf_procs)
 
static dw_die_ref copy_dwarf_procedure (dw_die_ref die, comdat_type_node *type_node, hash_map< dw_die_ref, dw_die_ref > &copied_dwarf_procs)
 
static void copy_dwarf_procs_ref_in_dies (dw_die_ref die, comdat_type_node *type_node, hash_map< dw_die_ref, dw_die_ref > &copied_dwarf_procs)
 
static dw_die_ref clone_tree_partial (dw_die_ref die, decl_hash_type *decl_table)
 
static void copy_decls_walk (dw_die_ref unit, dw_die_ref die, decl_hash_type *decl_table)
 
static void collect_skeleton_dies (dw_die_ref die, decl_hash_type *decl_table)
 
static void output_loclists_offsets (dw_die_ref die)
 
static void assign_location_list_indexes (dw_die_ref die)
 
static struct external_reflookup_external_ref (external_ref_hash_type *map, dw_die_ref die)
 
static void optimize_external_refs_1 (dw_die_ref die, external_ref_hash_type *map)
 
int dwarf2_build_local_stub (external_ref **slot, dw_die_ref data)
 
static external_ref_hash_typeoptimize_external_refs (dw_die_ref die)
 
static void build_abbrev_table (dw_die_ref die, external_ref_hash_type *extern_map)
 
static int die_abbrev_cmp (const void *p1, const void *p2)
 
static void optimize_implicit_const (unsigned int first_id, unsigned int end, vec< bool > &implicit_consts)
 
static void optimize_abbrev_table (void)
 
static bool include_pubname_in_output (vec< pubname_entry, va_gc > *table, pubname_entry *p)
 
static bool loc_list_has_views (dw_loc_list_ref list)
 
static void gen_llsym (dw_loc_list_ref list)
 
static void maybe_gen_llsym (dw_loc_list_ref list)
 
static bool skip_loc_list_entry (dw_loc_list_ref curr, unsigned long *sizep=NULL)
 
static void dwarf2out_maybe_output_loclist_view_pair (dw_loc_list_ref curr)
 
static void output_range_list_offset (dw_attr_node *a)
 
static void output_loc_list_offset (dw_attr_node *a)
 
static void output_view_list_offset (dw_attr_node *a)
 
static void output_attr_index_or_value (dw_attr_node *a)
 
static void output_signature (const char *sig, const char *name)
 
static void output_discr_value (dw_discr_value *discr_value, const char *name)
 
static void output_dwarf_version ()
 
static void add_AT_pubnames (dw_die_ref die)
 
static void add_skeleton_AT_string (dw_die_ref die, enum dwarf_attribute attr_kind, const char *str)
 
static void add_top_level_skeleton_die_attrs (dw_die_ref die)
 
static void output_skeleton_debug_sections (dw_die_ref comp_unit, const unsigned char *dwo_id)
 
static void output_pubname (dw_offset die_offset, pubname_entry *entry)
 
static void output_pubtables (void)
 
static unsigned int add_ranges_num (int num, bool maybe_new_sec)
 
static void note_rnglist_head (unsigned int offset)
 
static bool use_distinct_base_address_for_range (unsigned int i)
 
static void index_rnglists (void)
 
static bool output_rnglists (unsigned generation, bool dwo)
 
int file_name_acquire (dwarf_file_data **slot, file_name_acquire_data *fnad)
 
static void output_line_string (enum dwarf_form form, const char *str, const char *entry_kind, unsigned int idx)
 
static void output_one_line_info_table (dw_line_info_table *table)
 
static bool need_endianity_attribute_p (bool reverse)
 
dw_die_ref base_type_die (tree type, bool reverse)
 
static bool is_cxx_auto (tree type)
 
static offset_int offset_int_type_size_in_bits (const_tree type)
 
static int get_nearest_type_subqualifiers (tree type, int type_quals, int qual_mask)
 
static dw_die_ref qualified_die_p (dw_die_ref die, int *mask, unsigned int depth)
 
static tree long_double_as_float128 (tree type)
 
static unsigned long size_of_int_loc_descriptor (HOST_WIDE_INT)
 
static dw_loc_descr_ref int_shift_loc_descriptor (HOST_WIDE_INT i, int shift)
 
static dw_loc_descr_ref uint_comparison_loc_list (enum tree_code kind)
 
static dw_loc_list_ref loc_list_from_uint_comparison (dw_loc_list_ref left, dw_loc_list_ref right, enum tree_code kind)
 
static unsigned long size_of_int_shift_loc_descriptor (HOST_WIDE_INT i, int shift)
 
static dw_loc_descr_ref address_of_int_loc_descriptor (int size, HOST_WIDE_INT i)
 
static dw_loc_descr_ref tls_mem_loc_descriptor (rtx mem)
 
static void expansion_failed (tree expr, rtx rtl, char const *reason)
 
static bool const_ok_for_output_1 (rtx rtl)
 
static bool const_ok_for_output (rtx rtl)
 
static dw_die_ref base_type_for_mode (machine_mode mode, bool unsignedp)
 
static dw_loc_descr_ref convert_descriptor_to_mode (scalar_int_mode mode, dw_loc_descr_ref op)
 
static dw_loc_descr_ref compare_loc_descriptor (enum dwarf_location_atom op, dw_loc_descr_ref op0, dw_loc_descr_ref op1)
 
static dw_loc_descr_ref scompare_loc_descriptor_wide (enum dwarf_location_atom op, scalar_int_mode op_mode, dw_loc_descr_ref op0, dw_loc_descr_ref op1)
 
static dw_loc_descr_ref scompare_loc_descriptor_narrow (enum dwarf_location_atom op, rtx rtl, scalar_int_mode op_mode, dw_loc_descr_ref op0, dw_loc_descr_ref op1)
 
static dw_loc_descr_ref scompare_loc_descriptor (enum dwarf_location_atom op, rtx rtl, machine_mode mem_mode)
 
static dw_loc_descr_ref ucompare_loc_descriptor (enum dwarf_location_atom op, rtx rtl, machine_mode mem_mode)
 
static dw_loc_descr_ref minmax_loc_descriptor (rtx rtl, machine_mode mode, machine_mode mem_mode)
 
static dw_loc_descr_ref typed_binop (enum dwarf_location_atom op, rtx rtl, dw_die_ref type_die, scalar_int_mode mode, machine_mode mem_mode)
 
static dw_loc_descr_ref clz_loc_descriptor (rtx rtl, scalar_int_mode mode, machine_mode mem_mode)
 
static dw_loc_descr_ref popcount_loc_descriptor (rtx rtl, scalar_int_mode mode, machine_mode mem_mode)
 
static dw_loc_descr_ref bswap_loc_descriptor (rtx rtl, scalar_int_mode mode, machine_mode mem_mode)
 
static dw_loc_descr_ref rotate_loc_descriptor (rtx rtl, scalar_int_mode mode, machine_mode mem_mode)
 
static dw_loc_descr_ref parameter_ref_descriptor (rtx rtl)
 
dw_loc_descr_ref mem_loc_descriptor (rtx rtl, machine_mode mode, machine_mode mem_mode, enum var_init_status initialized)
 
static dw_loc_descr_ref concatn_loc_descriptor (rtx concatn, enum var_init_status initialized)
 
static dw_loc_descr_ref implicit_ptr_descriptor (rtx rtl, HOST_WIDE_INT offset)
 
static const charsecname_for_decl (const_tree decl)
 
static bool decl_by_reference_p (tree decl)
 
static dw_loc_descr_ref dw_loc_list_1 (tree loc, rtx varloc, int want_address, enum var_init_status initialized)
 
static dw_loc_descr_ref new_loc_descr_op_bit_piece (HOST_WIDE_INT bitsize, HOST_WIDE_INT offset)
 
static dw_loc_descr_ref dw_sra_loc_expr (tree decl, rtx loc)
 
static dw_loc_list_ref dw_loc_list (var_loc_list *loc_list, tree decl, int want_address)
 
static bool single_element_loc_list_p (dw_loc_list_ref list)
 
static dw_loc_descr_ref copy_loc_descr (dw_loc_descr_ref ref)
 
static void prepend_loc_descr_to_each (dw_loc_list_ref list, dw_loc_descr_ref ref)
 
static dw_loc_descr_ref cst_pool_loc_descr (tree loc)
 
static dw_loc_list_ref loc_list_for_address_of_addr_expr_of_indirect_ref (tree loc, bool toplev, loc_descr_context *context)
 
static void loc_descr_to_next_no_nop (dw_loc_descr_ref &loc, hash_set< dw_loc_descr_ref > &nops)
 
bool free_loc_descr (const dw_loc_descr_ref &loc, void *data)
 
static void loc_descr_without_nops (dw_loc_descr_ref &loc)
 
static dw_die_ref new_dwarf_proc_die (dw_loc_descr_ref location, tree fndecl, dw_die_ref parent_die)
 
static bool is_handled_procedure_type (tree type)
 
static bool resolve_args_picking_1 (dw_loc_descr_ref loc, unsigned initial_frame_offset, struct dwarf_procedure_info *dpi, hash_map< dw_loc_descr_ref, unsigned > &frame_offsets)
 
static bool resolve_args_picking (dw_loc_descr_ref loc, unsigned initial_frame_offset, struct dwarf_procedure_info *dpi)
 
static dw_die_ref function_to_dwarf_procedure (tree fndecl)
 
static dw_loc_list_ref typed_binop_from_tree (enum dwarf_location_atom op, tree loc, dw_die_ref type_die, scalar_int_mode mode, struct loc_descr_context *context)
 
static dw_loc_list_ref loc_list_from_tree_1 (tree loc, int want_address, struct loc_descr_context *context)
 
static offset_int round_up_to_align (const offset_int &t, unsigned int align)
 
static void add_accessibility_attribute (dw_die_ref die, tree decl)
 
static void insert_int (HOST_WIDE_INT val, unsigned int size, unsigned char *dest)
 
static HOST_WIDE_INT extract_int (const unsigned char *src, unsigned int size)
 
static tree reference_to_unused (tree *tp, int *walk_subtrees, void *data)
 
static rtx rtl_for_decl_init (tree init, tree type)
 
static tree fortran_common (tree decl, HOST_WIDE_INT *value)
 
static tree mangle_referenced_decls (tree *tp, int *walk_subtrees, void *)
 
static dw_loc_list_ref convert_cfa_to_fb_loc_list (HOST_WIDE_INT offset)
 
static void compute_frame_pointer_to_fb_displacement (poly_int64 offset)
 
void add_name_attribute (dw_die_ref die, const char *name_string)
 
static void add_filename_attribute (dw_die_ref die, const char *name_string)
 
static void add_desc_attribute (dw_die_ref die, const char *name_string)
 
static int lower_bound_default (void)
 
static void add_linkage_attr (dw_die_ref die, tree decl)
 
static void add_linkage_name_raw (dw_die_ref die, tree decl)
 
static void add_linkage_name (dw_die_ref die, tree decl)
 
static tree uses_local_type_r (tree *tp, int *walk_subtrees, void *data)
 
static tree uses_local_type (tree type)
 
static bool fill_variable_array_bounds (tree type)
 
static enum dwarf_tag record_type_tag (tree type)
 
static void set_decl_origin_self (tree)
 
static void set_block_origin_self (tree stmt)
 
bool premark_used_types_helper (tree const &type, void *)
 
int premark_types_used_by_global_vars_helper (types_used_by_vars_entry **slot, void *)
 
static void premark_used_types (struct function *fun)
 
static void premark_types_used_by_global_vars (void)
 
static void premark_used_variables (void)
 
static dw_die_ref gen_call_site_die (tree decl, dw_die_ref subr_die, struct call_arg_loc_node *ca_loc)
 
static bool decl_will_get_specification_p (dw_die_ref old_die, tree decl, bool declaration)
 
static bool local_function_static (tree decl)
 
static bool override_type_for_decl_p (tree decl, dw_die_ref old_die, dw_die_ref context_die)
 
static void add_call_src_coords_attributes (tree stmt, dw_die_ref die)
 
static void add_high_low_attributes (tree stmt, dw_die_ref die)
 
static const charhighest_c_language (const char *lang1, const char *lang2)
 
static bool is_variant_part (tree decl)
 
static tree analyze_discr_in_predicate (tree operand, tree struct_type)
 
static bool get_discr_value (tree src, dw_discr_value *dest)
 
static void analyze_variants_discr (tree variant_part_decl, tree struct_type, tree *discr_decl, dw_discr_list_ref **discr_lists_p, unsigned *discr_lists_length)
 
static void gen_variant_part (tree variant_part_decl, struct vlr_context *vlr_ctx, dw_die_ref context_die)
 
static void process_scope_var (tree stmt, tree decl, tree origin, dw_die_ref context_die)
 
static dw_die_ref lookup_context_die (tree context)
 
static bool is_trivial_indirect_ref (tree expr)
 
static void dwarf2out_begin_block (unsigned int line, unsigned int blocknum)
 
static void dwarf2out_end_block (unsigned int line, unsigned int blocknum)
 
static rtx_insndwarf2out_next_real_insn (rtx_insn *loc_note)
 
static bool block_within_block_p (tree block, tree outer, bool bothways)
 
int var_location_switch_text_section_1 (var_loc_list **slot, void *)
 
int find_empty_loc_ranges_at_text_label (var_loc_list **slot, int)
 
static void push_dw_line_info_entry (dw_line_info_table *table, enum dw_line_info_opcode opcode, unsigned int val)
 
static void dwarf2out_set_ignored_loc (unsigned int line, unsigned int column, const char *filename)
 
static void dwarf2out_start_source_file (unsigned int lineno, const char *filename)
 
static void dwarf2out_end_source_file (unsigned int lineno)
 
static void output_macinfo_op (macinfo_entry *ref)
 
static unsigned optimize_macinfo_range (unsigned int idx, vec< macinfo_entry, va_gc > *files, macinfo_hash_type **macinfo_htab)
 
static void save_macinfo_strings (void)
 
static void output_macinfo (const char *debug_line_label, bool early_lto_debug)
 
static unsigned init_sections_and_labels (bool early_lto_debug)
 
int index_string (indirect_string_node **h, unsigned int *index)
 
int output_index_string_offset (indirect_string_node **h, unsigned int *offset)
 
int output_index_string (indirect_string_node **h, unsigned int *cur_idx)
 
int count_index_strings (indirect_string_node **h, unsigned int *last_idx)
 
int output_indirect_string (indirect_string_node **h, enum dwarf_form form)
 
static void output_indirect_strings (void)
 
int output_addr_table_entry (addr_table_entry **slot, unsigned int *cur_index)
 
int count_index_addrs (addr_table_entry **slot, unsigned int *last_idx)
 
static void output_addr_table (void)
 
static void prune_unused_types_walk_loc_descr (dw_loc_descr_ref loc)
 
static void prune_unused_types_walk_local_classes (dw_die_ref die)
 
static void prune_unused_types_update_strings (dw_die_ref die)
 
static void mark_removed (dw_die_ref die)
 
static void move_linkage_attr (dw_die_ref die)
 
static void mark_base_types (dw_loc_descr_ref loc)
 
static void mark_base_types (dw_die_ref die)
 
static int base_type_cmp (const void *x, const void *y)
 
static void move_marked_base_types (void)
 
static rtx string_cst_pool_decl (tree t)
 
static bool optimize_one_addr_into_implicit_ptr (dw_loc_descr_ref loc)
 
static bool resolve_addr_in_expr (dw_attr_node *a, dw_loc_descr_ref loc)
 
static void optimize_location_into_implicit_ptr (dw_die_ref die, tree decl)
 
static dw_loc_descr_ref non_dwarf_expression (dw_loc_descr_ref l)
 
static dw_loc_descr_ref copy_deref_exprloc (dw_loc_descr_ref expr)
 
static int optimize_string_length (dw_attr_node *a)
 
static void resolve_addr (dw_die_ref die)
 
static void hash_locs (dw_loc_descr_ref loc, inchash::hash &hstate)
 
static void hash_loc_list (dw_loc_list_ref list_head)
 
static bool compare_loc_operands (dw_loc_descr_ref x, dw_loc_descr_ref y)
 
static bool compare_locs (dw_loc_descr_ref x, dw_loc_descr_ref y)
 
static void optimize_location_lists_1 (dw_die_ref die, loc_list_hash_type *htab)
 
static void index_location_lists (dw_die_ref die)
 
static void optimize_location_lists (dw_die_ref die)
 
static void flush_limbo_die_list (void)
 
static void reset_dies (dw_die_ref die)
 
static void adjust_name_comp_dir (dw_die_ref die)
 
static bool resolve_variable_value_in_expr (dw_attr_node *a, dw_loc_descr_ref loc)
 
static void resolve_variable_value (dw_die_ref die)
 
static void note_variable_value_in_expr (dw_die_ref die, dw_loc_descr_ref loc)
 
static void note_variable_value (dw_die_ref die)
 
static void ctf_debug_do_cu (dw_die_ref die)
 
void dwarf2out_cc_finalize (void)
 

Variables

static rtx_insnlast_var_location_insn
 
static rtx_insncached_next_real_insn
 
static vec< rtx, va_gc > * used_rtx_array
 
static vec< tree, va_gc > * incomplete_types
 
static sectiondebug_info_section
 
static sectiondebug_skeleton_info_section
 
static sectiondebug_abbrev_section
 
static sectiondebug_skeleton_abbrev_section
 
static sectiondebug_aranges_section
 
static sectiondebug_addr_section
 
static sectiondebug_macinfo_section
 
static const chardebug_macinfo_section_name
 
static unsigned macinfo_label_base = 1
 
static sectiondebug_line_section
 
static sectiondebug_skeleton_line_section
 
static sectiondebug_loc_section
 
static sectiondebug_pubnames_section
 
static sectiondebug_pubtypes_section
 
static sectiondebug_str_section
 
static sectiondebug_line_str_section
 
static sectiondebug_str_dwo_section
 
static sectiondebug_str_offsets_section
 
static sectiondebug_ranges_section
 
static sectiondebug_ranges_dwo_section
 
static sectiondebug_frame_section
 
static vec< dw_fde_ref, va_gc > * fde_vec
 
static hash_table< indirect_string_hasher > * debug_str_hash
 
static hash_table< indirect_string_hasher > * debug_line_str_hash
 
static hash_table< indirect_string_hasher > * skeleton_debug_str_hash
 
static int dw2_string_counter
 
static bool have_multiple_function_sections = false
 
static sectioncold_text_section
 
static bool in_text_section_p = false
 
static const charlast_text_label
 
static const charlast_cold_label
 
static vec< const char *, va_gc > * switch_text_ranges
 
static vec< const char *, va_gc > * switch_cold_ranges
 
static dw_die_ref auto_die
 
static dw_die_ref decltype_auto_die
 
static rtx current_unit_personality
 
static bool do_eh_frame = false
 
static unsigned int rnglist_idx
 
const struct gcc_debug_hooks dwarf2_debug_hooks
 
const struct gcc_debug_hooks dwarf2_lineno_debug_hooks
 
static var_loc_view symview_upper_bound
 
static bool early_dwarf
 
static bool early_dwarf_finished
 
static bitmap zero_view_p
 
static unsigned long next_die_offset
 
static dw_die_ref single_comp_unit_die
 
static comdat_type_nodecomdat_type_list
 
static limbo_die_nodecu_die_list
 
static limbo_die_nodelimbo_die_list
 
static limbo_die_nodedeferred_asm_name
 
static hash_table< dwarf_file_hasher > * file_table
 
static hash_table< decl_die_hasher > * decl_die_table
 
static hash_table< variable_value_hasher > * variable_value_hash
 
static hash_table< block_die_hasher > * common_block_die_table
 
static hash_table< decl_loc_hasher > * decl_loc_table
 
static struct call_arg_loc_nodecall_arg_locations
 
static struct call_arg_loc_nodecall_arg_loc_last
 
static int call_site_count = -1
 
static int tail_call_site_count = -1
 
static hash_table< dw_loc_list_hasher > * cached_dw_loc_list_table
 
static vec< dw_die_ref, va_gc > * abbrev_die_table
 
static hash_map< dw_die_ref, int > * dwarf_proc_stack_usage_map
 
static unsigned int line_info_label_num
 
static dw_line_info_tablecur_line_info_table
 
static dw_line_info_tabletext_section_line_info
 
static dw_line_info_tablecold_text_section_line_info
 
static vec< dw_line_info_table *, va_gc > * separate_line_info
 
static bool info_section_emitted
 
static vec< pubname_entry, va_gc > * pubname_table
 
static vec< pubname_entry, va_gc > * pubtype_table
 
static vec< macinfo_entry, va_gc > * macinfo_table
 
static vec< dw_ranges, va_gc > * ranges_table
 
static vec< dw_ranges_by_label, va_gc > * ranges_by_label
 
static bool have_location_lists
 
static unsigned int loclabel_num
 
static unsigned int poc_label_num
 
static struct dwarf_file_datalast_emitted_file
 
static int label_num
 
static vec< die_arg_entry, va_gc > * tmpl_value_parm_die_table
 
static vec< tree, va_gc > * generic_type_instances
 
static poly_int64 frame_pointer_fb_offset
 
static bool frame_pointer_fb_offset_valid
 
static vec< dw_die_refbase_types
 
static char text_end_label [MAX_ARTIFICIAL_LABEL_BYTES]
 
static char text_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
 
static char cold_text_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
 
static char cold_end_label [MAX_ARTIFICIAL_LABEL_BYTES]
 
static char abbrev_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
 
static char debug_info_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
 
static char debug_skeleton_info_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
 
static char debug_skeleton_abbrev_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
 
static char debug_line_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
 
static char debug_addr_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
 
static char debug_skeleton_line_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
 
static char macinfo_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
 
static char loc_section_label [MAX_ARTIFICIAL_LABEL_BYTES]
 
static char ranges_section_label [2 *MAX_ARTIFICIAL_LABEL_BYTES]
 
static char ranges_base_label [2 *MAX_ARTIFICIAL_LABEL_BYTES]
 
static const char *(* demangle_name_func )(const char *)
 
static hash_table< addr_hasher > * addr_index_table
 
static hash_map< tree, sym_off_pair > * external_die_map
 
static int print_indent
 
static unsigned int loc_list_idx
 
static unsigned int abbrev_opt_start
 
static unsigned int abbrev_opt_base_type_end
 
static vec< unsigned int > abbrev_usage_count
 
static vec< dw_die_refsorted_abbrev_dies
 
static unsigned int output_line_info_generation
 
static const dwarf_qual_info_t dwarf_qual_info []
 
static const unsigned int dwarf_qual_info_size = ARRAY_SIZE (dwarf_qual_info)
 
static hash_table< inline_entry_data_hasher > * inline_entry_data_table
 
static charproducer_string
 
static bool in_first_function_p = true
 
static bool maybe_at_text_label_p = true
 
static unsigned int first_loclabel_num_not_at_text_label
 
static tree main_translation_unit = NULL_TREE
 
static unsigned init_sections_and_labels_generation
 

Macro Definition Documentation

◆ BLOCK_BEGIN_LABEL

#define BLOCK_BEGIN_LABEL   "LBB"

◆ BLOCK_END_LABEL

#define BLOCK_END_LABEL   "LBE"

◆ BLOCK_INLINE_ENTRY_LABEL

#define BLOCK_INLINE_ENTRY_LABEL   "LBI"

◆ CHECKSUM [1/2]

#define CHECKSUM ( FOO)    md5_process_bytes (&(FOO), sizeof (FOO), ctx)
For DWARF-4 types, include the trailing NULL when checksumming strings.   

Referenced by attr_checksum(), attr_checksum_ordered(), checksum_sleb128(), checksum_uleb128(), die_checksum(), loc_checksum(), and loc_checksum_ordered().

◆ CHECKSUM [2/2]

#define CHECKSUM ( FOO)    md5_process_bytes (&(FOO), sizeof (FOO), ctx)
For DWARF-4 types, include the trailing NULL when checksumming strings.   

◆ CHECKSUM_ATTR

#define CHECKSUM_ATTR ( FOO)     if (FOO) attr_checksum_ordered (die->die_tag, (FOO), ctx, mark)

Referenced by die_checksum_ordered().

◆ CHECKSUM_BLOCK [1/2]

#define CHECKSUM_BLOCK ( FOO,
SIZE )   md5_process_bytes ((FOO), (SIZE), ctx)

◆ CHECKSUM_BLOCK [2/2]

#define CHECKSUM_BLOCK ( FOO,
SIZE )   md5_process_bytes ((FOO), (SIZE), ctx)

◆ CHECKSUM_SLEB128

#define CHECKSUM_SLEB128 ( FOO)    checksum_sleb128 ((FOO), ctx)

◆ CHECKSUM_STRING [1/2]

◆ CHECKSUM_STRING [2/2]

#define CHECKSUM_STRING ( FOO)    md5_process_bytes ((FOO), strlen (FOO) + 1, ctx)

◆ CHECKSUM_ULEB128

◆ CIE_AFTER_SIZE_LABEL

#define CIE_AFTER_SIZE_LABEL   "LSCIE"

Referenced by output_call_frame_info().

◆ CIE_END_LABEL

#define CIE_END_LABEL   "LECIE"

Referenced by output_call_frame_info().

◆ COLD_END_LABEL

#define COLD_END_LABEL   "Letext_cold"

◆ COLD_TEXT_SECTION_LABEL

#define COLD_TEXT_SECTION_LABEL   "Ltext_cold"

◆ DEBUG_ABBREV_SECTION

#define DEBUG_ABBREV_SECTION   ".debug_abbrev"

◆ DEBUG_ABBREV_SECTION_LABEL

#define DEBUG_ABBREV_SECTION_LABEL   "Ldebug_abbrev"

◆ DEBUG_ADDR_SECTION

#define DEBUG_ADDR_SECTION   ".debug_addr"

◆ DEBUG_ADDR_SECTION_LABEL

#define DEBUG_ADDR_SECTION_LABEL   "Ldebug_addr"

◆ DEBUG_ARANGES_SECTION

#define DEBUG_ARANGES_SECTION   ".debug_aranges"

◆ DEBUG_DWO_ABBREV_SECTION

#define DEBUG_DWO_ABBREV_SECTION   ".debug_abbrev.dwo"

◆ DEBUG_DWO_INFO_SECTION

#define DEBUG_DWO_INFO_SECTION   ".debug_info.dwo"

Referenced by output_comdat_type_unit().

◆ DEBUG_DWO_LINE_SECTION

#define DEBUG_DWO_LINE_SECTION   ".debug_line.dwo"

◆ DEBUG_DWO_LOC_SECTION

#define DEBUG_DWO_LOC_SECTION   ".debug_loc.dwo"

◆ DEBUG_DWO_LOCLISTS_SECTION

#define DEBUG_DWO_LOCLISTS_SECTION   ".debug_loclists.dwo"

◆ DEBUG_DWO_MACINFO_SECTION

#define DEBUG_DWO_MACINFO_SECTION   ".debug_macinfo.dwo"

◆ DEBUG_DWO_MACRO_SECTION

#define DEBUG_DWO_MACRO_SECTION   ".debug_macro.dwo"

◆ DEBUG_DWO_RNGLISTS_SECTION

#define DEBUG_DWO_RNGLISTS_SECTION   ".debug_rnglists.dwo"

◆ DEBUG_DWO_STR_OFFSETS_SECTION

#define DEBUG_DWO_STR_OFFSETS_SECTION   ".debug_str_offsets.dwo"

◆ DEBUG_FRAME_SECTION

#define DEBUG_FRAME_SECTION   ".debug_frame"

◆ DEBUG_INFO_SECTION

#define DEBUG_INFO_SECTION   ".debug_info"
Section names used to hold DWARF debugging information.   

Referenced by output_comdat_type_unit().

◆ DEBUG_INFO_SECTION_LABEL

#define DEBUG_INFO_SECTION_LABEL   "Ldebug_info"

◆ DEBUG_LINE_SECTION

#define DEBUG_LINE_SECTION   ".debug_line"

◆ DEBUG_LINE_SECTION_LABEL

#define DEBUG_LINE_SECTION_LABEL   "Ldebug_line"

◆ DEBUG_LINE_STR_SECTION

#define DEBUG_LINE_STR_SECTION   ".debug_line_str"

◆ DEBUG_LOC_SECTION

#define DEBUG_LOC_SECTION   ".debug_loc"

◆ DEBUG_LOC_SECTION_LABEL

#define DEBUG_LOC_SECTION_LABEL   "Ldebug_loc"

◆ DEBUG_LOCLISTS_SECTION

#define DEBUG_LOCLISTS_SECTION   ".debug_loclists"

◆ DEBUG_LTO_ABBREV_SECTION

#define DEBUG_LTO_ABBREV_SECTION   ".gnu.debuglto_.debug_abbrev"

◆ DEBUG_LTO_DWO_ABBREV_SECTION

#define DEBUG_LTO_DWO_ABBREV_SECTION   ".gnu.debuglto_.debug_abbrev.dwo"

◆ DEBUG_LTO_DWO_INFO_SECTION

#define DEBUG_LTO_DWO_INFO_SECTION   ".gnu.debuglto_.debug_info.dwo"

Referenced by output_comdat_type_unit().

◆ DEBUG_LTO_DWO_LINE_SECTION

#define DEBUG_LTO_DWO_LINE_SECTION   ".gnu.debuglto_.debug_line.dwo"

◆ DEBUG_LTO_DWO_MACINFO_SECTION

#define DEBUG_LTO_DWO_MACINFO_SECTION   ".gnu.debuglto_.debug_macinfo.dwo"

◆ DEBUG_LTO_DWO_MACRO_SECTION

#define DEBUG_LTO_DWO_MACRO_SECTION   ".gnu.debuglto_.debug_macro.dwo"

◆ DEBUG_LTO_DWO_STR_OFFSETS_SECTION

#define DEBUG_LTO_DWO_STR_OFFSETS_SECTION   ".gnu.debuglto_.debug_str_offsets.dwo"

◆ DEBUG_LTO_INFO_SECTION

#define DEBUG_LTO_INFO_SECTION   ".gnu.debuglto_.debug_info"

Referenced by output_comdat_type_unit().

◆ DEBUG_LTO_LINE_SECTION

#define DEBUG_LTO_LINE_SECTION   ".gnu.debuglto_.debug_line"

◆ DEBUG_LTO_LINE_STR_SECTION

#define DEBUG_LTO_LINE_STR_SECTION   ".gnu.debuglto_.debug_line_str"

◆ DEBUG_LTO_MACINFO_SECTION

#define DEBUG_LTO_MACINFO_SECTION   ".gnu.debuglto_.debug_macinfo"

◆ DEBUG_LTO_MACRO_SECTION

#define DEBUG_LTO_MACRO_SECTION   ".gnu.debuglto_.debug_macro"

◆ DEBUG_LTO_STR_DWO_SECTION

#define DEBUG_LTO_STR_DWO_SECTION   ".gnu.debuglto_.debug_str.dwo"

◆ DEBUG_LTO_STR_SECTION

#define DEBUG_LTO_STR_SECTION   ".gnu.debuglto_.debug_str"

◆ DEBUG_MACINFO_SECTION

#define DEBUG_MACINFO_SECTION   ".debug_macinfo"

◆ DEBUG_MACINFO_SECTION_LABEL

#define DEBUG_MACINFO_SECTION_LABEL   "Ldebug_macinfo"

◆ DEBUG_MACRO_ATTRIBUTE

#define DEBUG_MACRO_ATTRIBUTE
Value:
T * ggc_alloc(ALONE_CXX_MEM_STAT_INFO)
Definition ggc.h:184
Attribute used to refer to the macro section.   

◆ DEBUG_MACRO_SECTION

#define DEBUG_MACRO_SECTION   ".debug_macro"

◆ DEBUG_MACRO_SECTION_LABEL

#define DEBUG_MACRO_SECTION_LABEL   "Ldebug_macro"

◆ DEBUG_PUBNAMES_SECTION

#define DEBUG_PUBNAMES_SECTION
Value:
? ".debug_gnu_pubnames" : ".debug_pubnames")

◆ DEBUG_PUBTYPES_SECTION

#define DEBUG_PUBTYPES_SECTION
Value:
? ".debug_gnu_pubtypes" : ".debug_pubtypes")

◆ DEBUG_RANGES_SECTION

#define DEBUG_RANGES_SECTION   ".debug_ranges"

◆ DEBUG_RANGES_SECTION_LABEL

#define DEBUG_RANGES_SECTION_LABEL   "Ldebug_ranges"

Referenced by output_rnglists().

◆ DEBUG_RNGLISTS_SECTION

#define DEBUG_RNGLISTS_SECTION   ".debug_rnglists"

◆ DEBUG_SKELETON_ABBREV_SECTION_LABEL

#define DEBUG_SKELETON_ABBREV_SECTION_LABEL   "Lskeleton_debug_abbrev"

◆ DEBUG_SKELETON_INFO_SECTION_LABEL

#define DEBUG_SKELETON_INFO_SECTION_LABEL   "Lskeleton_debug_info"

◆ DEBUG_SKELETON_LINE_SECTION_LABEL

#define DEBUG_SKELETON_LINE_SECTION_LABEL   "Lskeleton_debug_line"

◆ DEBUG_STR_DWO_SECTION

#define DEBUG_STR_DWO_SECTION   ".debug_str.dwo"

◆ DEBUG_STR_DWO_SECTION_FLAGS

#define DEBUG_STR_DWO_SECTION_FLAGS   (SECTION_DEBUG | SECTION_EXCLUDE)
Section flags for .debug_str.dwo section.   

◆ DEBUG_STR_OFFSETS_SECTION

#define DEBUG_STR_OFFSETS_SECTION   ".debug_str_offsets"

◆ DEBUG_STR_SECTION

#define DEBUG_STR_SECTION   ".debug_str"

◆ DEBUG_STR_SECTION_FLAGS

#define DEBUG_STR_SECTION_FLAGS
Value:
@ SECTION_MERGE
Definition output.h:386
@ SECTION_DEBUG
Definition output.h:382
@ SECTION_STRINGS
Definition output.h:387
Section flags for .debug_str section.   

Referenced by prune_unused_types_prune().

◆ DIE_LABEL_PREFIX

#define DIE_LABEL_PREFIX   "DW"

◆ DUMP_GSTRUCT

#define DUMP_GSTRUCT ( type,
usage,
criterion,
generic,
matches,
result )    (result)

◆ DW_FORM_data

#define DW_FORM_data   (dwarf_offset_size == 8 ? DW_FORM_data8 : DW_FORM_data4)
Data and reference forms for relocatable data.   

Referenced by value_format().

◆ DW_FORM_ref

#define DW_FORM_ref   (dwarf_offset_size == 8 ? DW_FORM_ref8 : DW_FORM_ref4)

Referenced by value_format().

◆ DW_RANGES_IDX_SKELETON

#define DW_RANGES_IDX_SKELETON   ((1U << 31) - 1)

◆ DWARF2_ASM_LINE_DEBUG_INFO

#define DWARF2_ASM_LINE_DEBUG_INFO   0
Use assembler line directives if available.   

Referenced by dwarf2out_default_as_loc_support().

◆ DWARF2_ASM_VIEW_DEBUG_INFO

#define DWARF2_ASM_VIEW_DEBUG_INFO   0
Use assembler views in line directives if available.   

Referenced by dwarf2out_default_as_locview_support().

◆ DWARF2_DIR_SHOULD_END_WITH_SEPARATOR

#define DWARF2_DIR_SHOULD_END_WITH_SEPARATOR   0

◆ DWARF2_INDIRECT_STRING_SUPPORT_MISSING_ON_TARGET

#define DWARF2_INDIRECT_STRING_SUPPORT_MISSING_ON_TARGET   0

Referenced by find_string_form(), and output_macinfo().

◆ DWARF5_USE_DEBUG_LINE_STR

#define DWARF5_USE_DEBUG_LINE_STR
Value:
/* FIXME: there is no .debug_line_str.dwo section, \
for -gsplit-dwarf we should use DW_FORM_strx instead. @endverbatim */ \
#define DWARF2_INDIRECT_STRING_SUPPORT_MISSING_ON_TARGET
Definition dwarf2out.cc:130
#define DEBUG_STR_SECTION_FLAGS
Definition dwarf2out.cc:4200
Non-zero if .debug_line_str should be used for .debug_line section
strings or strings that are likely shareable with those.   

Referenced by asm_outputs_debug_line_str(), and output_file_names().

◆ DWARF_ARANGES_HEADER_SIZE

#define DWARF_ARANGES_HEADER_SIZE
Value:
#define DWARF2_ADDR_SIZE
Definition defaults.h:459
#define DWARF_ROUND(SIZE, BOUNDARY)
Definition dwarf2out.cc:199
#define DWARF_INITIAL_LENGTH_SIZE
Definition dwarf2out.cc:191
Fixed size portion of the address range info.   

Referenced by size_of_aranges().

◆ DWARF_ARANGES_PAD_SIZE

#define DWARF_ARANGES_PAD_SIZE
Value:
Size of padding portion in the address range info.  It must be
aligned to twice the pointer size.   

Referenced by output_aranges().

◆ DWARF_CIE_ID

#define DWARF_CIE_ID    (unsigned HOST_WIDE_INT) (dwarf_offset_size == 4 ? DW_CIE_ID : DW64_CIE_ID)
CIE identifier.   

Referenced by output_call_frame_info().

◆ DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE

#define DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE
Value:
#define DWARF_TYPE_SIGNATURE_SIZE
Definition defaults.h:472
#define DWARF_COMPILE_UNIT_HEADER_SIZE
Definition dwarf2out.cc:3328
Fixed size portion of the DWARF comdat type unit header.   

Referenced by output_comdat_type_unit().

◆ DWARF_COMPILE_UNIT_HEADER_SIZE

#define DWARF_COMPILE_UNIT_HEADER_SIZE
Value:
Information concerning the compilation unit's programming
language, and compiler version.   
Fixed size portion of the DWARF compilation unit header.   

Referenced by calc_base_type_die_sizes(), and output_comp_unit().

◆ DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE

#define DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE    (DWARF_COMPILE_UNIT_HEADER_SIZE + (dwarf_version >= 5 ? 8 : 0))
Fixed size portion of the DWARF skeleton compilation unit header.   

Referenced by calc_base_type_die_sizes(), output_comp_unit(), and output_skeleton_debug_sections().

◆ DWARF_INITIAL_LENGTH_SIZE

#define DWARF_INITIAL_LENGTH_SIZE   (dwarf_offset_size == 4 ? 4 : 12)
According to the (draft) DWARF 3 specification, the initial length
should either be 4 or 12 bytes.  When it's 12 bytes, the first 4
bytes are 0xffffffff, followed by the length stored in the next 8
bytes.

However, the SGI/MIPS ABI uses an initial length which is equal to
dwarf_offset_size.  It is defined (elsewhere) accordingly.   

Referenced by output_aranges(), output_call_frame_info(), output_compilation_unit_header(), output_fde(), output_line_info(), output_pubnames(), output_rnglists(), output_skeleton_debug_sections(), and prune_unmark_dies().

◆ DWARF_INITIAL_LENGTH_SIZE_STR

#define DWARF_INITIAL_LENGTH_SIZE_STR   (dwarf_offset_size == 4 ? "-4" : "-12")

◆ DWARF_LARGEST_DATA_FORM_BITS

#define DWARF_LARGEST_DATA_FORM_BITS    (dwarf_version >= 5 ? 128 : 64)
The number of bits that can be encoded by largest DW_FORM_dataN.
In DWARF4 and earlier it is DW_FORM_data8 with 64 bits, in DWARF5
DW_FORM_data16 with 128 bits.   

Referenced by output_die(), and size_of_die().

◆ DWARF_LINE_BASE

#define DWARF_LINE_BASE   -10
Minimum line offset in a special line info. opcode.
This value was chosen to give a reasonable range of values.   

Referenced by output_line_info(), and output_one_line_info_table().

◆ DWARF_LINE_DEFAULT_IS_STMT_START

#define DWARF_LINE_DEFAULT_IS_STMT_START   1
Flag that indicates the initial value of the is_stmt_start flag.
In the present implementation, we do not mark any lines as
the beginning of a source statement, because that information
is not made available by the GCC front-end.   

Referenced by output_line_info(), and output_one_line_info_table().

◆ DWARF_LINE_DEFAULT_MAX_OPS_PER_INSN

#define DWARF_LINE_DEFAULT_MAX_OPS_PER_INSN   1
Maximum number of operations per instruction bundle.   

Referenced by output_line_info().

◆ DWARF_LINE_OPCODE_BASE

#define DWARF_LINE_OPCODE_BASE   ((int)DW_LNS_set_isa + 1)
First special line opcode - leave room for the standard opcodes.   

Referenced by output_line_info(), and output_one_line_info_table().

◆ DWARF_LINE_RANGE

#define DWARF_LINE_RANGE   (254-DWARF_LINE_OPCODE_BASE+1)
Range of line offsets in a special line info. opcode.   

Referenced by output_line_info(), and output_one_line_info_table().

◆ DWARF_PUBNAMES_HEADER_SIZE

#define DWARF_PUBNAMES_HEADER_SIZE   (2 * dwarf_offset_size + 2)
Fixed size portion of public names info.   

Referenced by size_of_pubnames().

◆ DWARF_REF_SIZE

#define DWARF_REF_SIZE    (dwarf_version == 2 ? DWARF2_ADDR_SIZE : dwarf_offset_size)

◆ DWARF_ROUND

#define DWARF_ROUND ( SIZE,
BOUNDARY )    ((((SIZE) + (BOUNDARY) - 1) / (BOUNDARY)) * (BOUNDARY))
Round SIZE up to the nearest BOUNDARY.   

◆ EPILOGUE_BEGIN_LABEL

#define EPILOGUE_BEGIN_LABEL   "LEB"

◆ FDE_AFTER_SIZE_LABEL

#define FDE_AFTER_SIZE_LABEL   "LASFDE"

Referenced by output_fde().

◆ FDE_END_LABEL

#define FDE_END_LABEL   "LEFDE"

Referenced by output_fde().

◆ FDE_LABEL

#define FDE_LABEL   "LSFDE"

Referenced by output_die(), and output_fde().

◆ FOR_EACH_CHILD

◆ FORCE_RESET_NEXT_VIEW

#define FORCE_RESET_NEXT_VIEW ( x)    ((x) = (var_loc_view)-1)

◆ FORCE_RESETTING_VIEW_P

#define FORCE_RESETTING_VIEW_P ( x)    ((x) == (var_loc_view)-1)

◆ FRAME_BEGIN_LABEL

#define FRAME_BEGIN_LABEL   "Lframe"

Referenced by output_call_frame_info().

◆ FUNC_BEGIN_LABEL

#define FUNC_BEGIN_LABEL   "LFB"

◆ FUNC_END_LABEL

#define FUNC_END_LABEL   "LFE"

◆ FUNC_SECOND_SECT_LABEL

#define FUNC_SECOND_SECT_LABEL   "LFSB"

◆ have_macinfo

#define have_macinfo
Value:
&& !macinfo_table->is_empty ())
#define HAVE_XCOFF_DWARF_EXTRAS
Definition dwarf2out.cc:114
static vec< macinfo_entry, va_gc > * macinfo_table
Definition dwarf2out.cc:3685
#define XCOFF_DEBUGGING_INFO
Definition dwarf2out.cc:110
@ DINFO_LEVEL_VERBOSE
Definition flag-types.h:63
True if .debug_macinfo or .debug_macros section is going to be
emitted.   

◆ HAVE_XCOFF_DWARF_EXTRAS

#define HAVE_XCOFF_DWARF_EXTRAS   0

◆ LINE_CODE_LABEL

#define LINE_CODE_LABEL   "LM"

◆ LINE_NUMBER_BEGIN_LABEL

#define LINE_NUMBER_BEGIN_LABEL   "LSLT"

Referenced by output_line_info().

◆ LINE_NUMBER_END_LABEL

#define LINE_NUMBER_END_LABEL   "LELT"

Referenced by output_line_info().

◆ LN_PROLOG_AS_LABEL

#define LN_PROLOG_AS_LABEL   "LASLTP"

Referenced by output_line_info().

◆ LN_PROLOG_END_LABEL

#define LN_PROLOG_END_LABEL   "LELTP"

Referenced by output_line_info().

◆ MAX_ARTIFICIAL_LABEL_BYTES

◆ NO_INDEX_ASSIGNED

◆ NOT_INDEXED

#define NOT_INDEXED   (-1U)
A vector for a table that contains frame description
information for each routine.   

Referenced by AT_index(), count_index_addrs(), count_index_strings(), output_attr_index_or_value(), set_indirect_string(), size_of_die(), and value_format().

◆ PROLOGUE_END_LABEL

#define PROLOGUE_END_LABEL   "LPE"

◆ PTR_SIZE

#define PTR_SIZE   (POINTER_SIZE / BITS_PER_UNIT)
??? Poison these here until it can be done generically.  They've been
totally replaced in this file; make sure it stays that way.   
The size of the target's pointer type.   

Referenced by output_call_frame_info(), output_fde(), and switch_to_eh_frame_section().

◆ RELOCATED_OFFSET

#define RELOCATED_OFFSET   (NULL)

◆ RESET_NEXT_VIEW

#define RESET_NEXT_VIEW ( x)    ((x) = (var_loc_view)0)

◆ RESETTING_VIEW_P

#define RESETTING_VIEW_P ( x)    ((x) == (var_loc_view)0 || FORCE_RESETTING_VIEW_P (x))

◆ SKELETON_COMP_DIE_ABBREV

#define SKELETON_COMP_DIE_ABBREV   1

◆ SKELETON_TYPE_DIE_ABBREV

#define SKELETON_TYPE_DIE_ABBREV   2

◆ TEXT_END_LABEL

#define TEXT_END_LABEL   "Letext"

◆ TEXT_SECTION_LABEL

#define TEXT_SECTION_LABEL   "Ltext"
Labels we insert at beginning sections we can reference instead of
the section names themselves.   

◆ TYPE_DECL_IS_STUB

#define TYPE_DECL_IS_STUB ( decl)
Value:
/* This is necessary for stub decls that \
appear in nested inline functions. @endverbatim */ \
static tree decl_ultimate_origin(const_tree)
Definition dwarf2out.cc:4459
Definition genautomata.cc:499
#define DECL_NAME(NODE)
Definition tree.h:2681
#define TYPE_STUB_DECL(NODE)
Definition tree.h:2358
#define DECL_ABSTRACT_ORIGIN(NODE)
Definition tree.h:2746
#define DECL_ARTIFICIAL(NODE)
Definition tree.h:2889
#define TREE_TYPE(NODE)
Definition tree.h:512
#define NULL_TREE
Definition tree.h:317
Define a macro which returns nonzero for a TYPE_DECL which was
implicitly generated for a type.

Note that, unlike the C front-end (which generates a NULL named
TYPE_DECL node for each complete tagged type, each array type,
and each function type node created) the C++ front-end generates
a _named_ TYPE_DECL node for each tagged type node created.
These TYPE_DECLs have DECL_ARTIFICIAL set, so we know not to
generate a DW_TAG_typedef DIE for them.  Likewise with the Ada
front-end, but for each type, tagged or not.   

◆ UNRELOCATED_OFFSET

#define UNRELOCATED_OFFSET   ((addr_table_entry *) 1)
Add a range_list attribute value to a DIE.  When using
dwarf_split_debug_info, address attributes in dies destined for the
final executable should be direct references--setting the parameter
force_direct ensures this behavior.   

Referenced by add_AT_range_list().

◆ use_debug_types

#define use_debug_types
Value:
NOTE: In the comments in this file, many references are made to
"Debugging Information Entries".  This term is abbreviated as `DIE'
throughout the remainder of this file.   
An internal representation of the DWARF output is built, and then
walked to generate the DWARF debugging info.  The walk of the internal
representation is done after the entire program has been compiled.
The types below are used to describe the internal representation.   
Whether to put type DIEs into their own section .debug_types instead
of making them part of the .debug_info section.  Only supported for
Dwarf V4 or higher and the user didn't disable them through
-fno-debug-types-section.  It is more efficient to put them in a
separate comdat sections since the linker will then be able to
remove duplicates.  But not all tools support .debug_types sections
yet.  For Dwarf V5 or higher .debug_types doesn't exist any more,
it is DW_UT_type unit type in .debug_info section.  For late LTO
debug there should be almost no types emitted so avoid enabling
-fdebug-types-section there.   

Referenced by modified_type_die(), and unmark_dies().

◆ XCOFF_DEBUGGING_INFO

◆ ZERO_VIEW_P

#define ZERO_VIEW_P ( N)
Value:
((N) == (var_loc_view)0 \
|| (N) == (var_loc_view)-1 \
unsigned int var_loc_view
Definition dwarf2out.cc:1365
static bitmap zero_view_p
Definition dwarf2out.cc:3408
#define bitmap_bit_p(bitstring, bitno)
Definition genautomata.cc:3429
#define N
Definition gensupport.cc:202
Evaluate to TRUE iff N is known to identify the first location view
at its PC.  When not using assembler location view computation,
that must be view number zero.  Otherwise, ZERO_VIEW_P is allocated
and views label numbers recorded in it are the ones known to be
zero.   

Referenced by dw_loc_list(), dwarf2out_maybe_output_loclist_view_pair(), loc_list_has_views(), and output_loc_list().

Typedef Documentation

◆ cached_dw_loc_list

◆ decl_hash_type

◆ die_arg_entry

◆ die_node

The Debugging Information Entry (DIE) structure.  DIEs form a tree.
The children of each node form a circular list linked by
die_sib.  die_child points to the node *before* the "first" child node.   

◆ dw_line_info_entry

◆ dw_loc_list_node

Location lists are ranges + location descriptions for that range,
so you can track variables that are in different places over
their entire life.   

◆ dw_offset

Various DIE's use offsets relative to the beginning of the
.debug_info section to refer to each other.   

◆ external_ref_hash_type

◆ limbo_die_node

A list of DIEs for which we can't determine ancestry (parent_die
field) just yet.  Later in dwarf2out_finish we will fill in the
missing bits.   

◆ loc_list_hash_type

◆ macinfo_entry

A structure to hold a macinfo entry.   

◆ macinfo_hash_type

◆ pubname_entry

The pubname structure  

◆ skeleton_chain_node

◆ var_loc_list

◆ var_loc_view

Enumeration Type Documentation

◆ ate_kind

And now, the subset of the debugging information support code necessary
for emitting location expressions.   
Describe an entry into the .debug_addr section.   
Enumerator
ate_kind_rtx 
ate_kind_rtx_dtprel 
ate_kind_label 

◆ dtprel_bool

enum for tracking thread-local variables whose address is really an offset
relative to the TLS pointer, which will need link-time relocation, but will
not need relocation by the DWARF consumer.   
Enumerator
dtprel_false 
dtprel_true 

◆ dw_line_info_opcode

The entries in the line_info table more-or-less mirror the opcodes
that are used in the real dwarf line table.  Arrays of these entries
are collected per section when DWARF2_ASM_LINE_DEBUG_INFO is not
supported.   
Enumerator
LI_set_address 
LI_set_line 
LI_set_file 
LI_set_column 
LI_negate_stmt 
LI_set_prologue_end 
LI_set_epilogue_begin 
LI_set_discriminator 
LI_adv_address 

◆ dw_scalar_form

Flags to represent a set of attribute classes for attributes that represent
a scalar value (bounds, pointers, ...).   
Enumerator
dw_scalar_form_constant 
dw_scalar_form_exprloc 
dw_scalar_form_reference 

Function Documentation

◆ add_abstract_origin_attribute()

static void add_abstract_origin_attribute ( dw_die_ref die,
tree origin )
inlinestatic
Add an 'abstract_origin' attribute below a given DIE.  The DIE is found
by looking in the type declaration, the object declaration equate table or
the block mapping.   

References add_AT_unsigned(), DECL_BIT_FIELD_TYPE, DECL_SIZE, gcc_assert, ggc_alloc(), TREE_CODE, tree_fits_uhwi_p(), and tree_to_uhwi().

Referenced by gen_field_die(), and record_type_tag().

◆ add_accessibility_attribute()

static void add_accessibility_attribute ( dw_die_ref die,
tree decl )
static
Add DW_AT_accessibility attribute to DIE if needed.   

References add_AT_unsigned(), die_struct::die_parent, die_struct::die_tag, ggc_alloc(), NULL, TREE_PRIVATE, and TREE_PROTECTED.

◆ add_addr_table_entry()

static addr_table_entry * add_addr_table_entry ( void * addr,
enum ate_kind kind )
static

◆ add_alignment_attribute()

static void add_alignment_attribute ( dw_die_ref die,
tree tree_node )
static
Add a DW_AT_alignment attribute to DIE with TREE_NODE's non-default
alignment.   

Referenced by base_type_die(), modified_type_die(), and subrange_type_die().

◆ add_AT_addr()

static void add_AT_addr ( dw_die_ref die,
enum dwarf_attribute attr_kind,
rtx addr,
bool force_direct )
inlinestatic
Add an address constant attribute value to a DIE.  When using
dwarf_split_debug_info, address attributes in dies destined for the
final executable should be direct references--setting the parameter
force_direct ensures this behavior.   

References add_addr_table_entry(), add_dwarf_attr(), ate_kind_rtx, dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_addr, ggc_alloc(), NULL, dw_val_node::v, dw_val_node::dw_val_struct_union::val_addr, dw_val_node::val_class, and dw_val_node::val_entry.

Referenced by gen_subprogram_die().

◆ add_AT_data8() [1/2]

◆ add_AT_data8() [2/2]

static void add_AT_data8 ( dw_die_ref ,
enum dwarf_attribute,
unsigned char *  )
static

Referenced by generate_type_signature().

◆ add_AT_die_ref()

◆ add_AT_double()

◆ add_AT_external_die_ref()

static void add_AT_external_die_ref ( dw_die_ref die,
enum dwarf_attribute attr_kind,
const char * symbol,
HOST_WIDE_INT offset )
static

◆ add_AT_file()

◆ add_AT_flag() [1/2]

◆ add_AT_flag() [2/2]

◆ add_AT_int()

◆ add_AT_lbl_id()

◆ add_AT_lineptr()

static void add_AT_lineptr ( dw_die_ref die,
enum dwarf_attribute attr_kind,
const char * label )
inlinestatic

◆ add_AT_loc()

◆ add_AT_loc_list()

◆ add_AT_location_description()

static void add_AT_location_description ( dw_die_ref die,
enum dwarf_attribute attr_kind,
dw_loc_list_ref descr )
inlinestatic
The following routines define various Dwarf attributes and any data
associated with them.   
Add a location description attribute value to a DIE.

This emits location attributes suitable for whole variables and
whole parameters.  Note that the location attributes for struct fields are
generated by the routine `data_member_location_attribute' below.   

References add_AT_loc(), add_AT_loc_list(), add_AT_view_list(), dwarf2out_locviews_in_attribute(), gcc_assert, get_AT(), ggc_alloc(), and single_element_loc_list_p().

Referenced by add_location_or_const_value_attribute().

◆ add_AT_low_high_pc()

static void add_AT_low_high_pc ( dw_die_ref die,
const char * lbl_low,
const char * lbl_high,
bool force_direct )
inlinestatic
Add DW_AT_low_pc and DW_AT_high_pc to a DIE.  When using
dwarf_split_debug_info, address attributes in dies destined for the
final executable have force_direct set to avoid using indexed
references.   

References add_addr_table_entry(), add_dwarf_attr(), ate_kind_label, dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_high_pc, dw_val_class_lbl_id, ggc_alloc(), NULL, dw_val_node::v, dw_val_node::val_class, dw_val_node::val_entry, and dw_val_node::dw_val_struct_union::val_lbl_id.

◆ add_AT_macptr()

static void add_AT_macptr ( dw_die_ref die,
enum dwarf_attribute attr_kind,
const char * label )
inlinestatic

◆ add_AT_pubnames()

static void add_AT_pubnames ( dw_die_ref die)
static
Add the DW_AT_GNU_pubnames and DW_AT_GNU_pubtypes attributes.   

References add_AT_flag(), ggc_alloc(), and want_pubnames().

Referenced by add_top_level_skeleton_die_attrs().

◆ add_AT_range_list() [1/2]

◆ add_AT_range_list() [2/2]

static void add_AT_range_list ( dw_die_ref ,
enum dwarf_attribute,
unsigned long ,
bool  )
static

Referenced by add_ranges_by_labels().

◆ add_AT_specification()

static void add_AT_specification ( dw_die_ref die,
dw_die_ref targ_die )
inlinestatic
Add an AT_specification attribute to a DIE, and also make the back
pointer from the specification to the definition.   

References add_AT_die_ref(), gcc_assert, and ggc_alloc().

Referenced by copy_declaration_context().

◆ add_AT_string()

◆ add_AT_symview()

◆ add_AT_unsigned()

◆ add_AT_vec()

◆ add_AT_view_list()

◆ add_AT_wide()

◆ add_bit_offset_attribute()

static void add_bit_offset_attribute ( dw_die_ref die,
tree decl )
inlinestatic
For a FIELD_DECL node which represents a bit-field, output an attribute
which specifies the distance in bits from the highest order bit of the
"containing object" for the bit-field to the highest order bit of the
bit-field itself.

For any given bit-field, the "containing object" is a hypothetical object
(of some integral or enum type) within which the given bit-field lives.  The
type of this hypothetical "containing object" is always the same as the
declared type of the individual bit-field itself.  The determination of the
exact location of the "containing object" for a bit-field is rather
complicated.  It's handled by the `field_byte_offset' function (above).

Note that it is the size (in bytes) of the hypothetical "containing object"
which will be given in the DW_AT_byte_size attribute for this bit-field.
(See `byte_size_attribute' above).   

References DECL_ALIGN_UNIT, DECL_USER_ALIGN, and ggc_alloc().

◆ add_bit_size_attribute()

static void add_bit_size_attribute ( dw_die_ref die,
tree decl )
inlinestatic
For a FIELD_DECL node which represents a bit field, output an attribute
which specifies the length in bits of the given field.   

◆ add_bound_info()

static void add_bound_info ( dw_die_ref subrange_die,
enum dwarf_attribute bound_attr,
tree bound,
struct loc_descr_context * context )
static
Given a tree node describing an array bound (either lower or upper) output
a representation for that bound.   

References comp_unit_die(), get_AT_unsigned(), and ggc_alloc().

Referenced by subrange_type_die().

◆ add_byte_size_attribute()

static void add_byte_size_attribute ( dw_die_ref die,
tree tree_node )
static
Add a DW_AT_byte_size attribute to DIE with TREE_NODE's size.   

◆ add_call_src_coords_attributes()

static void add_call_src_coords_attributes ( tree stmt,
dw_die_ref die )
inlinestatic
A helper function for gen_inlined_subroutine_die.  Add source coordinate
attributes to the DIE for a block STMT, to describe where the inlined
function was called from.  This is similar to add_src_coords_attributes.   

Referenced by gen_field_die().

◆ add_calling_convention_attribute()

static void add_calling_convention_attribute ( dw_die_ref subr_die,
tree decl )
static
Given an object die, add the calling convention attribute for the
function call type.   

References DINFO_LEVEL_TERSE, ggc_alloc(), modified_type_die(), NULL, TREE_CODE, TREE_TYPE, TYPE_NAME, and TYPE_QUALS.

◆ add_child_die()

◆ add_child_die_after()

static void add_child_die_after ( dw_die_ref die,
dw_die_ref child_die,
dw_die_ref after_die )
static
Like add_child_die, but put CHILD_DIE after AFTER_DIE.   

References die_struct::die_child, gcc_assert, and ggc_alloc().

Referenced by modified_type_die().

◆ add_comp_dir_attribute()

static void add_comp_dir_attribute ( dw_die_ref )
static

◆ add_const_value_attribute()

static bool add_const_value_attribute ( dw_die_ref die,
machine_mode mode,
rtx rtl )
static

◆ add_data_member_location_attribute()

static void add_data_member_location_attribute ( dw_die_ref die,
tree decl,
struct vlr_context * ctx )
static
Attach the specialized form of location attribute used for data members of
struct and union types.  In the special case of a FIELD_DECL node which
represents a bit-field, the "offset" part of this special location
descriptor must indicate the distance in bytes from the lowest-addressed
byte of the containing struct or union type to the lowest-addressed byte of
the "containing object" for the bit-field.  (See the `field_byte_offset'
function above).

For any given bit-field, the "containing object" is a hypothetical object
(of some integral or enum type) within which the given bit-field lives.  The
type of this hypothetical "containing object" is always the same as the
declared type of the individual bit-field itself (for GCC anyway... the
DWARF spec doesn't actually mandate this).  Note that it is the size (in
bytes) of the hypothetical "containing object" which will be given in the
DW_AT_byte_size attribute for this bit-field.  (See the
`byte_size_attribute' function below.)  It is also used when calculating the
value of the DW_AT_bit_offset attribute.  (See the `bit_offset_attribute'
function below.)

CTX is required: see the comment for VLR_CONTEXT.   

References add_AT_int(), add_AT_loc(), add_AT_unsigned(), add_loc_descr(), BINFO_OFFSET, BINFO_VIRTUAL_P, BINFO_VPTR_FIELD, bit_from_pos(), bit_position(), DECL_BIT_FIELD_TYPE, DWARF_GNAT_ENCODINGS_ALL, field_byte_offset(), gcc_assert, get_AT(), ggc_alloc(), int_loc_descriptor(), is_cxx(), new_loc_descr(), NULL, NULL_TREE, offset, remove_AT(), TREE_CODE, tree_fits_uhwi_p(), tree_to_shwi(), tree_to_uhwi(), and vlr_context::variant_part_offset.

◆ add_desc_attribute() [1/2]

static void add_desc_attribute ( dw_die_ref die,
const char * name_string )
static
Generate a DW_AT_description attribute given some string value to be included
as the value of the attribute.   

References add_AT_string(), demangle_name_func, ggc_alloc(), and NULL.

◆ add_desc_attribute() [2/2]

static void add_desc_attribute ( dw_die_ref die,
tree decl )
static
Generate a DW_AT_description attribute given some decl to be included
as the value of the attribute.   

References add_desc_attribute(), DECL_NAME, DECL_P, dwarf2_name(), free(), ggc_alloc(), IDENTIFIER_POINTER, NULL, NULL_TREE, and print_generic_expr_to_str().

Referenced by add_desc_attribute(), add_discr_value(), and maybe_create_die_with_external_ref().

◆ add_discr_list()

static void add_discr_list ( dw_die_ref die,
dw_discr_list_ref discr_list )
static
Add DISCR_LIST as a DW_AT_discr_list to DIE.   

◆ add_discr_value()

static void add_discr_value ( dw_die_ref die,
dw_discr_value * value )
static

◆ add_dwarf_attr()

◆ add_enumerator_pubname()

static void add_enumerator_pubname ( const char * scope_name,
dw_die_ref die )
static
Add an enumerator to the pubnames section.   

References pubname_struct::die, gcc_assert, get_AT_string(), ggc_alloc(), pubname_struct::name, NULL, pubname_table, and vec_safe_push().

Referenced by add_pubtype().

◆ add_filename_attribute()

static void add_filename_attribute ( dw_die_ref die,
const char * name_string )
static
Generate a DW_AT_name attribute given some string value representing a
file or filepath to be included as value of the attribute.   

References add_filepath_AT_string(), ggc_alloc(), and NULL.

◆ add_filepath_AT_string()

◆ add_gnat_descriptive_type_attribute()

static void add_gnat_descriptive_type_attribute ( dw_die_ref die,
tree type,
dw_die_ref context_die )
static
Retrieve the descriptive type of TYPE, if any, make sure it has a
DIE and attach a DW_AT_GNAT_descriptive_type attribute to the DIE
of TYPE accordingly.

??? This is a temporary measure until after we're able to generate
regular DWARF for the complex Ada type system.   

References add_AT_die_ref(), lang_hooks_for_types::descriptive_type, gcc_assert, gen_type_die(), ggc_alloc(), lookup_type_die(), and lang_hooks::types.

Referenced by modified_type_die().

◆ add_high_low_attributes()

static void add_high_low_attributes ( tree stmt,
dw_die_ref die )
inlinestatic
A helper function for gen_lexical_block_die and gen_inlined_subroutine_die.
Add low_pc and high_pc attributes to the DIE for a block STMT.   

References add_AT_lbl_id(), CODE_LABEL_NUMBER, and ggc_alloc().

Referenced by gen_field_die().

◆ add_linkage_attr()

static void add_linkage_attr ( dw_die_ref die,
tree decl )
static
Add a DW_AT_linkage_name or DW_AT_MIPS_linkage_name attribute for the
given decl.  This used to be a vendor extension until after DWARF 4
standardized it.   

References a, add_AT_die_ref(), AT_ref(), get_AT(), and ggc_alloc().

◆ add_linkage_name()

static void add_linkage_name ( dw_die_ref die,
tree decl )
static
Add DW_AT_{,MIPS_}linkage_name attribute for the given decl if desired.   

References add_AT_file(), add_AT_unsigned(), DECL_SOURCE_LOCATION, expand_location(), ggc_alloc(), LOCATION_LOCUS, lookup_filename(), and UNKNOWN_LOCATION.

◆ add_linkage_name_raw()

static void add_linkage_name_raw ( dw_die_ref die,
tree decl )
static
Add DW_AT_{,MIPS_}linkage_name attribute for the given decl.   

◆ add_loc_descr()

◆ add_loc_descr_op_piece()

static void add_loc_descr_op_piece ( dw_loc_descr_ref * list_head,
int size )
static
Optionally add a DW_OP_piece term to a location description expression.
DW_OP_piece is only added if the location description expression already
doesn't end with DW_OP_piece.   

References dw_loc_descr_node::dw_loc_next, dw_loc_descr_node::dw_loc_opc, ggc_alloc(), new_loc_descr(), and NULL.

Referenced by concat_loc_descriptor(), concatn_loc_descriptor(), loc_descriptor(), and multiple_reg_loc_descriptor().

◆ add_loc_descr_to_each()

◆ add_loc_list()

static void add_loc_list ( dw_loc_list_ref * ret,
dw_loc_list_ref list )
static
Given two lists RET and LIST
produce location list that is result of adding expression in LIST
to expression in RET on each position in program.
Might be destructive on both RET and LIST.

TODO: We handle only simple cases of RET or LIST having at most one
element.  General case would involve sorting the lists in program order
and merging them that will need some additional work.
Adding that will improve quality of debug info especially for SRA-ed
structures.   

References add_loc_descr_to_each(), dw_loc_list_struct::dw_loc_next, expansion_failed(), dw_loc_list_struct::expr, ggc_alloc(), NULL, NULL_RTX, NULL_TREE, and prepend_loc_descr_to_each().

Referenced by loc_list_for_address_of_addr_expr_of_indirect_ref(), loc_list_from_tree_1(), loc_list_from_uint_comparison(), and typed_binop_from_tree().

◆ add_location_or_const_value_attribute()

static bool add_location_or_const_value_attribute ( dw_die_ref die,
tree decl,
bool cache_p )
static
Generate *either* a DW_AT_location attribute or else a DW_AT_const_value
data attribute for a variable or a parameter.  We generate the
DW_AT_const_value attribute only in those cases where the given variable
or parameter does not have a true "location" either in memory or in a
register.  This can happen (for example) when a constant is passed as an
actual argument in a call to an inline function.  (It's possible that
these things can crop up in other ways also.)  Note that one type of
constant value which can be passed into an inlined function is a constant
pointer.  This can happen for example if an actual argument in an inlined
function call evaluates to a compile-time constant address.

CACHE_P is true if it is worth caching the location list for DECL,
so that future calls can reuse it rather than regenerate it from scratch.
This is true for BLOCK_NONLOCALIZED_VARS in inlined subroutines,
since we will need to refer to them each time the function is inlined.   

References add_AT_location_description(), add_const_value_attribute(), cache, cached_dw_loc_list_table, CONSTANT_P, decl_by_reference_p(), DECL_MODE, DECL_UID, dw_loc_list_struct::dw_loc_next, early_dwarf, var_loc_list_def::first, gcc_assert, get_AT(), GET_CODE, ggc_alloc(), var_loc_node::loc, loc_list_from_tree(), lookup_decl_loc(), var_loc_node::next, NOTE_P, NOTE_VAR_LOCATION, NOTE_VAR_LOCATION_LOC, NULL, rtl_for_decl_location(), tree_add_const_value_attribute_for_decl(), TREE_CODE, VAR_P, and XEXP.

◆ add_name_and_src_coords_attributes()

static void add_name_and_src_coords_attributes ( dw_die_ref die,
tree decl,
bool no_linkage_name )
static
Add a DW_AT_name attribute and source coordinate attribute for the
given decl, but only if it actually has a name.   

Referenced by record_type_tag(), and template_parameter_pack_die().

◆ add_name_attribute()

void add_name_attribute ( dw_die_ref die,
const char * name_string )
Generate a DW_AT_name attribute given some string value to be included as
the value of the attribute.   

References add_AT_string(), demangle_name_func, ggc_alloc(), and NULL.

Referenced by add_discr_value(), ctf_debug_init(), gen_block_die(), gen_type_die(), and modified_type_die().

◆ add_prototyped_attribute()

static void add_prototyped_attribute ( dw_die_ref die,
tree func_type )
inlinestatic
If the compiled language is ANSI C, then add a 'prototyped'
attribute, if arg types are given for the parameters of a function.   

References DECL_SIZE, ggc_alloc(), simple_type_size_in_bits(), and tree_to_shwi().

◆ add_pubname()

◆ add_pubname_string()

static void add_pubname_string ( const char * str,
dw_die_ref die )
static
Add a new entry to .debug_pubnames if appropriate.   

References pubname_struct::die, pubname_struct::name, pubname_table, and vec_safe_push().

Referenced by add_pubname().

◆ add_pubtype()

◆ add_pure_or_virtual_attribute()

static void add_pure_or_virtual_attribute ( dw_die_ref die,
tree func_decl )
inlinestatic
We do not currently support the pure_virtual attribute.   

References add_AT_external_die_ref(), ggc_alloc(), sym_off_pair::off, and sym_off_pair::sym.

◆ add_ranges()

static unsigned int add_ranges ( const_tree block,
bool maybe_new_sec )
static
Add a new entry to .debug_ranges corresponding to a block, or a
range terminator if BLOCK is NULL.  MAYBE_NEW_SEC is true if
this entry might be in a different section from previous range.   

References add_ranges_num(), and BLOCK_NUMBER.

◆ add_ranges_by_labels()

static void add_ranges_by_labels ( dw_die_ref die,
const char * begin,
const char * end,
bool * added,
bool force_direct )
static
Add a new entry to .debug_ranges corresponding to a pair of labels.
When using dwarf_split_debug_info, address attributes in dies destined
for the final executable should be direct references--setting the
parameter force_direct ensures this behavior.   

References add_AT_range_list(), add_ranges_num(), begin(), DW_RANGES_IDX_SKELETON, end(), ggc_alloc(), note_rnglist_head(), offset, ranges_by_label, vec_safe_length(), and vec_safe_push().

◆ add_ranges_num()

static unsigned int add_ranges_num ( int num,
bool maybe_new_sec )
static
Add a new entry to .debug_ranges.  Return its index into
ranges_table vector.   

References NULL, r, ranges_table, vec_safe_length(), and vec_safe_push().

Referenced by add_ranges(), and add_ranges_by_labels().

◆ add_scalar_info()

static void add_scalar_info ( dw_die_ref ,
enum dwarf_attribute,
tree ,
int ,
struct loc_descr_context *  )
static

Referenced by base_type_die(), and subrange_type_die().

◆ add_sibling_attributes()

static void add_sibling_attributes ( dw_die_ref die)
static
Traverse the DIE and add a sibling attribute if it may have the
effect of speeding up access to siblings.  To save some space,
avoid generating sibling attributes for DIE's without children.   

References add_AT_die_ref(), add_sibling_attributes(), die_struct::die_child, die_struct::die_parent, die_struct::die_sib, FOR_EACH_CHILD, and ggc_alloc().

Referenced by add_sibling_attributes().

◆ add_skeleton_AT_string()

◆ add_src_coords_attributes()

static void add_src_coords_attributes ( dw_die_ref die,
tree decl )
static

◆ add_subscript_info()

static void add_subscript_info ( dw_die_ref type_die,
tree type,
bool collapse_p )
static
Add subscript info to TYPE_DIE, describing an array TYPE, collapsing
possibly nested array subscripts in a flat sequence if COLLAPSE_P is true.

This function reuses previously set type and bound information if
available.   

◆ add_top_level_skeleton_die_attrs()

static void add_top_level_skeleton_die_attrs ( dw_die_ref die)
static
Helper function to generate top-level dies for skeleton debug_info and
debug_types.   

References add_AT_lineptr(), add_AT_pubnames(), add_skeleton_AT_string(), addr_index_table, comp_dir_string(), debug_addr_section_label, dwarf_AT(), ggc_alloc(), and NULL.

◆ add_type_attribute()

static void add_type_attribute ( dw_die_ref object_die,
tree type,
int cv_quals,
bool reverse,
dw_die_ref context_die )
static
Many forms of DIEs require a "type description" attribute.  This
routine locates the proper "type descriptor" die for the type given
by 'type' plus any additional qualifiers given by 'cv_quals', and
adds a DW_AT_type attribute below the given die.   

References ggc_alloc().

Referenced by generic_parameter_die(), and record_type_tag().

◆ add_var_loc_to_decl()

◆ address_of_int_loc_descriptor()

static dw_loc_descr_ref address_of_int_loc_descriptor ( int size,
HOST_WIDE_INT i )
static
Return loc description representing "address" of integer value.
This can appear only as toplevel expression.   

References add_loc_descr(), dw_val_class_const, DWARF2_ADDR_SIZE, ggc_alloc(), i, int_loc_descriptor(), new_loc_descr(), NULL, and size_of_int_loc_descriptor().

Referenced by loc_descriptor(), and loc_list_from_tree_1().

◆ adjust_name_comp_dir()

static void adjust_name_comp_dir ( dw_die_ref die)
static
reset_indirect_string removed the references coming from DW_AT_name
and DW_AT_comp_dir attributes on compilation unit DIEs.  Readd them as
.debug_line_str strings again.   

◆ adjust_piece_list()

static void adjust_piece_list ( rtx * dest,
rtx * src,
rtx * inner,
HOST_WIDE_INT bitpos,
HOST_WIDE_INT piece_bitpos,
HOST_WIDE_INT bitsize,
rtx loc_note )
static
This function either modifies location piece list *DEST in
place (if SRC and INNER is NULL), or copies location piece list
*SRC to *DEST while modifying it.  Location BITPOS is modified
to contain LOC_NOTE, any pieces overlapping it are removed resp.
not copied and if needed some padding around it is added.
When modifying in place, DEST should point to EXPR_LIST where
earlier pieces cover PIECE_BITPOS bits, when copying SRC points
to the start of the whole list and INNER points to the EXPR_LIST
where earlier pieces cover PIECE_BITPOS bits.   

References decl_piece_bitsize(), decl_piece_node(), decl_piece_varloc_ptr(), free_EXPR_LIST_node(), gcc_assert, ggc_alloc(), NULL, NULL_RTX, and XEXP.

Referenced by add_var_loc_to_decl().

◆ alloc_dw_wide_int()

◆ analyze_discr_in_predicate()

static tree analyze_discr_in_predicate ( tree operand,
tree struct_type )
static
Check that OPERAND is a reference to a field in STRUCT_TYPE.  If it is,
return the FIELD_DECL.  Return NULL_TREE otherwise.   

◆ analyze_variants_discr()

static void analyze_variants_discr ( tree variant_part_decl,
tree struct_type,
tree * discr_decl,
dw_discr_list_ref ** discr_lists_p,
unsigned * discr_lists_length )
static
Try to extract synthetic properties out of VARIANT_PART_DECL, which is a
FIELD_DECL in STRUCT_TYPE that represents a variant part.  If unsuccessful,
store NULL_TREE in DISCR_DECL.  Otherwise:

  - store the discriminant field in STRUCT_TYPE that controls the variant
    part to *DISCR_DECL

  - put in *DISCR_LISTS_P an array where for each variant, the item
    represents the corresponding matching list of discriminant values.

  - put in *DISCR_LISTS_LENGTH the number of variants, which is the size of
    the above array.

Note that when the array is allocated (i.e. when the analysis is
successful), it is up to the caller to free the array.   

◆ append_entry_to_tmpl_value_parm_die_table()

static void append_entry_to_tmpl_value_parm_die_table ( dw_die_ref die,
tree arg )
static
Schedule generation of a DW_AT_const_value attribute to DIE.
That generation should happen after function debug info has been
generated. The value of the attribute is the constant value of ARG.   

Referenced by generic_parameter_die().

◆ asm_outputs_debug_line_str()

static bool asm_outputs_debug_line_str ( void )
static
Returns TRUE if we are outputting DWARF5 and the assembler supports
DWARF5 .debug_line tables using .debug_line_str or we generate
it ourselves, except for split-dwarf which doesn't have a
.debug_line_str.   

References DWARF5_USE_DEBUG_LINE_STR, ggc_alloc(), and output_asm_line_debug_info().

Referenced by add_filepath_AT_string().

◆ assign_location_list_indexes()

◆ AT_addr()

static rtx AT_addr ( dw_attr_node * a)
inlinestatic
Get the RTX from to an address DIE attribute.   

References a, AT_class(), dw_val_class_addr, and gcc_assert.

Referenced by attr_checksum(), attr_checksum_ordered(), and output_attr_index_or_value().

◆ AT_class()

◆ AT_discr_list()

static dw_discr_list_ref AT_discr_list ( dw_attr_node * attr)
inlinestatic

◆ AT_file()

static struct dwarf_file_data * AT_file ( dw_attr_node * a)
inlinestatic
Get the dwarf_file_data from a file DIE attribute.   

References a, AT_class(), dw_val_class_file, dw_val_class_file_implicit, and gcc_assert.

Referenced by attr_checksum(), attr_checksum_ordered(), and get_AT_file().

◆ AT_flag()

static unsigned AT_flag ( dw_attr_node * a)
inlinestatic

References a, AT_class(), dw_val_class_flag, and gcc_assert.

Referenced by get_AT_flag(), and output_die().

◆ AT_index()

static unsigned int AT_index ( dw_attr_node * a)
inlinestatic
Return the index for any attribute that will be referenced with a
DW_FORM_addrx/GNU_addr_index or DW_FORM_strx/GNU_str_index.  String
indices are stored in dw_attr_val.v.val_str for reference counting
pruning.   

References a, AT_class(), dw_val_class_str, NOT_INDEXED, and NULL.

Referenced by output_attr_index_or_value(), output_die(), size_of_die(), and value_format().

◆ AT_int()

◆ AT_lbl()

◆ AT_loc()

◆ AT_loc_list()

◆ AT_loc_list_ptr()

static dw_loc_list_ref * AT_loc_list_ptr ( dw_attr_node * a)
inlinestatic
Return a pointer to the location list referenced by the attribute.
If the named attribute is a view list, look up the corresponding
DW_AT_location attribute and return its location list.   

References a, AT_class(), AT_loc_list_ptr(), dw_val_class_loc_list, dw_val_class_view_list, gcc_assert, gcc_checking_assert, gcc_unreachable, get_AT(), ggc_alloc(), and NULL.

Referenced by AT_loc_list_ptr(), output_view_list_offset(), and resolve_addr().

◆ AT_ref()

◆ AT_ref_external()

static int AT_ref_external ( dw_attr_node * a)
inlinestatic

◆ AT_string()

◆ AT_string_form()

static enum dwarf_form AT_string_form ( dw_attr_node * a)
static
Find out whether the string referenced from the attribute should be
output inline in DIE or out-of-line in .debug_str section.   

References a, AT_class(), dw_val_class_str, find_string_form(), and gcc_assert.

Referenced by size_of_die(), and value_format().

◆ AT_unsigned()

◆ AT_vms_delta1()

static const char * AT_vms_delta1 ( dw_attr_node * a)
inlinestatic
Return the start label of a delta attribute.   

References a, AT_class(), dw_val_class_vms_delta, and gcc_assert.

Referenced by output_die().

◆ AT_vms_delta2()

static const char * AT_vms_delta2 ( dw_attr_node * a)
inlinestatic
Return the end label of a delta attribute.   

References a, AT_class(), dw_val_class_vms_delta, and gcc_assert.

Referenced by output_die().

◆ attr_checksum()

◆ attr_checksum_ordered()

◆ base_type_cmp()

static int base_type_cmp ( const void * x,
const void * y )
static
Comparison function for sorting marked base types.   

◆ base_type_die()

◆ base_type_for_mode()

static dw_die_ref base_type_for_mode ( machine_mode mode,
bool unsignedp )
static

◆ based_loc_descr()

◆ block_within_block_p()

static bool block_within_block_p ( tree block,
tree outer,
bool bothways )
static
Check whether BLOCK, a lexical block, is nested within OUTER, or is
OUTER itself.  If BOTHWAYS, check not only that BLOCK can reach
OUTER through BLOCK_SUPERCONTEXT links, but also that there is a
path from OUTER to BLOCK through BLOCK_SUBBLOCKs and
BLOCK_FRAGMENT_ORIGIN links.   

◆ break_out_comdat_types()

static void break_out_comdat_types ( dw_die_ref die)
static

◆ bswap_loc_descriptor()

static dw_loc_descr_ref bswap_loc_descriptor ( rtx rtl,
scalar_int_mode mode,
machine_mode mem_mode )
static
BSWAP (constS is initial shift count, either 56 or 24):
    constS const0
L1: DW_OP_pick <2> constS DW_OP_pick <3> DW_OP_minus DW_OP_shr
    const255 DW_OP_and DW_OP_pick <2> DW_OP_shl DW_OP_or
    DW_OP_swap DW_OP_dup const0 DW_OP_eq DW_OP_bra <L2> const8
    DW_OP_minus DW_OP_swap DW_OP_skip <L1>
L2: DW_OP_drop DW_OP_swap DW_OP_drop   

References add_loc_descr(), const0_rtx, dw_val_class_loc, GEN_INT, GET_MODE_BITSIZE(), ggc_alloc(), mem_loc_descriptor(), new_loc_descr(), NULL, VAR_INIT_STATUS_INITIALIZED, and XEXP.

Referenced by mem_loc_descriptor().

◆ build_abbrev_table()

static void build_abbrev_table ( dw_die_ref die,
external_ref_hash_type * extern_map )
static
The format of each DIE (and its attribute value pairs) is encoded in an
abbreviation table.  This routine builds the abbreviation table and assigns
a unique abbreviation id for each abbreviation entry.  The children of each
die are visited recursively.   

References a, abbrev_die_table, abbrev_opt_start, abbrev_usage_count, AT_class(), AT_ref(), build_abbrev_table(), change_AT_die_ref(), die_struct::die_abbrev, die_struct::die_attr, die_struct::die_child, die_struct::die_tag, dw_val_class_die_ref, FOR_EACH_CHILD, FOR_EACH_VEC_SAFE_ELT, gcc_assert, ggc_alloc(), is_type_die(), lookup_external_ref(), NULL, set_AT_ref_external(), sorted_abbrev_dies, external_ref::stub, value_format(), vec_safe_length(), and vec_safe_push().

Referenced by build_abbrev_table(), output_comdat_type_unit(), and output_comp_unit().

◆ build_breg_loc()

static void build_breg_loc ( struct dw_loc_descr_node ** head,
unsigned int regno )
static

References add_loc_descr(), ggc_alloc(), and new_loc_descr().

Referenced by build_span_loc().

◆ build_cfa_aligned_loc()

struct dw_loc_descr_node * build_cfa_aligned_loc ( dw_cfa_location * cfa,
poly_int64 offset,
HOST_WIDE_INT alignment )
This function builds a dwarf location descriptor sequence for
the address at OFFSET from the CFA when stack is aligned to
ALIGNMENT byte.   

References add_loc_descr(), DWARF_FRAME_REGNUM, ggc_alloc(), HARD_FRAME_POINTER_REGNUM, dw_cfa_location::indirect, int_loc_descriptor(), loc_descr_plus_const(), new_loc_descr(), new_reg_loc_descr(), offset, cfa_reg::reg, and dw_cfa_location::reg.

Referenced by reg_save().

◆ build_cfa_loc()

struct dw_loc_descr_node * build_cfa_loc ( dw_cfa_location * cfa,
poly_int64 offset )
This function builds a dwarf location descriptor sequence from a
dw_cfa_location, adding the given OFFSET to the result of the
expression.   

References add_loc_descr(), dw_cfa_location::base_offset, build_span_loc(), dw_val_class_const, ggc_alloc(), dw_cfa_location::indirect, loc_descr_plus_const(), new_loc_descr(), new_reg_loc_descr(), NULL, dw_cfa_location::offset, offset, cfa_reg::reg, dw_cfa_location::reg, and cfa_reg::span.

Referenced by convert_cfa_to_fb_loc_list(), def_cfa_0(), and reg_save().

◆ build_span_loc()

struct dw_loc_descr_node * build_span_loc ( struct cfa_reg reg)
Build a dwarf location for a cfa_reg spanning multiple
consecutive registers.   

References add_loc_descr(), build_breg_loc(), gcc_assert, ggc_alloc(), i, int_loc_descriptor(), new_loc_descr(), NULL, cfa_reg::reg, cfa_reg::span, and cfa_reg::span_width.

Referenced by build_cfa_loc(), and reg_save().

◆ calc_base_type_die_sizes()

static void calc_base_type_die_sizes ( void )
static
Size just the base type children at the start of the CU.
This is needed because build_abbrev needs to size locs
and sizing of type based stack ops needs to know die_offset
values for the base types.   

References abbrev_opt_base_type_end, abbrev_opt_start, base_types, comp_unit_die(), die_struct::die_child, die_struct::die_sib, DWARF_COMPILE_UNIT_HEADER_SIZE, DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE, gcc_assert, ggc_alloc(), i, NULL, and size_of_die().

Referenced by get_base_type_offset().

◆ calc_die_sizes()

static void calc_die_sizes ( dw_die_ref die)
static
Size the debugging information associated with a given DIE.  Visits the
DIE's children recursively.  Updates the global variable next_die_offset, on
each time through.  Uses the current value of next_die_offset to update the
die_offset field in each DIE.   

References calc_die_sizes(), die_struct::die_child, die_struct::die_offset, FOR_EACH_CHILD, gcc_assert, next_die_offset, NULL, and size_of_die().

Referenced by calc_die_sizes(), output_comdat_type_unit(), and output_comp_unit().

◆ change_AT_die_ref()

◆ check_die()

static void check_die ( dw_die_ref die)
static

◆ checksum_die_context()

static void checksum_die_context ( dw_die_ref die,
struct md5_ctx * ctx )
static
Checksum the context of the DIE.  This adds the names of any
surrounding namespaces or structures to the checksum.   

References checksum_die_context(), CHECKSUM_STRING, CHECKSUM_ULEB128, die_struct::die_parent, die_struct::die_tag, get_AT_ref(), get_AT_string(), ggc_alloc(), and NULL.

Referenced by attr_checksum_ordered(), checksum_die_context(), and generate_type_signature().

◆ checksum_sleb128()

static void checksum_sleb128 ( HOST_WIDE_INT value,
struct md5_ctx * ctx )
static
Calculate the checksum of a number in signed LEB128 format.   

References CHECKSUM, and ggc_alloc().

◆ checksum_uleb128()

static void checksum_uleb128 ( unsigned HOST_WIDE_INT value,
struct md5_ctx * ctx )
static
Calculate the checksum of a number in unsigned LEB128 format.   

References CHECKSUM.

◆ class_or_namespace_scope_p()

static bool class_or_namespace_scope_p ( dw_die_ref context_die)
inlinestatic
Returns true if CONTEXT_DIE is a class or namespace, for deciding
whether or not to treat a DIE in this context as a declaration.   

◆ class_scope_p()

static bool class_scope_p ( dw_die_ref context_die)
inlinestatic
Returns true if CONTEXT_DIE is a class.   

Referenced by add_pubname().

◆ clone_as_declaration()

◆ clone_die()

◆ clone_tree()

static dw_die_ref clone_tree ( dw_die_ref die)
static
Make a clone of the tree rooted at DIE.   

References add_child_die(), clone_die(), clone_tree(), and FOR_EACH_CHILD.

Referenced by clone_tree(), and copy_declaration_context().

◆ clone_tree_partial()

static dw_die_ref clone_tree_partial ( dw_die_ref die,
decl_hash_type * decl_table )
static
Like clone_tree, but copy DW_TAG_subprogram DIEs as declarations.
Enter all the cloned children into the hash table decl_table.   

References add_child_die(), clone_as_declaration(), clone_die(), clone_tree_partial(), decl_table_entry::copy, decl_table, die_struct::die_tag, FOR_EACH_CHILD, gcc_assert, ggc_alloc(), and decl_table_entry::orig.

Referenced by clone_tree_partial(), and copy_decls_walk().

◆ clz_loc_descriptor()

static dw_loc_descr_ref clz_loc_descriptor ( rtx rtl,
scalar_int_mode mode,
machine_mode mem_mode )
static
CLZ (where constV is CLZ_DEFINED_VALUE_AT_ZERO computed value,
const0 is DW_OP_lit0 or corresponding typed constant,
const1 is DW_OP_lit1 or corresponding typed constant
and constMSB is constant with just the MSB bit set
for the mode):
    DW_OP_dup DW_OP_bra <L1> DW_OP_drop constV DW_OP_skip <L4>
L1: const0 DW_OP_swap
L2: DW_OP_dup constMSB DW_OP_and DW_OP_bra <L3> const1 DW_OP_shl
    DW_OP_swap DW_OP_plus_uconst <1> DW_OP_swap DW_OP_skip <L2>
L3: DW_OP_drop
L4: DW_OP_nop

CTZ is similar:
    DW_OP_dup DW_OP_bra <L1> DW_OP_drop constV DW_OP_skip <L4>
L1: const0 DW_OP_swap
L2: DW_OP_dup const1 DW_OP_and DW_OP_bra <L3> const1 DW_OP_shr
    DW_OP_swap DW_OP_plus_uconst <1> DW_OP_swap DW_OP_skip <L2>
L3: DW_OP_drop
L4: DW_OP_nop

FFS is similar:
    DW_OP_dup DW_OP_bra <L1> DW_OP_drop const0 DW_OP_skip <L4>
L1: const1 DW_OP_swap
L2: DW_OP_dup const1 DW_OP_and DW_OP_bra <L3> const1 DW_OP_shr
    DW_OP_swap DW_OP_plus_uconst <1> DW_OP_swap DW_OP_skip <L2>
L3: DW_OP_drop
L4: DW_OP_nop   

References add_loc_descr(), CLZ_DEFINED_VALUE_AT_ZERO, const0_rtx, const1_rtx, CTZ_DEFINED_VALUE_AT_ZERO, dw_val_class_loc, GEN_INT, GET_CODE, GET_MODE, GET_MODE_BITSIZE(), GET_MODE_PRECISION(), ggc_alloc(), HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT_1U, immed_wide_int_const(), INTVAL, mem_loc_descriptor(), new_loc_descr(), NULL, wi::set_bit_in_zero(), VAR_INIT_STATUS_INITIALIZED, and XEXP.

Referenced by mem_loc_descriptor().

◆ collect_checksum_attributes()

static void collect_checksum_attributes ( struct checksum_attributes * attrs,
dw_die_ref die )
static
Collect the attributes that we will want to use for the checksum.   

References a, die_struct::die_attr, FOR_EACH_VEC_SAFE_ELT, and ggc_alloc().

Referenced by die_checksum_ordered().

◆ collect_skeleton_dies()

static void collect_skeleton_dies ( dw_die_ref die,
decl_hash_type * decl_table )
static
Collect skeleton dies in DIE created by break_out_comdat_types already
and record them in DECL_TABLE.   

References a, AT_ref(), collect_skeleton_dies(), decl_table_entry::copy, decl_table, FOR_EACH_CHILD, gcc_assert, get_AT(), ggc_alloc(), and decl_table_entry::orig.

Referenced by collect_skeleton_dies(), and copy_decls_for_unworthy_types().

◆ comp_dir_string()

static const char * comp_dir_string ( void )
static
Retrieve the comp_dir string suitable for use with DW_AT_comp_dir.   

References DIR_SEPARATOR, DWARF2_DIR_SHOULD_END_WITH_SEPARATOR, free(), get_src_pwd(), ggc_alloc(), NULL, and remap_debug_filename().

Referenced by add_top_level_skeleton_die_attrs(), and output_file_names().

◆ comp_unit_die()

◆ compare_loc_descriptor()

static dw_loc_descr_ref compare_loc_descriptor ( enum dwarf_location_atom op,
dw_loc_descr_ref op0,
dw_loc_descr_ref op1 )
static

◆ compare_loc_operands()

static bool compare_loc_operands ( dw_loc_descr_ref x,
dw_loc_descr_ref y )
inlinestatic
Return true if X and Y opcodes have the same operands.   

◆ compare_locs()

static bool compare_locs ( dw_loc_descr_ref x,
dw_loc_descr_ref y )
inlinestatic
Return true if DWARF location expressions X and Y are the same.   

◆ compute_comp_unit_symbol()

static void compute_comp_unit_symbol ( dw_die_ref unit_die)
static
Calculate the MD5 checksum of the compilation unit DIE UNIT_DIE and its
children, and set die_symbol.   

References clean_symbol_name(), die_checksum(), get_AT_string(), ggc_alloc(), i, and unmark_all_dies().

◆ compute_frame_pointer_to_fb_displacement()

static void compute_frame_pointer_to_fb_displacement ( poly_int64 offset)
static
Compute a displacement from the "steady-state frame pointer" to the
frame base (often the same as the CFA), and store it in
frame_pointer_fb_offset.  OFFSET is added to the displacement
before the latter is negated.   

References ARG_POINTER_CFA_OFFSET, arg_pointer_rtx, current_function_decl, eliminate_regs(), frame_pointer_fb_offset, frame_pointer_fb_offset_valid, frame_pointer_rtx, ggc_alloc(), hard_frame_pointer_rtx, ira_use_lra_p, lra_eliminate_regs(), NULL_RTX, offset, stack_pointer_rtx, and strip_offset_and_add().

◆ concat_loc_descriptor()

static dw_loc_descr_ref concat_loc_descriptor ( rtx x0,
rtx x1,
enum var_init_status initialized )
static
Return a descriptor that describes the concatenation of two locations.
This is typically a complex variable.   

References add_loc_descr(), add_loc_descr_op_piece(), GET_MODE, GET_MODE_SIZE(), ggc_alloc(), initialized, loc_descriptor(), new_loc_descr(), NULL, VAR_INIT_STATUS_INITIALIZED, and VAR_INIT_STATUS_UNINITIALIZED.

Referenced by loc_descriptor().

◆ concatn_loc_descriptor()

static dw_loc_descr_ref concatn_loc_descriptor ( rtx concatn,
enum var_init_status initialized )
static

◆ const_ok_for_output()

static bool const_ok_for_output ( rtx rtl)
static
Return true if constant RTL can be emitted in DW_OP_addr or
DW_AT_const_value.  TLS SYMBOL_REFs, external SYMBOL_REFs or
non-marked constant pool SYMBOL_REFs can't be referenced in it.   

References const_ok_for_output_1(), FOR_EACH_SUBRTX_VAR, GET_CODE, ggc_alloc(), and XEXP.

Referenced by add_const_value_attribute(), loc_descriptor(), loc_list_from_tree_1(), and mem_loc_descriptor().

◆ const_ok_for_output_1()

◆ constant_size()

static int constant_size ( unsigned HOST_WIDE_INT value)
static
Return the power-of-two number of bytes necessary to represent VALUE.   

References floor_log2(), and log().

Referenced by optimize_implicit_const(), output_die(), size_of_die(), and value_format().

◆ construct_piece_list()

static rtx construct_piece_list ( rtx loc_note,
HOST_WIDE_INT bitpos,
HOST_WIDE_INT bitsize )
static
Return rtx that should be stored into loc field for
LOC_NOTE and BITPOS/BITSIZE.   

References decl_piece_node(), ggc_alloc(), and NULL_RTX.

Referenced by add_var_loc_to_decl().

◆ contains_subprogram_definition()

static bool contains_subprogram_definition ( dw_die_ref die)
static
Return true if this DIE contains a defining declaration of a
subprogram.   

References contains_subprogram_definition(), die_struct::die_tag, FOR_EACH_CHILD, ggc_alloc(), and is_declaration_die().

Referenced by contains_subprogram_definition(), and should_move_die_to_comdat().

◆ convert_cfa_to_fb_loc_list()

static dw_loc_list_ref convert_cfa_to_fb_loc_list ( HOST_WIDE_INT offset)
static
Convert the CFI instructions for the current function into a
location list.  This is used for DW_AT_frame_base when we targeting
a dwarf2 consumer that does not support the dwarf3
DW_OP_call_frame_cfa.  OFFSET is a constant to be added to all CFA
expressions.   

References build_cfa_loc(), cfa_equal_p(), cfun, cie_cfi_vec, current_function_decl, dw_fde_node::dw_fde_begin, dw_fde_node::dw_fde_cfi, dw_fde_node::dw_fde_end, dw_fde_node::dw_fde_second_begin, dw_fde_node::dw_fde_second_end, dw_fde_node::dw_fde_switch_cfi_index, FOR_EACH_VEC_ELT, FOR_EACH_VEC_SAFE_ELT, gcc_assert, gcc_unreachable, ggc_alloc(), INVALID_REGNUM, lookup_cfa_1(), maybe_gen_llsym(), new_loc_list(), NULL, offset, and secname_for_decl().

◆ convert_descriptor_to_mode()

static dw_loc_descr_ref convert_descriptor_to_mode ( scalar_int_mode mode,
dw_loc_descr_ref op )
static
For OP descriptor assumed to be in unsigned MODE, convert it to a unsigned
type matching MODE, or, if MODE is narrower than or as wide as
DWARF2_ADDR_SIZE, untyped.  Return NULL if the conversion is not
possible.   

References add_loc_descr(), base_type_for_mode(), dw_val_class_die_ref, DWARF2_ADDR_SIZE, dwarf_OP(), GET_MODE_SIZE(), ggc_alloc(), new_loc_descr(), and NULL.

Referenced by mem_loc_descriptor(), minmax_loc_descriptor(), typed_binop(), and typed_binop_from_tree().

◆ copy_ancestor_tree()

static dw_die_ref copy_ancestor_tree ( dw_die_ref unit,
dw_die_ref die,
decl_hash_type * decl_table )
static
Copy DIE and its ancestors, up to, but not including, the compile unit
or type unit entry, to a new tree.  Adds the new tree to UNIT and returns
a pointer to the copy of DIE.  If DECL_TABLE is provided, it is used
to check if the ancestor has already been copied into UNIT.   

References add_child_die(), clone_as_declaration(), decl_table_entry::copy, copy_ancestor_tree(), decl_table, die_struct::die_parent, get_AT_ref(), ggc_alloc(), is_unit_die(), NULL, and decl_table_entry::orig.

Referenced by copy_ancestor_tree(), copy_declaration_context(), and copy_decls_walk().

◆ copy_declaration_context()

static dw_die_ref copy_declaration_context ( dw_die_ref unit,
dw_die_ref die )
static
Copy the declaration context to the new type unit DIE.  This includes
any surrounding namespace or type declarations.  If the DIE has an
AT_specification attribute, it also includes attributes and children
attached to the specification, and returns a pointer to the original
parent of the declaration DIE.  Returns NULL otherwise.   

References a, add_AT_specification(), add_child_die(), add_dwarf_attr(), clone_tree(), copy_ancestor_tree(), die_struct::die_id, die_struct::die_symbol_or_type_node::die_type_node, FOR_EACH_CHILD, FOR_EACH_VEC_SAFE_ELT, get_AT_ref(), ggc_alloc(), is_unit_die(), NULL, and remove_AT().

Referenced by remove_child_or_replace_with_skeleton().

◆ copy_decls_for_unworthy_types()

static void copy_decls_for_unworthy_types ( dw_die_ref unit)
static
Copy declarations for "unworthy" types into the new comdat section.
Incomplete types, modified types, and certain other types aren't broken
out into comdat sections of their own, so they don't have a signature,
and we need to copy the declaration into the same section so that we
don't have an external reference.   

References collect_skeleton_dies(), copy_decls_walk(), decl_table, mark_dies(), and unmark_dies().

◆ copy_decls_walk()

static void copy_decls_walk ( dw_die_ref unit,
dw_die_ref die,
decl_hash_type * decl_table )
static

◆ copy_deref_exprloc()

static dw_loc_descr_ref copy_deref_exprloc ( dw_loc_descr_ref expr)
static
Return adjusted copy of EXPR:
If it is empty DWARF expression, return it.
If it is valid non-empty DWARF expression,
return copy of EXPR with DW_OP_deref appended to it.
If it is DWARF expression followed by DW_OP_reg{N,x}, return
copy of the DWARF expression with DW_OP_breg{N,x} <0> appended.
If it is DWARF expression followed by DW_OP_stack_value, return
copy of the DWARF expression without anything appended.
Otherwise, return NULL.   

References dw_loc_descr_node::dw_loc_next, dw_loc_descr_node::dw_loc_opc, ggc_alloc(), and NULL.

Referenced by resolve_addr().

◆ copy_dwarf_procedure()

static dw_die_ref copy_dwarf_procedure ( dw_die_ref die,
comdat_type_node * type_node,
hash_map< dw_die_ref, dw_die_ref > & copied_dwarf_procs )
static
Helper for copy_dwarf_procs_ref_in_dies.  Make a copy of the DIE DWARF
procedure, put it under TYPE_NODE and return the copy.  Continue looking for
DWARF procedure references in the DW_AT_location attribute.   

References add_child_die(), clone_die(), copy_dwarf_procs_ref_in_attrs(), die_struct::die_attr, die_struct::die_child, die_struct::die_tag, gcc_assert, ggc_alloc(), NULL, and vec_safe_length().

Referenced by copy_dwarf_procs_ref_in_attrs().

◆ copy_dwarf_procs_ref_in_attrs()

◆ copy_dwarf_procs_ref_in_dies()

static void copy_dwarf_procs_ref_in_dies ( dw_die_ref die,
comdat_type_node * type_node,
hash_map< dw_die_ref, dw_die_ref > & copied_dwarf_procs )
static
Copy DWARF procedures that are referenced by the DIE tree to TREE_NODE and
rewrite references to point to the copies.

References are looked for in DIE's attributes and recursively in all its
children attributes that are location descriptions. COPIED_DWARF_PROCS is a
mapping from old DWARF procedures to their copy. It is used not to copy
twice the same DWARF procedure under TYPE_NODE.   

References copy_dwarf_procs_ref_in_attrs(), copy_dwarf_procs_ref_in_dies(), FOR_EACH_CHILD, and ggc_alloc().

Referenced by break_out_comdat_types(), and copy_dwarf_procs_ref_in_dies().

◆ copy_loc_descr()

static dw_loc_descr_ref copy_loc_descr ( dw_loc_descr_ref ref)
inlinestatic
Duplicate a single element of location list.   

References ggc_alloc().

Referenced by add_loc_descr_to_each(), and prepend_loc_descr_to_each().

◆ count_index_addrs()

int count_index_addrs ( addr_table_entry ** slot,
unsigned int * last_idx )
A helper function for dwarf2out_finish.  Counts the number
of indexed addresses.  Must match the logic of the functions
output_addr_table_entry above.   

References gcc_assert, ggc_alloc(), addr_table_entry::index, NO_INDEX_ASSIGNED, NOT_INDEXED, and addr_table_entry::refcount.

Referenced by prune_unmark_dies().

◆ count_index_strings()

int count_index_strings ( indirect_string_node ** h,
unsigned int * last_idx )
A helper function for output_indirect_strings.  Counts the number
of index strings offsets.  Must match the logic of the functions
output_index_string[_offsets] above.   

References dw2_asm_output_data(), dwarf_FORM(), indirect_string_node::form, gcc_assert, ggc_alloc(), indirect_string_node::index, NO_INDEX_ASSIGNED, NOT_INDEXED, offset, indirect_string_node::refcount, and indirect_string_node::str.

◆ cst_pool_loc_descr()

static dw_loc_descr_ref cst_pool_loc_descr ( tree loc)
static
LOC is constant expression.  Try a luck, look it up in constant
pool and return its loc_descr of its address.   

References expansion_failed(), gcc_assert, get_address_mode(), GET_CODE, GET_MODE, ggc_alloc(), lookup_constant_def(), mem_loc_descriptor(), MEM_P, NULL_RTX, SYMBOL_REF_DECL, TREE_ASM_WRITTEN, VAR_INIT_STATUS_INITIALIZED, and XEXP.

Referenced by loc_list_from_tree_1().

◆ ctf_debug_do_cu()

static void ctf_debug_do_cu ( dw_die_ref die)
static
Process DWARF dies for CTF generation.   

◆ debug() [1/2]

DEBUG_FUNCTION void debug ( die_struct & ref)

References ggc_alloc(), and print_die().

◆ debug() [2/2]

DEBUG_FUNCTION void debug ( die_struct * ptr)

References debug, and ggc_alloc().

◆ debug_dwarf()

DEBUG_FUNCTION void debug_dwarf ( void )
Print all DWARF information collected for the compilation unit.
This routine is a debugging aid only.   

References comp_unit_die(), ggc_alloc(), print_die(), and print_indent.

◆ debug_dwarf_die()

DEBUG_FUNCTION void debug_dwarf_die ( dw_die_ref die)
Print the information collected for a given DIE.   

References ggc_alloc(), and print_die().

Referenced by check_die().

◆ debug_dwarf_loc_descr()

DEBUG_FUNCTION void debug_dwarf_loc_descr ( dw_loc_descr_ref loc)
Print the list of operations in the LOC location description.   

References ggc_alloc(), and print_loc_descr().

◆ debugger_reg_number()

static unsigned int debugger_reg_number ( const_rtx rtl)
static
Return the debugger register number described by a given RTL node.   

References crtl, DEBUGGER_REGNO, gcc_assert, ggc_alloc(), INVALID_REGNUM, and REGNO.

Referenced by mem_loc_descriptor(), multiple_reg_loc_descriptor(), and reg_loc_descriptor().

◆ decl_by_reference_p()

static bool decl_by_reference_p ( tree decl)
static
Return true when DECL_BY_REFERENCE is defined and set for DECL.   

References DECL_BY_REFERENCE, ggc_alloc(), TREE_CODE, and VAR_P.

Referenced by add_location_or_const_value_attribute().

◆ decl_class_context()

static tree decl_class_context ( tree decl)
static
Get the class to which DECL belongs, if any.  In g++, the DECL_CONTEXT
of a virtual function may refer to a base class, so we check the 'this'
parameter.   

References DECL_CONTEXT, DECL_VINDEX, ggc_alloc(), NULL_TREE, TREE_CODE, TREE_TYPE, TREE_VALUE, TYPE_ARG_TYPES, TYPE_MAIN_VARIANT, and TYPE_P.

◆ decl_piece_bitsize()

static HOST_WIDE_INT decl_piece_bitsize ( rtx piece)
static
Return how many bits covers PIECE EXPR_LIST.   

References CONST_INT_P, gcc_assert, GET_CODE, GET_MODE, ggc_alloc(), INTVAL, and XEXP.

Referenced by add_var_loc_to_decl(), adjust_piece_list(), and dw_sra_loc_expr().

◆ decl_piece_node()

static rtx_expr_list * decl_piece_node ( rtx loc_note,
HOST_WIDE_INT bitsize,
rtx next )
static
Create an EXPR_LIST for location note LOC_NOTE covering BITSIZE bits.
Next is the chain of following piece nodes.   

References alloc_EXPR_LIST(), GEN_INT, and ggc_alloc().

Referenced by adjust_piece_list(), and construct_piece_list().

◆ decl_piece_varloc_ptr()

static rtx * decl_piece_varloc_ptr ( rtx piece)
static
Return pointer to the location of location note in PIECE EXPR_LIST.   

References GET_MODE, ggc_alloc(), and XEXP.

Referenced by add_var_loc_to_decl(), adjust_piece_list(), and dw_sra_loc_expr().

◆ decl_quals()

static int decl_quals ( const_tree decl)
static
Returns the (const and/or volatile) cv_qualifiers associated with
the decl node.  This will normally be augmented with the
cv_qualifiers of the underlying type in add_type_attribute.   

References ggc_alloc(), TREE_CODE, TREE_READONLY, TREE_THIS_VOLATILE, TREE_TYPE, TYPE_QUAL_CONST, TYPE_QUAL_VOLATILE, and TYPE_UNQUALIFIED.

◆ decl_ultimate_origin()

static tree decl_ultimate_origin ( const_tree decl)
static
Determine the "ultimate origin" of a decl.  The decl may be an inlined
instance of an inlined instance of a decl which is local to an inline
function, so we have to trace all of the way back through the origin chain
to find out what sort of node actually served as the original seed for the
given block.   

References CODE_CONTAINS_STRUCT, DECL_ABSTRACT_ORIGIN, DECL_ABSTRACT_P, DECL_FROM_INLINE, DECL_ORIGIN, gcc_assert, ggc_alloc(), NULL_TREE, and TREE_CODE.

Referenced by modified_type_die(), and record_type_tag().

◆ decl_will_get_specification_p()

static bool decl_will_get_specification_p ( dw_die_ref old_die,
tree decl,
bool declaration )
inlinestatic
Return TRUE if DECL, which may have been previously generated as
OLD_DIE, is a candidate for a DW_AT_specification.  DECLARATION is
true if decl (or its origin) is either an extern declaration or a
class/namespace scoped declaration.

The declare_in_namespace support causes us to get two DIEs for one
variable, both of which are declarations.  We want to avoid
considering one to be a specification, so we must test for
DECLARATION and DW_AT_declaration.   

◆ declare_in_namespace()

static dw_die_ref declare_in_namespace ( tree thing,
dw_die_ref context_die )
static
Emit a declaration DIE for THING (which is either a DECL or a tagged
type) within its namespace, if appropriate.

For compatibility with older debuggers, namespace DIEs only contain
declarations; all definitions are emitted at CU scope, with
DW_AT_specification pointing to the declaration (like with class
members).   

References gcc_assert, get_context_die(), ggc_alloc(), lookup_type_die(), modified_type_die(), TYPE_CONTEXT, and TYPE_QUALS_NO_ADDR_SPACE.

◆ decls_for_scope()

static void decls_for_scope ( tree stmt,
dw_die_ref context_die,
bool recurse )
static
Generate all of the decls declared within a given scope and (recursively)
all of its sub-blocks.   

References equate_decl_number_to_die(), lookup_decl_die(), and NULL.

Referenced by gen_field_die().

◆ die_abbrev_cmp()

static int die_abbrev_cmp ( const void * p1,
const void * p2 )
static
Callback function for sorted_abbrev_dies vector sorting.  We sort
by die_abbrev's usage count, from the most commonly used
abbreviation to the least.   

References abbrev_opt_base_type_end, abbrev_opt_start, abbrev_usage_count, gcc_checking_assert, and ggc_alloc().

Referenced by optimize_abbrev_table().

◆ die_checksum()

◆ die_checksum_ordered()

◆ die_odr_checksum()

static void die_odr_checksum ( int tag,
const char * name,
md5_ctx * ctx )
static
Add a type name and tag to a hash.   

References CHECKSUM_STRING, and CHECKSUM_ULEB128.

Referenced by generate_type_signature().

◆ dw_addr_op()

static enum dwarf_location_atom dw_addr_op ( enum dtprel_bool dtprel)
inlinestatic
Return the operator to use for an address of a variable.  For dtprel_true, we
use DW_OP_const*.  For regular variables, which need both link-time
relocation and consumer-level relocation (e.g., to account for shared objects
loaded at a random address), we use DW_OP_addr*.   

References dtprel_true, DWARF2_ADDR_SIZE, dwarf_OP(), and ggc_alloc().

Referenced by new_addr_loc_descr().

◆ dw_cfi_oprnd1_desc()

enum dw_cfi_oprnd_type dw_cfi_oprnd1_desc ( enum dwarf_call_frame_info cfi)
Describe for the GTY machinery what parts of dw_cfi_oprnd1 are used.   

References dw_cfi_oprnd_addr, dw_cfi_oprnd_loc, dw_cfi_oprnd_offset, dw_cfi_oprnd_reg_num, dw_cfi_oprnd_unused, gcc_unreachable, and ggc_alloc().

Referenced by cfi_equal_p().

◆ dw_cfi_oprnd2_desc()

enum dw_cfi_oprnd_type dw_cfi_oprnd2_desc ( enum dwarf_call_frame_info cfi)
Describe for the GTY machinery what parts of dw_cfi_oprnd2 are used.   

References dw_cfi_oprnd_cfa_loc, dw_cfi_oprnd_loc, dw_cfi_oprnd_offset, dw_cfi_oprnd_reg_num, dw_cfi_oprnd_unused, and ggc_alloc().

Referenced by cfi_equal_p().

◆ dw_get_die_child()

dw_die_ref dw_get_die_child ( dw_die_ref die)
Return a reference to the children list of a given DIE.   

References die_struct::die_child.

Referenced by gen_ctf_array_type(), gen_ctf_enumeration_type(), gen_ctf_function_type(), and gen_ctf_sou_type().

◆ dw_get_die_sib()

dw_die_ref dw_get_die_sib ( dw_die_ref die)
Return a reference to the sibling of a given DIE.   

References die_struct::die_sib.

Referenced by gen_ctf_array_type(), gen_ctf_enumeration_type(), gen_ctf_function_type(), gen_ctf_sou_type(), and gen_ctf_subrange_type().

◆ dw_get_die_tag()

enum dwarf_tag dw_get_die_tag ( dw_die_ref die)

◆ dw_loc_list()

◆ dw_loc_list_1()

◆ dw_sra_loc_expr()

◆ dw_val_equal_p()

◆ dwarf2_build_local_stub()

int dwarf2_build_local_stub ( external_ref ** slot,
dw_die_ref data )
htab_traverse callback function for optimize_external_refs, below.  SLOT
points to an external_ref, DATA is the CU we're processing.  If we don't
already have a local stub, and we have multiple refs, build a stub.   

References add_AT_die_ref(), die_struct::die_mark, ggc_alloc(), external_ref::n_refs, new_die(), NULL, NULL_TREE, external_ref::stub, and external_ref::type.

Referenced by optimize_external_refs().

◆ dwarf2_name()

static const char * dwarf2_name ( tree decl,
int scope )
static
Return the DWARF2/3 pubname associated with a decl.   

References DECL_NAMELESS, lang_hooks::dwarf_name, ggc_alloc(), and NULL.

Referenced by add_desc_attribute(), add_discr_value(), add_pubname(), dwarf2out_next_real_insn(), and generic_parameter_die().

◆ dwarf2out_abstract_function()

static void dwarf2out_abstract_function ( tree decl)
static
Mark the early DIE for DECL as the abstract instance.   

◆ dwarf2out_alloc_current_fde()

◆ dwarf2out_assembly_start()

static void dwarf2out_assembly_start ( void )
static
Called before compile () starts outputtting functions, variables
and toplevel asms into assembly.   

◆ dwarf2out_begin_block() [1/2]

static void dwarf2out_begin_block ( unsigned int line,
unsigned int blocknum )
static
Output a marker (i.e. a label) for the beginning of the generated code for
a lexical block.   

◆ dwarf2out_begin_block() [2/2]

static void dwarf2out_begin_block ( unsigned ,
unsigned  )
static

◆ dwarf2out_begin_function()

static void dwarf2out_begin_function ( tree fun)
static
We need to reset the locations at the beginning of each
function. We can't do this in the end_function hook, because the
declarations that use the locations won't have been output when
that hook is called.  Also compute have_multiple_function_sections here.   

◆ dwarf2out_begin_prologue()

◆ dwarf2out_cc_finalize()

void dwarf2out_cc_finalize ( void )
Reset all state within dwarf2out.cc so that we can rerun the compiler
within the same process.  For use by toplev::finalize.   

Referenced by toplev::finalize().

◆ dwarf2out_decl()

◆ dwarf2out_default_as_loc_support()

bool dwarf2out_default_as_loc_support ( void )
Return true if GCC configure detected assembler support for .loc.   

References DWARF2_ASM_LINE_DEBUG_INFO.

Referenced by process_options().

◆ dwarf2out_default_as_locview_support()

bool dwarf2out_default_as_locview_support ( void )
Return true if GCC configure detected assembler support for views
in .loc directives.   

References DWARF2_ASM_VIEW_DEBUG_INFO.

Referenced by process_options().

◆ dwarf2out_define()

static void dwarf2out_define ( unsigned int lineno,
const char * buffer )
static
Called from debug_define in toplev.cc.  The `buffer' parameter contains
the tail part of the directive line, i.e. the part which is past the
initial whitespace, #, whitespace, directive-name, whitespace part.   

References macinfo_struct::code, codeview_debuginfo_p(), codeview_start_source_file(), DINFO_LEVEL_VERBOSE, ggc_alloc(), ggc_strdup, macinfo_struct::info, macinfo_struct::lineno, macinfo_table, and vec_safe_push().

◆ dwarf2out_die_ref_for_decl()

static bool dwarf2out_die_ref_for_decl ( tree decl,
const char ** sym,
unsigned HOST_WIDE_INT * off )
static
For DECL which might have early dwarf output query a SYMBOL + OFFSET
style reference.  Return true if we found one refering to a DIE for
DECL, otherwise return false.   

References die_struct::die_id, die_struct::die_offset, die_struct::die_parent, die_struct::die_symbol_or_type_node::die_symbol, die_struct::die_tag, external_die_map, gcc_assert, gcc_unreachable, ggc_alloc(), lookup_block_die(), lookup_decl_die(), NULL, sym_off_pair::off, sym_off_pair::sym, and TREE_CODE.

◆ dwarf2out_do_cfi_startproc()

◆ dwarf2out_early_finish()

static void dwarf2out_early_finish ( const char * filename)
static

◆ dwarf2out_early_global_decl()

static void dwarf2out_early_global_decl ( tree decl)
static
Output initial debug information for global DECL.  Called at the
end of the parsing process.

This is the initial debug generation process.  As such, the DIEs
generated may be incomplete.  A later debug generation pass
(dwarf2out_late_global_decl) will augment the information generated
in this pass (e.g., with complete location info).   

◆ dwarf2out_end_block() [1/2]

static void dwarf2out_end_block ( unsigned int line,
unsigned int blocknum )
static
Output a marker (i.e. a label) for the end of the generated code for a
lexical block.   

◆ dwarf2out_end_block() [2/2]

static void dwarf2out_end_block ( unsigned ,
unsigned  )
static

◆ dwarf2out_end_epilogue()

void dwarf2out_end_epilogue ( unsigned int line,
const char * file )
Output a marker (i.e. a label) for the absolute end of the generated code
for a function definition.  This gets called *after* the epilogue code has
been generated.   

References asm_out_file, ASM_OUTPUT_LABEL, cached_next_real_insn, cfun, codeview_debuginfo_p(), codeview_end_epilogue(), current_function_funcdef_no, dw_fde_node::dw_fde_end, dw_fde_node::dw_fde_second_begin, dwarf2out_do_cfi_asm(), FUNC_END_LABEL, gcc_assert, ggc_alloc(), last_var_location_insn, mark_ignored_debug_section(), MAX_ARTIFICIAL_LABEL_BYTES, and NULL.

Referenced by final_end_function().

◆ dwarf2out_end_function()

static void dwarf2out_end_function ( unsigned int )
static
Hook called after emitting a function into assembly.
This does something only for the very first function emitted.   

◆ dwarf2out_end_source_file() [1/2]

static void dwarf2out_end_source_file ( unsigned int lineno)
static
Record the end of a source file.   

◆ dwarf2out_end_source_file() [2/2]

static void dwarf2out_end_source_file ( unsigned )
static

◆ dwarf2out_finish()

static void dwarf2out_finish ( const char * filename)
static
Output stuff that dwarf requires at the end of every file,
and generate the DWARF-2 debugging info.   

◆ dwarf2out_frame_finish()

void dwarf2out_frame_finish ( void )

◆ dwarf2out_function_decl()

static void dwarf2out_function_decl ( tree decl)
static
Write the debugging output for DECL.   

◆ dwarf2out_ignore_block()

static bool dwarf2out_ignore_block ( const_tree block)
static
Returns true if it is appropriate not to emit any debugging
information for BLOCK, because it doesn't contain any instructions.

Don't allow this for blocks with nested functions or local classes
as we would end up with orphans, and in the presence of scheduling
we may end up calling them anyway.   

References cached_dw_loc_list_table, call_arg_loc_last, call_arg_locations, call_site_count, decl_loc_table, dwarf2out_decl(), NULL, and tail_call_site_count.

◆ dwarf2out_imported_module_or_decl()

static void dwarf2out_imported_module_or_decl ( tree decl,
tree name,
tree context,
bool child,
bool implicit )
static
Output debug information for imported module or decl DECL.
NAME is non-NULL name in context if the decl has been renamed.
CHILD is true if decl is one of the renamed decls as part of
importing whole module.
IMPLICIT is set if this hook is called for an implicit import
such as inline namespace.   

◆ dwarf2out_imported_module_or_decl_1()

static void dwarf2out_imported_module_or_decl_1 ( tree decl,
tree name,
tree lexical_block,
dw_die_ref lexical_block_die )
static
Output debug information for imported module or decl DECL.
NAME is non-NULL name in the lexical block if the decl has been renamed.
LEXICAL_BLOCK is the lexical block (which TREE_CODE is a BLOCK)
that DECL belongs to.
LEXICAL_BLOCK_DIE is the DIE of LEXICAL_BLOCK.   

◆ dwarf2out_init()

static void dwarf2out_init ( const char * filename)
static
And now, the support for symbolic debugging information.   
.debug_str support.   
Set up for Dwarf output at the start of compilation.   

◆ dwarf2out_inline_entry()

static void dwarf2out_inline_entry ( tree block)
static
Called during final while assembling the marker of the entry point
for an inlined function.   

References BLOCK_CHAIN, BLOCK_FRAGMENT_ORIGIN, BLOCK_SUBBLOCKS, BLOCK_SUPERCONTEXT, gcc_assert, ggc_alloc(), and TREE_CODE.

◆ dwarf2out_late_global_decl()

static void dwarf2out_late_global_decl ( tree decl)
static
Output debug information for global decl DECL.  Called from
toplev.cc after compilation proper has finished.   

◆ dwarf2out_locviews_in_attribute()

static bool dwarf2out_locviews_in_attribute ( )
inlinestatic
Return TRUE iff we're to output location view lists as a separate
attribute next to the location lists, as an extension compatible
with DWARF 2 and above.   

References ggc_alloc().

Referenced by add_AT_location_description(), gen_llsym(), and output_loc_list().

◆ dwarf2out_locviews_in_loclist()

static bool dwarf2out_locviews_in_loclist ( )
inlinestatic
Return TRUE iff we're to output location view lists as part of the
location lists, as proposed for standardization after DWARF 5.   

References ggc_alloc().

Referenced by dwarf2out_maybe_output_loclist_view_pair().

◆ dwarf2out_maybe_output_loclist_view_pair()

static void dwarf2out_maybe_output_loclist_view_pair ( dw_loc_list_ref curr)
static

◆ dwarf2out_next_real_insn()

static rtx_insn * dwarf2out_next_real_insn ( rtx_insn * loc_note)
static
Look ahead for a real insn.   

References dwarf2_name(), get_AT(), ggc_alloc(), and TYPE_SYMTAB_DIE.

◆ dwarf2out_register_external_die()

static void dwarf2out_register_external_die ( tree decl,
const char * sym,
unsigned HOST_WIDE_INT off )
static
Create a DIE for DECL if required and add a reference to a DIE
at SYMBOL + OFFSET which contains attributes dumped early.   

References hash_map< KeyId, Value, Traits >::create_ggc(), DINFO_LEVEL_NONE, external_die_map, gcc_checking_assert, get_identifier(), ggc_alloc(), and IDENTIFIER_POINTER.

◆ dwarf2out_register_main_translation_unit()

static void dwarf2out_register_main_translation_unit ( tree unit)
static
Hook called by front-ends after they built their main translation unit.
Associate comp_unit_die to UNIT.   

References ggc_alloc(), have_multiple_function_sections, and i.

◆ dwarf2out_set_demangle_name_func()

void dwarf2out_set_demangle_name_func ( const char *(*)(const char *) func)

References demangle_name_func.

◆ dwarf2out_set_ignored_loc() [1/2]

static void dwarf2out_set_ignored_loc ( unsigned int line,
unsigned int column,
const char * filename )
static
Record a source file location for a DECL_IGNORED_P function.   

◆ dwarf2out_set_ignored_loc() [2/2]

static void dwarf2out_set_ignored_loc ( unsigned ,
unsigned ,
const char *  )
static

◆ dwarf2out_set_name()

static void dwarf2out_set_name ( tree decl,
tree name )
static

◆ dwarf2out_size_function()

static void dwarf2out_size_function ( tree decl)
static
Called from finalize_size_functions for size functions so that their body
can be encoded in the debug info to describe the layout of variable-length
structures.   

◆ dwarf2out_source_line()

static void dwarf2out_source_line ( unsigned int line,
unsigned int column,
const char * filename,
int discriminator,
bool is_stmt )
static
Output Dwarf2 format symbol table information from GCC.
   Copyright (C) 1992-2024 Free Software Foundation, Inc.
   Contributed by Gary Funck (gary@intrepid.com).
   Derived from DWARF 1 implementation of Ron Guilmette (rfg@monkeys.com).
   Extensively modified by Jason Merrill (jason@cygnus.com).

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/>.   
TODO: Emit .debug_line header even when there are no functions, since
       the file numbers are used by .debug_info.  Alternately, leave
       out locations for types and decls.
     Avoid talking about ctors and op= for PODs.
     Factor out common prologue sequences into multiple CIEs.   
The first part of this file deals with the DWARF 2 frame unwind
information, which is also used by the GCC efficient exception handling
mechanism.  The second part, controlled only by an #ifdef
DWARF2_DEBUGGING_INFO, deals with the other DWARF 2 debugging
information.   
DWARF2 Abbreviation Glossary:

CFA = Canonical Frame Address
        a fixed address on the stack which identifies a call frame.
        We define it to be the value of SP just before the call insn.
        The CFA register and offset, which may change during the course
        of the function, are used to calculate its value at runtime.

CFI = Call Frame Instruction
        an instruction for the DWARF2 abstract machine

CIE = Common Information Entry
        information describing information common to one or more FDEs

DIE = Debugging Information Entry

FDE = Frame Description Entry
        information describing the stack call frame, in particular,
        how to restore registers

DW_CFA_... = DWARF2 CFA call frame instruction
DW_TAG_... = DWARF2 DIE tag  
Output a label to mark the beginning of a source code line entry
and record information relating to this source line, in
'line_info_table' for later output of the .debug_line section.   
??? The discriminator parameter ought to be unsigned.   

Referenced by dwarf2out_begin_prologue().

◆ dwarf2out_start_source_file() [1/2]

static void dwarf2out_start_source_file ( unsigned int lineno,
const char * filename )
static
Record the beginning of a new source file.   

◆ dwarf2out_start_source_file() [2/2]

static void dwarf2out_start_source_file ( unsigned ,
const char *  )
static

◆ dwarf2out_switch_text_section()

◆ dwarf2out_type_decl()

static void dwarf2out_type_decl ( tree decl,
int local )
static
Output debug information for type decl DECL.  Called from toplev.cc
and from language front ends (to record built-in types).   

References ggc_alloc(), local_function_static(), lookup_decl_die(), and VAR_P.

◆ dwarf2out_undef()

static void dwarf2out_undef ( unsigned int lineno,
const char * buffer )
static
Called from debug_undef in toplev.cc.  The `buffer' parameter contains
the tail part of the directive line, i.e. the part which is past the
initial whitespace, #, whitespace, directive-name, whitespace part.   

◆ dwarf2out_var_location()

static void dwarf2out_var_location ( rtx_insn * loc_note)
static
Called by the final INSN scan whenever we see a var location.  We
use it to drop labels in the right places, and throw the location in
our lookup table.   

◆ dwarf2out_vms_begin_epilogue()

void dwarf2out_vms_begin_epilogue ( unsigned int line,
const char * file )
Output a marker (i.e. a label) for the beginning of the generated code
for a function epilogue.  This gets called *before* the prologue code has
been generated.   

References asm_out_file, ASM_OUTPUT_DEBUG_LABEL, cfun, current_function_funcdef_no, dw_fde_node::dw_fde_vms_begin_epilogue, EPILOGUE_BEGIN_LABEL, ggc_alloc(), and MAX_ARTIFICIAL_LABEL_BYTES.

◆ dwarf2out_vms_end_prologue()

void dwarf2out_vms_end_prologue ( unsigned int line,
const char * file )
Output a marker (i.e. a label) for the end of the generated code
for a function prologue.  This gets called *after* the prologue code has
been generated.   

References asm_out_file, ASM_OUTPUT_DEBUG_LABEL, cfun, current_function_funcdef_no, ggc_alloc(), MAX_ARTIFICIAL_LABEL_BYTES, and PROLOGUE_END_LABEL.

◆ dwarf_AT()

static enum dwarf_attribute dwarf_AT ( enum dwarf_attribute at)
inlinestatic
Similarly for attributes.   

References ggc_alloc().

Referenced by add_top_level_skeleton_die_attrs(), and gen_subprogram_die().

◆ dwarf_attr_name() [1/2]

static const char * dwarf_attr_name ( unsigned int attr)
static
Convert a DWARF attribute code into its string name.   

References ggc_alloc(), and NULL.

◆ dwarf_attr_name() [2/2]

◆ dwarf_FORM()

◆ dwarf_form_name() [1/2]

static const char * dwarf_form_name ( unsigned int form)
static
Convert a DWARF value form code into its string name.   

References ggc_alloc(), and NULL.

◆ dwarf_form_name() [2/2]

static const char * dwarf_form_name ( unsigned )
static

Referenced by output_value_format().

◆ dwarf_OP()

◆ dwarf_stack_op_name()

static const char * dwarf_stack_op_name ( unsigned int op)
static
Convert a DWARF stack opcode into its string name.   

References ggc_alloc(), and NULL.

Referenced by output_loc_sequence(), and print_loc_descr().

◆ dwarf_TAG()

static enum dwarf_tag dwarf_TAG ( enum dwarf_tag tag)
inlinestatic
And similarly for tags.   

References ggc_alloc().

Referenced by gen_subprogram_die().

◆ dwarf_tag_name() [1/2]

static const char * dwarf_tag_name ( unsigned int tag)
static
Convert a DIE tag into its string name.   

References ggc_alloc(), and NULL.

◆ dwarf_tag_name() [2/2]

static const char * dwarf_tag_name ( unsigned )
static

◆ equate_block_to_die()

static void equate_block_to_die ( tree block,
dw_die_ref die )
inlinestatic
Associate DIE with BLOCK.   

References BLOCK_DIE.

Referenced by gen_field_die(), and maybe_create_die_with_external_ref().

◆ equate_decl_number_to_die()

static void equate_decl_number_to_die ( tree decl,
dw_die_ref decl_die )
static
Equate a DIE to a particular declaration.   

References decl_die_table, DECL_UID, and ggc_alloc().

Referenced by decls_for_scope(), maybe_create_die_with_external_ref(), new_dwarf_proc_die(), and record_type_tag().

◆ equate_type_number_to_die()

static void equate_type_number_to_die ( tree type,
dw_die_ref type_die )
inlinestatic
Equate a DIE to a given type specifier.   

References TYPE_SYMTAB_DIE.

Referenced by gen_block_die(), gen_type_die(), and modified_type_die().

◆ expansion_failed()

static void expansion_failed ( tree expr,
rtx rtl,
char const * reason )
static

◆ extract_int() [1/2]

static HOST_WIDE_INT extract_int ( const unsigned char * ,
unsigned  )
static

Referenced by output_die(), and output_loc_operands().

◆ extract_int() [2/2]

static HOST_WIDE_INT extract_int ( const unsigned char * src,
unsigned int size )
static
Reads integers from dw_vec_const array.  Inverse of insert_int.   

References ggc_alloc().

◆ fde_needed_for_eh_p()

static bool fde_needed_for_eh_p ( dw_fde_ref fde)
static

◆ field_byte_offset()

static dw_loc_descr_ref field_byte_offset ( const_tree decl,
struct vlr_context * ctx,
HOST_WIDE_INT * cst_offset )
static
Given a pointer to a FIELD_DECL, compute the byte offset of the lowest
addressed byte of the "containing object" for the given FIELD_DECL. If
possible, return a native constant through CST_OFFSET (in which case NULL is
returned); otherwise return a DWARF expression that computes the offset.

Set *CST_OFFSET to 0 and return NULL if we are unable to determine what
that offset is, either because the argument turns out to be a pointer to an
ERROR_MARK node, or because the offset expression is too complex for us.

CTX is required: see the comment for VLR_CONTEXT.   

References bit_position(), bitsize_zero_node, byte_position(), DECL_BIT_FIELD_TYPE, DECL_FIELD_BIT_OFFSET, DECL_FIELD_OFFSET, DECL_SIZE, field_type(), fold_build2, gcc_assert, ggc_alloc(), wi::gtu_p(), loc_list_from_tree(), wi::lrshift(), NULL, NULL_TREE, offset_int_type_size_in_bits(), PCC_BITFIELD_TYPE_MATTERS, round_up_to_align(), simple_decl_align_in_bits(), simple_type_align_in_bits(), single_element_loc_list_p(), sizetype, vlr_context::struct_type, wi::to_offset(), generic_wide_int< storage >::to_shwi(), TREE_CODE, TREE_TYPE, type(), vlr_context::variant_part_offset, and wide_int_to_tree().

Referenced by add_data_member_location_attribute().

◆ field_type()

static tree field_type ( const_tree decl)
inlinestatic
Given a pointer to what is assumed to be a FIELD_DECL node, return a
pointer to the declared type for the relevant field variable, or return
`integer_type_node' if the given node turns out to be an
ERROR_MARK node.   

References DECL_BIT_FIELD_TYPE, ggc_alloc(), integer_type_node, NULL_TREE, TREE_CODE, TREE_TYPE, and type().

Referenced by field_byte_offset(), gen_ctf_sou_type(), oacc_rewrite_var_decl(), and push_fields_onto_fieldstack().

◆ file_info_cmp()

static int file_info_cmp ( const void * p1,
const void * p2 )
static
Callback function for file_info comparison.  We sort by looking at
the directories in the path.   

References ggc_alloc().

Referenced by output_file_names().

◆ file_name_acquire()

int file_name_acquire ( dwarf_file_data ** slot,
file_name_acquire_data * fnad )
Traversal function for the hash table.   

References DIR_SEPARATOR, dwarf_file_data::emitted_number, dwarf_file_data::filename, g, gcc_assert, ggc_alloc(), and NULL.

Referenced by output_file_names().

◆ fill_variable_array_bounds()

static bool fill_variable_array_bounds ( tree type)
static
Get the decl's label, as described by its RTL. This may be different
from the DECL_NAME name used in the source file.   
For variable-length arrays that have been previously generated, but
may be incomplete due to missing subscript info, fill the subscript
info.  Return TRUE if this is one of those cases.   

◆ find_AT_string()

static struct indirect_string_node * find_AT_string ( const char * str,
enum insert_option insert = INSERT )
static
Add STR to the indirect string hash table.   

References hash_table< Descriptor, Lazy, Allocator >::create_ggc(), debug_str_hash, find_AT_string_in_table(), and insert().

Referenced by add_AT_string(), and output_macinfo().

◆ find_AT_string_in_table()

◆ find_empty_loc_ranges_at_text_label()

int find_empty_loc_ranges_at_text_label ( var_loc_list ** slot,
int  )
Helper function of dwarf2out_end_function, called only after emitting
the very first function into assembly.  Check if some .debug_loc range
might end with a .LVL* label that could be equal to .Ltext0.
In that case we must force using absolute addresses in .debug_loc ranges,
because this range could be .LVLN-.Ltext0 .. .LVLM-.Ltext0 for
.LVLN == .LVLM == .Ltext0, thus 0 .. 0, which is a .debug_loc
list terminator.
Set have_multiple_function_sections to true in that case and
terminate htab traversal.   

References asm_out_file, ASM_OUTPUT_LABEL, call_site_count, cold_text_section, cold_text_section_label, crtl, cur_line_info_table, current_function_decl, FORCE_RESET_NEXT_VIEW, function_section(), gcc_assert, ggc_alloc(), have_multiple_function_sections, set_cur_line_info_table(), switch_to_section(), tail_call_site_count, text_section, unlikely_text_section(), and dw_line_info_table::view.

◆ find_string_form()

◆ flush_limbo_die_list()

static void flush_limbo_die_list ( void )
static
Traverse the limbo die list, and add parent/child links.  The only
dies without parents that should be here are concrete instances of
inline functions, and the comp_unit_die.  We can ignore the comp_unit_die.
For concrete instances, we can get the parent die from the abstract
instance.   

◆ force_decl_die()

static dw_die_ref force_decl_die ( tree decl)
static
Returns the DIE for decl.  A DIE will always be returned.   

References comp_unit_die(), lookup_decl_die(), lookup_type_die(), NULL, strip_naming_typedef(), TYPE_MAIN_VARIANT, and TYPE_P.

Referenced by dwarf2out_decl().

◆ force_type_die()

static dw_die_ref force_type_die ( tree type)
static
Returns the DIE for TYPE, that must not be a base type.  A DIE is
always returned.   

◆ fortran_common()

static tree fortran_common ( tree decl,
HOST_WIDE_INT * value )
static
Check whether decl is a Fortran COMMON symbol.  If not, NULL_TREE is
returned.  If so, the decl for the COMMON block is returned, and the
value is the offset into the common block for the symbol.   

References DECL_ARTIFICIAL, DECL_HAS_VALUE_EXPR_P, DECL_VALUE_EXPR, get_inner_reference(), ggc_alloc(), poly_int< N, C >::is_constant(), is_fortran(), NULL, NULL_TREE, offset, TREE_CODE, tree_fits_shwi_p(), TREE_PUBLIC, TREE_STATIC, tree_to_shwi(), and VAR_P.

◆ free_loc_descr()

bool free_loc_descr ( const dw_loc_descr_ref & loc,
void * data )
Helper for loc_descr_without_nops: free the location description operation
P.   

References ggc_free().

Referenced by loc_descr_without_nops().

◆ function_to_dwarf_procedure()

◆ gen_array_type_die()

static void gen_array_type_die ( tree type,
dw_die_ref context_die )
static
These routines generate the internal representation of the DIE's for
the compilation unit.  Debugging information is collected by walking
the declaration trees passed in from dwarf2out_decl().   

References DECL_RTL, gcc_assert, GET_CODE, ggc_alloc(), MEM_P, XEXP, and XSTR.

◆ gen_block_die()

static void gen_block_die ( tree stmt,
dw_die_ref context_die )
static
Generate a DW_TAG_lexical_block DIE followed by DIEs to represent all of the
things which are local to the given block.   

References add_name_attribute(), auto_die, comp_unit_die(), decltype_auto_die, equate_type_number_to_die(), get_identifier(), ggc_alloc(), IDENTIFIER_POINTER, new_die(), NULL_TREE, and TYPE_IDENTIFIER.

◆ gen_call_site_die()

static dw_die_ref gen_call_site_die ( tree decl,
dw_die_ref subr_die,
struct call_arg_loc_node * ca_loc )
static
Generate a DW_TAG_call_site DIE in function DECL under SUBR_DIE
for CA_LOC call arg loc node.   

◆ gen_compile_unit_die()

static dw_die_ref gen_compile_unit_die ( const char * filename)
static
Generate the DIE for the compilation unit.   

References gcc_unreachable, and ggc_alloc().

Referenced by comp_unit_die().

◆ gen_const_die()

static void gen_const_die ( tree decl,
dw_die_ref context_die )
static
Generate a DIE to represent a named constant.   

References add_AT_loc(), DECL_RTL, ggc_alloc(), reg_loc_descriptor(), and VAR_INIT_STATUS_INITIALIZED.

◆ gen_decl_die()

static dw_die_ref gen_decl_die ( tree decl,
tree origin,
struct vlr_context * ctx,
dw_die_ref context_die )
static
Generate Dwarf debug information for a decl described by DECL.
The return value is currently only meaningful for PARM_DECLs,
for all other decls it returns NULL.

If DECL is a FIELD_DECL, CTX is required: see the comment for VLR_CONTEXT.
It can be NULL otherwise.   

◆ gen_descr_array_type_die()

static void gen_descr_array_type_die ( tree type,
struct array_descr_info * info,
dw_die_ref context_die )
static
This routine generates DIE for array with hidden descriptor, details
are filled into *info by a langhook.   

◆ gen_enumeration_type_die()

static dw_die_ref gen_enumeration_type_die ( tree type,
dw_die_ref context_die,
bool reverse )
static
Generate a DIE to represent an enumeration type.  Note that these DIEs
include all of the information about the enumeration values also. Each
enumerated type name/value is listed as a child of the enumerated type
DIE. REVERSE is true if the type is to be interpreted in the reverse
storage order wrt the target order.   

◆ gen_field_die()

◆ gen_formal_parameter_die()

static dw_die_ref gen_formal_parameter_die ( tree node,
tree origin,
bool emit_name_p,
dw_die_ref context_die )
static
Generate a DIE to represent either a real live formal parameter decl or to
represent just the type of some formal parameter position in some function
type.

Note that this routine is a bit unusual because its argument may be a
..._DECL node (i.e. either a PARM_DECL or perhaps a VAR_DECL which
represents an inlining of some PARM_DECL) or else some sort of a ..._TYPE
node.  If it's the former then this function is being called to output a
DIE to represent a formal parameter object (or some inlining thereof).  If
it's the latter, then this function is only being called to output a
DW_TAG_formal_parameter DIE to stand as a placeholder for some formal
argument type of some subprogram type.
If EMIT_NAME_P is true, name and source coordinate attributes
are emitted.   

Referenced by gen_formal_types_die().

◆ gen_formal_parameter_pack_die()

static dw_die_ref gen_formal_parameter_pack_die ( tree parm_pack,
tree pack_arg,
dw_die_ref subr_die,
tree * next_arg )
static
Generate and return a DW_TAG_GNU_formal_parameter_pack. Also generate
children DW_TAG_formal_parameter DIEs representing the arguments of the
parameter pack.

PARM_PACK must be a function parameter pack.
PACK_ARG is the first argument of the parameter pack. Its TREE_CHAIN
must point to the subsequent arguments of the function PACK_ARG belongs to.
SUBR_DIE is the DIE of the function PACK_ARG belongs to.
If NEXT_ARG is non NULL, *NEXT_ARG is set to the function argument
following the last one for which a DIE was generated.   

◆ gen_formal_types_die()

static void gen_formal_types_die ( tree function_or_method_type,
dw_die_ref context_die )
static
Generate a list of nameless DW_TAG_formal_parameter DIEs (and perhaps a
DW_TAG_unspecified_parameters DIE) to represent the types of the formal
parameters as specified in some function type specification (except for
those which appear as part of a function *definition*).   

References add_src_coords_attributes(), DECL_CHAIN, lang_hooks::decls, lang_hooks::function_parameter_pack_p, lang_hooks_for_decls::function_parm_expanded_from_pack_p, gcc_assert, gen_formal_parameter_die(), ggc_alloc(), new_die(), and NULL.

◆ gen_generic_params_dies()

static void gen_generic_params_dies ( tree t)
static

◆ gen_inheritance_die()

static void gen_inheritance_die ( tree binfo,
tree access,
tree type,
dw_die_ref context_die )
static
Generate the DIE for a base class.   

References ggc_alloc().

◆ gen_inlined_subroutine_die()

static void gen_inlined_subroutine_die ( tree stmt,
dw_die_ref context_die )
static
Generate a DIE for an inlined subprogram.   

◆ gen_internal_sym()

static char * gen_internal_sym ( const char * prefix)
static

◆ gen_label_die()

static void gen_label_die ( tree decl,
dw_die_ref context_die )
static
Generate a DIE to represent a label identifier.   

◆ gen_lexical_block_die()

static void gen_lexical_block_die ( tree stmt,
dw_die_ref context_die )
static
Generate a DIE for a lexical block.   

◆ gen_llsym()

static void gen_llsym ( dw_loc_list_ref list)
inlinestatic
Generate a new internal symbol for this location list node, if it
hasn't got one yet.   

References dwarf2out_locviews_in_attribute(), gcc_assert, gen_internal_sym(), label_num, dw_loc_list_struct::ll_symbol, loc_list_has_views(), and dw_loc_list_struct::vl_symbol.

Referenced by dw_loc_list(), maybe_gen_llsym(), and resolve_addr().

◆ gen_member_die()

static void gen_member_die ( tree type,
dw_die_ref context_die )
static
Generate a DIE for a class member.   

◆ gen_namelist_decl()

static dw_die_ref gen_namelist_decl ( tree name,
dw_die_ref scope_die,
tree item_decls )
static
Output debug information for namelists.    

◆ gen_namespace_die()

static void gen_namespace_die ( tree decl,
dw_die_ref context_die )
static
Generate a DIE for a namespace or namespace alias.   

◆ gen_ptr_to_mbr_type_die()

static void gen_ptr_to_mbr_type_die ( tree type,
dw_die_ref context_die )
static
Generate a DIE for a pointer to a member type.  TYPE can be an
OFFSET_TYPE, for a pointer to data member, or a RECORD_TYPE, for a
pointer to member function.   

◆ gen_remaining_tmpl_value_param_die_attribute()

static void gen_remaining_tmpl_value_param_die_attribute ( void )
static
Add a DW_AT_const_value attribute to DIEs that were scheduled
by append_entry_to_tmpl_value_parm_die_table. This function must
be called after function DIEs have been generated.   

◆ gen_scheduled_generic_parms_dies()

static void gen_scheduled_generic_parms_dies ( void )
static
Generate generic parameters DIEs for instances of generic types
that have been previously scheduled by
schedule_generic_params_dies_gen. This function must be called
after all the types of the CU have been laid out.   

References die_arg_entry_struct::arg, die_arg_entry_struct::die, FOR_EACH_VEC_ELT, ggc_alloc(), i, die_struct::removed, tmpl_value_parm_die_table, and tree_add_const_value_attribute().

◆ gen_struct_or_union_type_die()

static void gen_struct_or_union_type_die ( tree type,
dw_die_ref context_die,
enum debug_info_usage usage )
static
Generate a DIE for a structure or union type.  If TYPE_DECL_SUPPRESS_DEBUG
is set, we pretend that the type was never defined, so we only get the
member DIEs needed by later specification DIEs.   

◆ gen_subprogram_die()

static void gen_subprogram_die ( tree decl,
dw_die_ref context_die )
static

◆ gen_subroutine_type_die()

static void gen_subroutine_type_die ( tree type,
dw_die_ref context_die )
static
Generate a DIE for a subroutine _type_.   

◆ gen_tagged_type_die()

static void gen_tagged_type_die ( tree type,
dw_die_ref context_die,
enum debug_info_usage usage,
bool reverse )
static
Generate a DIE for a struct, class, enum or union type.   

◆ gen_type_die()

◆ gen_type_die_for_member()

static void gen_type_die_for_member ( tree type,
tree member,
dw_die_ref context_die )
static
We want to generate the DIE for TYPE so that we can generate the
die for MEMBER, which has been defined; we will need to refer back
to the member declaration nested within TYPE.  If we're trying to
generate minimal debug info for TYPE, processing TYPE won't do the
trick; we need to attach the member declaration by hand.   

◆ gen_type_die_with_usage()

static void gen_type_die_with_usage ( tree type,
dw_die_ref context_die,
enum debug_info_usage usage,
bool reverse )
static
Generate a type description DIE.   

◆ gen_typedef_die()

static void gen_typedef_die ( tree decl,
dw_die_ref context_die )
static
Generate a DIE for a type definition.   

◆ gen_unspecified_parameters_die()

static void gen_unspecified_parameters_die ( tree decl_or_type,
dw_die_ref context_die )
static
Generate a special type of DIE used as a stand-in for a trailing ellipsis
at the end of an (ANSI prototyped) formal parameters list.   

◆ gen_variable_die()

static void gen_variable_die ( tree decl,
tree origin,
dw_die_ref context_die )
static
Generate a DIE to represent a declared data object.
Either DECL or ORIGIN must be non-null.   

References DECL_CONTEXT, gcc_assert, ggc_alloc(), TREE_CODE, TREE_STATIC, and VAR_P.

◆ gen_variant_part()

static void gen_variant_part ( tree variant_part_decl,
struct vlr_context * vlr_ctx,
dw_die_ref context_die )
static
Generate a DIE to represent VARIANT_PART_DECL, a variant part that is part
of STRUCT_TYPE, a record type.  This new DIE is emitted as the next child
under CONTEXT_DIE.

Variant parts are supposed to be implemented as a FIELD_DECL whose type is a
QUAL_UNION_TYPE: this is the VARIANT_PART_DECL parameter.  The members for
this type, which are record types, represent the available variants and each
has a DECL_QUALIFIER attribute.  The discriminant and the discriminant
values are inferred from these attributes.

In trees, the offsets for the fields inside these sub-records are relative
to the variant part itself, whereas the corresponding DIEs should have
offset attributes that are relative to the embedding record base address.
This is why the caller must provide a VARIANT_PART_OFFSET expression: it
must be an expression that computes the offset of the variant part to
describe in DWARF.   

References dw_discr_list_node::dw_discr_next, ggc_alloc(), and i.

◆ generate_skeleton()

◆ generate_skeleton_ancestor_tree()

static void generate_skeleton_ancestor_tree ( skeleton_chain_node * node)
static
Generate the skeleton ancestor tree for the given NODE, then clone
the DIE and add the clone into the tree.   

References add_child_die(), clone_as_declaration(), generate_skeleton_ancestor_tree(), skeleton_chain_struct::new_die, NULL, skeleton_chain_struct::old_die, and skeleton_chain_struct::parent.

Referenced by generate_skeleton_ancestor_tree(), and generate_skeleton_bottom_up().

◆ generate_skeleton_bottom_up()

static void generate_skeleton_bottom_up ( skeleton_chain_node * parent)
static
Generate a skeleton tree of DIEs containing any declarations that are
found in the original tree.  We traverse the tree looking for declaration
DIEs, and construct the skeleton from the bottom up whenever we find one.   

References add_child_die(), clone_die(), die_struct::comdat_type_p, die_struct::die_child, die_struct::die_sib, generate_skeleton_ancestor_tree(), generate_skeleton_bottom_up(), ggc_alloc(), is_declaration_die(), is_template_instantiation(), move_all_children(), skeleton_chain_struct::new_die, NULL, skeleton_chain_struct::old_die, skeleton_chain_struct::parent, remove_AT(), remove_child_with_prev(), and replace_child().

Referenced by generate_skeleton(), and generate_skeleton_bottom_up().

◆ generate_type_signature()

static void generate_type_signature ( dw_die_ref die,
comdat_type_node * type_node )
static
Generate the type signature for DIE.  This is computed by generating an
MD5 checksum over the DIE's tag, its relevant attributes, and its
children.  Attributes that are references to other DIEs are processed
by recursion, using the MARK field to prevent infinite recursion.
If the DIE is nested inside a namespace or another type, we also
need to include that context in the signature.  The lower 64 bits
of the resulting MD5 checksum comprise the signature.   

References add_AT_data8(), checksum_die_context(), die_struct::comdat_type_p, die_checksum_ordered(), die_struct::die_id, die_struct::die_mark, die_odr_checksum(), die_struct::die_tag, die_struct::die_symbol_or_type_node::die_type_node, DWARF_TYPE_SIGNATURE_SIZE, get_AT_ref(), get_AT_string(), get_die_parent(), ggc_alloc(), is_cxx(), NULL, and unmark_all_dies().

Referenced by break_out_comdat_types().

◆ generic_parameter_die()

static dw_die_ref generic_parameter_die ( tree parm,
tree arg,
bool emit_name_p,
dw_die_ref parent_die )
static
Create and return a DIE for PARM which should be
the representation of a generic type parameter.
For instance, in the C++ front end, PARM would be a template parameter.
ARG is the argument to PARM.
EMIT_NAME_P if tree, the DIE will have DW_AT_name attribute set to the
name of the PARM.
PARENT_DIE is the parent DIE which the new created DIE should be added to,
as a child node.   

References add_AT_string(), add_type_attribute(), append_entry_to_tmpl_value_parm_die_table(), DECL_INITIAL, DECL_NAME, lang_hooks::decls, dwarf2_name(), gcc_assert, gcc_unreachable, lang_hooks_for_decls::generic_generic_parameter_decl_p, ggc_alloc(), IDENTIFIER_POINTER, new_die(), NULL, TREE_CODE, TREE_THIS_VOLATILE, TREE_TYPE, TYPE_NAME, TYPE_P, TYPE_QUAL_VOLATILE, TYPE_UNQUALIFIED, and VAR_P.

Referenced by gen_generic_params_dies(), and template_parameter_pack_die().

◆ generic_type_p()

static bool generic_type_p ( tree t)
static
Return TRUE if T is an instance of generic type, FALSE
otherwise.   

References asm_out_file, fputc(), ggc_alloc(), and output_quoted_string().

◆ get_AT()

◆ get_AT_file()

struct dwarf_file_data * get_AT_file ( dw_die_ref die,
enum dwarf_attribute attr_kind )

References a, AT_file(), get_AT(), ggc_alloc(), and NULL.

Referenced by ctf_get_die_loc_file().

◆ get_AT_flag()

int get_AT_flag ( dw_die_ref die,
enum dwarf_attribute attr_kind )
Return the value of the flag attribute designated by ATTR_KIND, or -1
if it is not present.   

References a, AT_flag(), get_AT(), and ggc_alloc().

Referenced by gen_ctf_array_type(), gen_ctf_enumeration_type(), gen_ctf_function_type(), gen_ctf_sou_type(), gen_ctf_variable(), and output_pubname().

◆ get_AT_low_pc()

static const char * get_AT_low_pc ( dw_die_ref die)
inlinestatic
Return the "low pc" attribute value, typically associated with a subprogram
DIE.  Return null if the "low pc" attribute is either not present, or if it
cannot be represented as an assembler label identifier.   

References a, AT_lbl(), get_AT(), ggc_alloc(), and NULL.

Referenced by output_die().

◆ get_AT_ref()

◆ get_AT_string()

◆ get_AT_unsigned()

◆ get_base_type_offset()

static unsigned long int get_base_type_offset ( dw_die_ref ref)
static
Return die_offset of a DIE reference to a base type.   

References calc_base_type_die_sizes(), comp_unit_die(), die_struct::die_offset, and gcc_assert.

Referenced by output_loc_operands(), and size_of_loc_descr().

◆ get_context_die()

static dw_die_ref get_context_die ( tree context)
inlinestatic
Returns the DIE for a context.   

Referenced by declare_in_namespace(), and function_to_dwarf_procedure().

◆ get_die_parent()

static dw_die_ref get_die_parent ( dw_die_ref die)
static
Returns the parent of the declaration of DIE.   

References die_struct::die_parent, get_AT_ref(), ggc_alloc(), and NULL.

Referenced by generate_type_signature().

◆ get_discr_value()

static bool get_discr_value ( tree src,
dw_discr_value * dest )
static
Check that SRC is a constant integer that can be represented as a native
integer constant (either signed or unsigned).  If so, store it into DEST and
return true.  Return false otherwise.  

◆ get_full_len()

static unsigned int get_full_len ( const dw_wide_int & op)
static
Get the number of HOST_WIDE_INTs needed to represent the precision
of the number.   

References CEIL, dw_wide_int::get_precision(), and HOST_BITS_PER_WIDE_INT.

Referenced by attr_checksum(), attr_checksum_ordered(), hash_locs(), output_die(), output_loc_operands(), size_of_die(), size_of_loc_descr(), and value_format().

◆ get_nearest_type_subqualifiers()

static int get_nearest_type_subqualifiers ( tree type,
int type_quals,
int qual_mask )
static
Determine the TYPE whose qualifiers match the largest strict subset
of the given TYPE_QUALS, and return its qualifiers.  Ignore all
qualifiers outside QUAL_MASK.   

References check_base_type(), ggc_alloc(), popcount_hwi(), TYPE_MAIN_VARIANT, TYPE_NEXT_VARIANT, and TYPE_QUALS.

Referenced by modified_type_die().

◆ get_ref_die_offset()

static unsigned long int get_ref_die_offset ( dw_die_ref ref)
static
Return die_offset of a DIE reference other than base type.   

References die_struct::die_offset, and gcc_assert.

Referenced by output_loc_operands().

◆ get_ref_die_offset_label()

static void get_ref_die_offset_label ( char * label,
dw_die_ref ref )
static
Set label to debug_info_section_label + die_offset of a DIE reference.   

References debug_info_section_label, die_struct::die_offset, and ggc_alloc().

Referenced by output_loc_operands().

◆ hash_loc_list()

static void hash_loc_list ( dw_loc_list_ref list_head)
inlinestatic
Compute hash of the whole location list LIST_HEAD.   

◆ hash_loc_operands()

static void hash_loc_operands ( dw_loc_descr_ref loc,
inchash::hash & hstate )
static
Helper routines for optimize_location_lists.
This pass tries to share identical local lists in .debug_loc
section.   
Iteratively hash operands of LOC opcode into HSTATE.   

Referenced by loc_checksum(), and loc_checksum_ordered().

◆ hash_locs()

static void hash_locs ( dw_loc_descr_ref loc,
inchash::hash & hstate )
inlinestatic
Iteratively hash the whole DWARF location expression LOC into HSTATE.   

References dw_val_class_const, dw_val_class_const_double, dw_val_class_vec, dw_val_class_wide_int, get_full_len(), and ggc_alloc().

◆ highest_c_language()

static const char * highest_c_language ( const char * lang1,
const char * lang2 )
static
Given a C and/or C++ language/version string return the "highest".
C++ is assumed to be "higher" than C in this case.  Used for merging
LTO translation unit languages.   

◆ implicit_ptr_descriptor()

static dw_loc_descr_ref implicit_ptr_descriptor ( rtx rtl,
HOST_WIDE_INT offset )
static
Helper function for loc_descriptor.  Return DW_OP_implicit_pointer
for DEBUG_IMPLICIT_PTR RTL.   

References DEBUG_IMPLICIT_PTR_DECL, dw_val_class_const, dw_val_class_decl_ref, dw_val_class_die_ref, dwarf_OP(), gcc_assert, ggc_alloc(), lookup_decl_die(), new_loc_descr(), NULL, offset, TREE_CODE, and VAR_P.

Referenced by loc_descriptor().

◆ include_pubname_in_output()

static bool include_pubname_in_output ( vec< pubname_entry, va_gc > * table,
pubname_entry * p )
static
Calculate if the entry should appear in the final output file.  It may be
from a pruned a type.   

References pubname_struct::die, die_struct::die_offset, die_struct::die_parent, die_struct::die_perennial_p, die_struct::die_tag, ggc_alloc(), is_declaration_die(), NULL, pubname_table, and table.

Referenced by output_pubnames(), and size_of_pubnames().

◆ index_addr_table_entry()

int index_addr_table_entry ( addr_table_entry ** h,
unsigned int * index )
A helper function for dwarf2out_finish called through
htab_traverse.  Assign an addr_table_entry its index.  All entries
must be collected into the table when this function is called,
because the indexing code relies on htab_traverse to traverse nodes
in the same order for each run.  

References gcc_assert, ggc_alloc(), addr_table_entry::index, NO_INDEX_ASSIGNED, and addr_table_entry::refcount.

◆ index_location_lists()

static void index_location_lists ( dw_die_ref die)
static
Recursively assign each location list a unique index into the debug_addr
section.   

◆ index_rnglists()

◆ index_string()

int index_string ( indirect_string_node ** h,
unsigned int * index )
A helper function for dwarf2out_finish called through
htab_traverse.  Assign a string its index.  All strings must be
collected into the table by the time index_string is called,
because the indexing code relies on htab_traverse to traverse nodes
in the same order for each run.  

◆ init_addr_table_entry()

◆ init_sections_and_labels()

static unsigned init_sections_and_labels ( bool early_lto_debug)
static
Initialize the various sections and labels for dwarf output and prefix
them with PREFIX if non-NULL.  Returns the generation (zero based
number of times function was called).   

◆ insert_float()

static unsigned insert_float ( const_rtx rtl,
unsigned char * array )
static
Writes floating point values to dw_vec_const array.   

References CONST_DOUBLE_REAL_VALUE, gcc_assert, GET_MODE, GET_MODE_SIZE(), ggc_alloc(), i, insert_int(), and real_to_target().

Referenced by add_const_value_attribute(), loc_descriptor(), and mem_loc_descriptor().

◆ insert_int() [1/2]

static void insert_int ( HOST_WIDE_INT val,
unsigned int size,
unsigned char * dest )
static
Writes integer values to dw_vec_const array.   

◆ insert_int() [2/2]

static void insert_int ( HOST_WIDE_INT ,
unsigned ,
unsigned char *  )
static

Referenced by insert_float(), and insert_wide_int().

◆ insert_wide_int()

static void insert_wide_int ( const wide_int_ref & val,
unsigned char * dest,
int elt_size )
static
Writes wide_int values to dw_vec_const array.   

References generic_wide_int< storage >::elt(), gcc_assert, ggc_alloc(), HOST_BITS_PER_WIDE_INT, i, and insert_int().

Referenced by add_const_value_attribute(), and loc_descriptor().

◆ int_loc_descriptor()

◆ int_shift_loc_descriptor()

static dw_loc_descr_ref int_shift_loc_descriptor ( HOST_WIDE_INT i,
int shift )
static
Return a location descriptor that designates a constant i,
as a compound operation from constant (i >> shift), constant shift
and DW_OP_shl.   

References add_loc_descr(), ggc_alloc(), i, int_loc_descriptor(), new_loc_descr(), and shift.

Referenced by int_loc_descriptor().

◆ is_ada()

static bool is_ada ( void )
inlinestatic
Return TRUE if the language is Ada.   

References comp_unit_die(), get_AT_unsigned(), and ggc_alloc().

Referenced by output_pubname().

◆ is_base_type()

static bool is_base_type ( tree type)
inlinestatic
Given a pointer to an arbitrary ..._TYPE tree node, return true if the
given input type is a Dwarf "fundamental" type.  Otherwise return null.   

References gcc_unreachable, ggc_alloc(), is_cxx_auto(), and TREE_CODE.

Referenced by modified_type_die().

◆ is_based_loc()

static bool is_based_loc ( const_rtx rtl)
inlinestatic
Return true if this RTL expression describes a base+offset calculation.   

References CONST_INT_P, GET_CODE, ggc_alloc(), REG_P, REGNO, and XEXP.

Referenced by mem_loc_descriptor().

◆ is_c()

static bool is_c ( void )
inlinestatic
Return TRUE if the language is C.   

References comp_unit_die(), get_AT_unsigned(), and ggc_alloc().

◆ is_cu_die()

static bool is_cu_die ( dw_die_ref c)
inlinestatic
Returns true iff C is a compile-unit DIE.   

References die_struct::die_tag, and ggc_alloc().

Referenced by add_pubname(), add_pubtype(), and reset_dies().

◆ is_cxx() [1/2]

static bool is_cxx ( const_tree decl)
static
Return TRUE if DECL was created by the C++ frontend.   

References get_ultimate_context(), ggc_alloc(), is_cxx(), startswith(), and TRANSLATION_UNIT_LANGUAGE.

◆ is_cxx() [2/2]

static bool is_cxx ( void )
inlinestatic

◆ is_cxx_auto()

static bool is_cxx_auto ( tree type)
inlinestatic
A C++ function with deduced return type can have a TEMPLATE_TYPE_PARM
named 'auto' in its type: return true for it, false otherwise.   

References get_identifier(), is_cxx(), and TYPE_IDENTIFIER.

Referenced by is_base_type().

◆ is_declaration_die()

◆ is_dlang()

static bool is_dlang ( void )
inlinestatic
Return TRUE if the language is D.   

References comp_unit_die(), get_AT_unsigned(), and ggc_alloc().

◆ is_fortran() [1/2]

◆ is_fortran() [2/2]

static bool is_fortran ( void )
inlinestatic
Return TRUE if the language is Fortran.   

References comp_unit_die(), get_AT_unsigned(), and ggc_alloc().

Referenced by fortran_common(), is_fortran(), and maybe_create_die_with_external_ref().

◆ is_handled_procedure_type()

static bool is_handled_procedure_type ( tree type)
static
Return whether TYPE is a supported type as a DWARF procedure argument
type or return type (we handle only scalar types and pointer types that
aren't wider than the DWARF expression evaluation stack).   

References DWARF2_ADDR_SIZE, ggc_alloc(), int_size_in_bytes(), INTEGRAL_TYPE_P, and TREE_CODE.

Referenced by function_to_dwarf_procedure(), and loc_list_from_tree_1().

◆ is_namespace_die()

static bool is_namespace_die ( dw_die_ref c)
inlinestatic
Returns true iff C is a namespace DIE.   

References die_struct::die_tag, and ggc_alloc().

Referenced by add_pubname(), and add_pubtype().

◆ is_naming_typedef_decl()

static bool is_naming_typedef_decl ( const_tree decl)
static
Return TRUE if TYPE is a typedef that names a type for linkage
purposes. This kind of typedefs is produced by the C++ FE for
constructs like:

typedef struct {...} foo;

In that case, there is no typedef variant type produced for foo.
Rather, the TREE_TYPE of the TYPE_DECL of foo is the anonymous
struct type.   

Referenced by strip_naming_typedef().

◆ is_nested_in_subprogram()

static bool is_nested_in_subprogram ( dw_die_ref die)
static
Return true if this DIE is nested inside a subprogram.   

References get_AT_ref(), ggc_alloc(), local_scope_p(), and NULL.

Referenced by should_move_die_to_comdat().

◆ is_pseudo_reg()

static bool is_pseudo_reg ( const_rtx rtl)
inlinestatic
Forward declarations for functions defined in this file.   
Test if rtl node points to a pseudo register.   

References GET_CODE, ggc_alloc(), REG_P, REGNO, and SUBREG_REG.

Referenced by rtl_for_decl_location().

◆ is_redundant_typedef()

static bool is_redundant_typedef ( const_tree decl)
static

◆ is_rust()

static bool is_rust ( void )
inlinestatic
Return TRUE if the language is Rust.
Note, returns FALSE for dwarf_version < 5 && dwarf_strict.  

References comp_unit_die(), get_AT_unsigned(), and ggc_alloc().

Referenced by base_type_die().

◆ is_tagged_type()

static bool is_tagged_type ( const_tree type)
inlinestatic
Return true if the given type node represents a tagged type.   

References ggc_alloc(), and TREE_CODE.

◆ is_template_instantiation()

static bool is_template_instantiation ( dw_die_ref die)
inlinestatic
Return true if this DIE represents a template instantiation.   

References die_struct::die_tag, FOR_EACH_CHILD, ggc_alloc(), is_template_parameter(), and is_type_die().

Referenced by die_checksum_ordered(), generate_skeleton(), and generate_skeleton_bottom_up().

◆ is_template_parameter()

static bool is_template_parameter ( dw_die_ref die)
inlinestatic
Return true if this DIE is a template parameter.   

References die_struct::die_tag, and ggc_alloc().

Referenced by is_template_instantiation().

◆ is_trivial_indirect_ref()

static bool is_trivial_indirect_ref ( tree expr)
static
Return whether EXPR is an expression with the following pattern:
INDIRECT_REF (NOP_EXPR (INTEGER_CST)).   

◆ is_type_die()

static bool is_type_die ( dw_die_ref die)
static
Returns true if DIE represents a type, in the sense of TYPE_P.   

References die_struct::die_tag, and ggc_alloc().

Referenced by build_abbrev_table(), die_checksum_ordered(), generate_skeleton(), is_template_instantiation(), and optimize_external_refs_1().

◆ is_unit_die()

static bool is_unit_die ( dw_die_ref c)
inlinestatic
Returns true iff C is a unit DIE of some sort.   

References die_struct::die_tag, and ggc_alloc().

Referenced by copy_ancestor_tree(), copy_declaration_context(), and copy_decls_walk().

◆ is_variant_part()

static bool is_variant_part ( tree decl)
static
Return whether DECL is a FIELD_DECL that represents the variant part of a
structure.   

◆ loc_checksum()

static void loc_checksum ( dw_loc_descr_ref loc,
struct md5_ctx * ctx )
inlinestatic
Calculate the checksum of a location expression.   

References CHECKSUM, dw_loc_descr_node::dtprel, dw_loc_descr_node::dw_loc_opc, ggc_alloc(), and hash_loc_operands().

Referenced by attr_checksum().

◆ loc_checksum_ordered()

◆ loc_descr_equal_p()

bool loc_descr_equal_p ( dw_loc_descr_ref a,
dw_loc_descr_ref b )
Compare two complete location expressions for exact equality.   

References a, b, loc_descr_equal_p_1(), and NULL.

Referenced by cfi_oprnd_equal_p().

◆ loc_descr_equal_p_1()

static bool loc_descr_equal_p_1 ( dw_loc_descr_ref a,
dw_loc_descr_ref b )
static
Compare two location atoms for exact equality.   

References a, b, and dw_val_equal_p().

Referenced by loc_descr_equal_p().

◆ loc_descr_plus_const()

◆ loc_descr_to_next_no_nop()

static void loc_descr_to_next_no_nop ( dw_loc_descr_ref & loc,
hash_set< dw_loc_descr_ref > & nops )
static
Set LOC to the next operation that is not a DW_OP_nop operation. In the case
all operations from LOC are nops, move to the last one.  Insert in NOPS all
operations that are skipped.   

References dw_loc_descr_node::dw_loc_next, dw_loc_descr_node::dw_loc_opc, ggc_alloc(), and NULL.

Referenced by loc_descr_without_nops().

◆ loc_descr_without_nops()

static void loc_descr_without_nops ( dw_loc_descr_ref & loc)
static
Remove all DW_OP_nop operations from LOC except, if it exists, the one that
finishes LOC.   

References dw_loc_descr_node::dw_loc_next, dw_loc_descr_node::dw_loc_opc, dw_val_class_loc, free_loc_descr(), ggc_alloc(), loc_descr_to_next_no_nop(), and NULL.

Referenced by function_to_dwarf_procedure(), and loc_list_from_tree().

◆ loc_descriptor()

static dw_loc_descr_ref loc_descriptor ( rtx rtl,
machine_mode mode,
enum var_init_status initialized )
static
Output a proper Dwarf location descriptor for a variable or parameter
which is either allocated in a register or in a memory location.  For a
register, we just generate an OP_REG and the register number.  For a
memory location we provide a Dwarf postfix expression describing how to
generate the (dynamic) address of the object onto the address stack.

MODE is mode of the decl if this loc_descriptor is going to be used in
.debug_loc section where DW_OP_stack_value and DW_OP_implicit_value are
allowed, VOIDmode otherwise.

If we don't know how to describe it, return 0.   

References add_loc_descr(), add_loc_descr_op_piece(), address_of_int_loc_descriptor(), alloc_dw_wide_int(), avoid_constant_pool_reference(), concat_loc_descriptor(), concatn_loc_descriptor(), CONST_DOUBLE_AS_FLOAT_P, CONST_INT_P, const_ok_for_output(), CONST_SCALAR_INT_P, CONST_VECTOR_ELT, CONST_VECTOR_NUNITS, dtprel_false, dw_val_class_const_double, dw_val_class_vec, dw_val_class_wide_int, DWARF2_ADDR_SIZE, gcc_assert, gcc_unreachable, get_address_mode(), GET_CODE, GET_MODE, GET_MODE_CLASS, GET_MODE_INNER, GET_MODE_SIZE(), GET_MODE_UNIT_SIZE, GET_NUM_ELEM, ggc_alloc(), i, implicit_ptr_descriptor(), initialized, insert_float(), insert_wide_int(), INTVAL, loc_descriptor(), mem_loc_descriptor(), new_addr_loc_descr(), new_loc_descr(), NULL, PAT_VAR_LOCATION_LOC, reg_loc_descriptor(), REG_P, RTVEC_ELT, rtx_to_double_int(), SCALAR_FLOAT_MODE_P, subreg_lowpart_p(), SUBREG_REG, tls_mem_loc_descriptor(), used_rtx_array, vec_safe_push(), XEXP, and XVEC.

Referenced by concat_loc_descriptor(), concatn_loc_descriptor(), dw_loc_list_1(), loc_descriptor(), and loc_list_from_tree_1().

◆ loc_descriptor_from_tree()

static dw_loc_descr_ref loc_descriptor_from_tree ( tree loc,
int want_address,
struct loc_descr_context * context )
static
Same as above but return only single location expression.   

References expansion_failed(), ggc_alloc(), loc_list_from_tree(), NULL, and NULL_RTX.

Referenced by dwarf2out_set_name(), function_to_dwarf_procedure(), loc_list_from_tree_1(), and tls_mem_loc_descriptor().

◆ loc_list_for_address_of_addr_expr_of_indirect_ref()

static dw_loc_list_ref loc_list_for_address_of_addr_expr_of_indirect_ref ( tree loc,
bool toplev,
loc_descr_context * context )
static
Return dw_loc_list representing address of addr_expr LOC
by looking for inner INDIRECT_REF expression and turning
it into simple arithmetics.

See loc_list_from_tree for the meaning of CONTEXT.   

References add_loc_descr_to_each(), add_loc_list(), DWARF2_ADDR_SIZE, expansion_failed(), get_inner_reference(), ggc_alloc(), INDIRECT_REF_P, int_size_in_bytes(), poly_int< N, C >::is_constant(), known_eq, loc_list_from_tree(), loc_list_plus_const(), new_loc_descr(), NULL, NULL_RTX, offset, STRIP_NOPS, TREE_OPERAND, and TREE_TYPE.

Referenced by loc_list_from_tree_1().

◆ loc_list_from_tree()

static dw_loc_list_ref loc_list_from_tree ( tree loc,
int want_address,
struct loc_descr_context * context )
static

◆ loc_list_from_tree_1()

static dw_loc_list_ref loc_list_from_tree_1 ( tree loc,
int want_address,
struct loc_descr_context * context )
static
Generate Dwarf location list representing LOC.
If WANT_ADDRESS is false, expression computing LOC will be computed
If WANT_ADDRESS is 1, expression computing address of LOC will be returned
if WANT_ADDRESS is 2, expression computing address useable in location
  will be returned (i.e. DW_OP_reg can be used
  to refer to register values).

CONTEXT provides information to customize the location descriptions
generation.  Its context_type field specifies what type is implicitly
referenced by DW_OP_push_object_address.  If it is NULL_TREE, this operation
will not be generated.

Its DPI field determines whether we are generating a DWARF expression for a
DWARF procedure, so PARM_DECL references are processed specifically.

If CONTEXT is NULL, the behavior is the same as if context_type, base_decl
and dpi fields were null.   

References add_loc_descr(), add_loc_descr_to_each(), add_loc_list(), address_of_int_loc_descriptor(), loc_descr_context::base_decl, base_type_for_mode(), build2(), build3(), CALL_EXPR_ARG, call_expr_nargs, CASE_CONVERT, COMPOUND_LITERAL_EXPR_DECL, CONST_INT_P, const_ok_for_output(), CONSTANT_P, CONSTRUCTOR_ELTS, loc_descr_context::context_type, cst_pool_loc_descr(), current_function_decl, decl_address_ip_invariant_p(), DECL_ARGUMENTS, DECL_BIT_FIELD, DECL_CONTEXT, DECL_EXTERNAL, DECL_HAS_VALUE_EXPR_P, DECL_IGNORED_P, DECL_MODE, DECL_NONLOCAL_FRAME, DECL_SIZE_UNIT, DECL_THREAD_LOCAL_P, DECL_VALUE_EXPR, dw_val_node::dw_val_struct_union::dw_val_die_union::die, do_binop(), do_unop(), loc_descr_context::dpi, dtprel_false, dtprel_true, dw_loc_list(), dw_loc_descr_node::dw_loc_oprnd2, dw_val_class_decl_ref, dw_val_class_die_ref, dw_val_class_loc, DWARF2_ADDR_SIZE, dwarf_OP(), early_dwarf, exact_log2(), expansion_failed(), dw_val_node::dw_val_struct_union::dw_val_die_union::external, var_loc_list_def::first, dwarf_procedure_info::fndecl, FOR_EACH_VEC_SAFE_ELT, function_to_dwarf_procedure(), gcc_assert, gcc_unreachable, get_address_mode(), get_callee_fndecl(), GET_CODE, get_inner_reference(), GET_MODE, GET_MODE_MASK, GET_MODE_SIZE(), ggc_alloc(), ggc_free(), i, int_byte_position(), int_loc_descriptor(), int_size_in_bytes(), integer_type_node, integer_zerop(), INTEGRAL_TYPE_P, INTTYPE_MINIMUM, INTVAL, poly_int< N, C >::is_constant(), is_handled_procedure_type(), known_eq, loc_descriptor(), loc_descriptor_from_tree(), loc_list_for_address_of_addr_expr_of_indirect_ref(), loc_list_from_tree(), loc_list_from_tree_1(), loc_list_from_uint_comparison(), loc_list_plus_const(), lookup_decl_die(), lookup_decl_loc(), mem_loc_descriptor(), MEM_P, new_addr_loc_descr(), new_loc_descr(), new_loc_list(), NULL, NULL_RTX, NULL_TREE, offset, loc_descr_context::placeholder_arg, loc_descr_context::placeholder_seen, POINTER_TYPE_P, poly_int_tree_p(), rtl_for_decl_location(), SCALAR_INT_TYPE_MODE, wi::sext(), size_of_loc_descr(), size_of_uleb128(), loc_descr_context::strict_signedness, STRIP_NOPS, targetm, wi::to_offset(), TREE_CHAIN, TREE_CODE, tree_fits_shwi_p(), tree_fits_uhwi_p(), TREE_OPERAND, tree_to_shwi(), tree_to_uhwi(), TREE_TYPE, TYPE_CONTEXT, TYPE_MODE, TYPE_UNSIGNED, typed_binop_from_tree(), uint_loc_descriptor(), dw_val_node::v, dw_val_node::val_class, dw_val_node::dw_val_struct_union::val_die_ref, VAR_INIT_STATUS_INITIALIZED, VAR_P, and XEXP.

Referenced by loc_list_from_tree(), and loc_list_from_tree_1().

◆ loc_list_from_uint_comparison()

static dw_loc_list_ref loc_list_from_uint_comparison ( dw_loc_list_ref left,
dw_loc_list_ref right,
enum tree_code kind )
static
Likewise, but takes the location description lists (might be destructive on
them).  Return NULL if either is NULL or if concatenation fails.   

References add_loc_descr_to_each(), add_loc_list(), NULL, and uint_comparison_loc_list().

Referenced by loc_list_from_tree_1().

◆ loc_list_has_views()

static bool loc_list_has_views ( dw_loc_list_ref list)
static
Return true iff there's any nonzero view number in the loc list.

??? When views are not enabled, we'll often extend a single range
to the entire function, so that we emit a single location
expression rather than a location list.  With views, even with a
single range, we'll output a list if start or end have a nonzero
view.  If we change this, we may want to stop splitting a single
range in dw_loc_list just because of a nonzero view, even if it
straddles across hot/cold partitions.   

References dw_loc_list_struct::dw_loc_next, ggc_alloc(), NULL, and ZERO_VIEW_P.

Referenced by gen_llsym(), and maybe_gen_llsym().

◆ loc_list_plus_const()

static void loc_list_plus_const ( dw_loc_list_ref list_head,
poly_int64 offset )
static

◆ local_function_static()

static bool local_function_static ( tree decl)
inlinestatic
Return true if DECL is a local static.   

References ggc_alloc().

Referenced by dwarf2out_type_decl().

◆ local_scope_p()

static bool local_scope_p ( dw_die_ref context_die)
inlinestatic
Returns true if CONTEXT_DIE is internal to a function.   

Referenced by is_nested_in_subprogram().

◆ long_double_as_float128()

static tree long_double_as_float128 ( tree type)
static
If TYPE is long double or complex long double that
should be emitted as artificial typedef to _Float128 or
complex _Float128, return the type it should be emitted as.
This is done in case the target already supports 16-byte
composite floating point type (ibm_extended_format).   

References COMPLEX_FLOATN_NX_TYPE_NODE, complex_long_double_type_node, float128_type_node, FOR_EACH_MODE_IN_CLASS, GET_MODE_SIZE(), ggc_alloc(), i, known_eq, long_double_type_node, MODE_COMPOSITE_P, NULL_TREE, NUM_FLOATN_NX_TYPES, TREE_CODE, TREE_TYPE, and TYPE_MODE.

Referenced by modified_type_die().

◆ lookup_block_die()

static dw_die_ref lookup_block_die ( tree block)
inlinestatic

◆ lookup_context_die()

static dw_die_ref lookup_context_die ( tree context)
inlinestatic
Looks up the DIE for a context.   

◆ lookup_decl_die()

◆ lookup_decl_loc()

static var_loc_list * lookup_decl_loc ( const_tree decl)
inlinestatic
Return the var_loc list associated with a given declaration.   

References decl_loc_table, DECL_UID, and NULL.

Referenced by add_location_or_const_value_attribute(), and loc_list_from_tree_1().

◆ lookup_external_ref()

static struct external_ref * lookup_external_ref ( external_ref_hash_type * map,
dw_die_ref die )
static
Return a pointer to the external_ref for references to DIE.   

References ggc_alloc(), map, and external_ref::type.

Referenced by build_abbrev_table(), and optimize_external_refs_1().

◆ lookup_filename()

static struct dwarf_file_data * lookup_filename ( const char * file_name)
static
Lookup FILE_NAME (in the list of filenames that we know about here in
dwarf2out.cc) and return its "index".  The index of each (known) filename is
just a unique number which is associated with only that one filename.  We
need such numbers for the sake of generating labels (in the .debug_sfnames
section) and references to those files numbers (in the .debug_srcinfo
and .debug_macinfo sections).  If the filename given as an argument is not
found in our current list, add it to the list and assign it the next
available unique index number.   

Referenced by add_linkage_name(), and output_index_string_offset().

◆ lookup_type_die()

◆ lookup_type_die_strip_naming_typedef()

static dw_die_ref lookup_type_die_strip_naming_typedef ( tree type)
inlinestatic
Like lookup_type_die, but if type is an anonymous type named by a
typedef[1], return the DIE of the anonymous type instead the one of
the naming typedef.  This is because in gen_typedef_die, we did
equate the anonymous struct named by the typedef with the DIE of
the naming typedef. So by default, lookup_type_die on an anonymous
struct yields the DIE of the naming typedef.

[1]: Read the comment of is_naming_typedef_decl to learn about what
a naming typedef is.   

References lookup_type_die(), and strip_naming_typedef().

◆ lower_bound_default()

static int lower_bound_default ( void )
static
Return the default for DW_AT_lower_bound, or -1 if there is not any
default.   

References dwarf_procedure_info::args_count, dwarf_procedure_info::fndecl, ggc_alloc(), NULL_TREE, and resolve_args_picking().

◆ mangle_referenced_decls()

static tree mangle_referenced_decls ( tree * tp,
int * walk_subtrees,
void *  )
static

◆ mark_base_types() [1/2]

◆ mark_base_types() [2/2]

static void mark_base_types ( dw_loc_descr_ref loc)
static
Helper function for resolve_addr, mark DW_TAG_base_type nodes
referenced from typed stack ops and count how often they are used.   

Referenced by mark_base_types().

◆ mark_dies()

static void mark_dies ( dw_die_ref die)
static
Set the marks for a die and its children.  We do this so
that we know whether or not a reference needs to use FORM_ref_addr; only
DIEs in the same CU will be marked.  We used to clear out the offset
and use that as the flag, but ran into ordering problems.   

References die_struct::die_mark, FOR_EACH_CHILD, gcc_assert, and mark_dies().

Referenced by copy_decls_for_unworthy_types(), copy_decls_walk(), mark_dies(), output_comdat_type_unit(), and output_comp_unit().

◆ mark_ignored_debug_section()

◆ mark_removed()

static void mark_removed ( dw_die_ref die)
static
Mark DIE and its children as removed.   

◆ matches_main_base()

static bool matches_main_base ( const char * path)
static
Match the base name of a file to the base name of a compilation unit.  

References base_of_path(), ggc_alloc(), NULL, and path.

Referenced by should_emit_struct_debug().

◆ maybe_create_die_with_external_ref()

◆ maybe_emit_file()

static int maybe_emit_file ( struct dwarf_file_data * fd)
static
If the assembler will construct the file table, then translate the compiler
internal file table number into the assembler file table number, and emit
a .file directive if we haven't already emitted one yet.  The file table
numbers are different because we prune debug info for unused variables and
types, which may include filenames.   

References file_table, ggc_alloc(), and NULL.

Referenced by output_die(), output_die_abbrevs(), output_index_string_offset(), size_of_die(), and value_format().

◆ maybe_gen_llsym()

static void maybe_gen_llsym ( dw_loc_list_ref list)
inlinestatic
Generate a symbol for the list, but only if we really want to emit
it as a list.   

References dw_loc_list_struct::dw_loc_next, gen_llsym(), and loc_list_has_views().

Referenced by convert_cfa_to_fb_loc_list(), and dw_loc_list().

◆ maybe_reset_location_view()

static void maybe_reset_location_view ( rtx_insn * insn,
dw_line_info_table * table )
static
If we're keep track of location views and their reset points, and
INSN is a reset point (i.e., it necessarily advances the PC), mark
the next view in TABLE as reset.   

References asm_noperands(), get_attr_min_length(), GET_CODE, ggc_alloc(), JUMP_TABLE_DATA_P, RESET_NEXT_VIEW, RESETTING_VIEW_P, table, and targetm.

◆ mem_loc_descriptor()

dw_loc_descr_ref mem_loc_descriptor ( rtx rtl,
machine_mode mode,
machine_mode mem_mode,
enum var_init_status initialized )
The following routine converts the RTL for a variable or parameter
(resident in memory) into an equivalent Dwarf representation of a
mechanism for getting the address of that same variable onto the top of a
hypothetical "address evaluation" stack.

When creating memory location descriptors, we are effectively transforming
the RTL for a memory-resident object into its Dwarf postfix expression
equivalent.  This routine recursively descends an RTL tree, turning
it into Dwarf postfix code as it goes.

MODE is the mode that should be assumed for the rtl if it is VOIDmode.

MEM_MODE is the mode of the memory reference, needed to handle some
autoincrement addressing modes.

Return 0 if we can't represent the location.   

References add_loc_descr(), alloc_dw_wide_int(), arg_pointer_rtx, avoid_constant_pool_reference(), base_type_for_mode(), based_loc_descr(), bswap_loc_descriptor(), clz_loc_descriptor(), CONST_INT_P, const_ok_for_output(), const_ok_for_output_1(), CONSTANT_P, convert_descriptor_to_mode(), crtl, debugger_reg_number(), dw_val_node::dw_val_struct_union::dw_val_die_union::die, do_binop(), do_unop(), dtprel_false, dtprel_true, dw_loc_descr_node::dw_loc_opc, dw_loc_descr_node::dw_loc_oprnd1, dw_loc_descr_node::dw_loc_oprnd2, dw_val_class_const, dw_val_class_const_double, dw_val_class_die_ref, dw_val_class_loc, dw_val_class_vec, dw_val_class_wide_int, DWARF2_ADDR_SIZE, dwarf_OP(), ENTRY_VALUE_EXP, expansion_failed(), dw_val_node::dw_val_struct_union::dw_val_die_union::external, FOR_EACH_SUBRTX_VAR, frame_pointer_rtx, double_int::from_shwi(), gcc_assert, gcc_unreachable, gen_int_mode(), get_address_mode(), GET_CODE, GET_MODE, GET_MODE_BITSIZE(), GET_MODE_MASK, GET_MODE_SIZE(), GET_MODE_UNIT_SIZE, ggc_alloc(), HOST_BITS_PER_DOUBLE_INT, HOST_BITS_PER_WIDE_INT, IGNORED_DWARF_REGNUM, initialized, insert_float(), int_loc_descriptor(), int_mode_for_size(), INTVAL, is_based_loc(), known_eq, loc_descr_plus_const(), mem_loc_descriptor(), MEM_P, minmax_loc_descriptor(), new_addr_loc_descr(), new_loc_descr(), NULL, NULL_RTX, NULL_TREE, one_reg_loc_descriptor(), parameter_ref_descriptor(), popcount_loc_descriptor(), print_rtl(), ptr_mode, REG_P, REGNO, resolve_one_addr(), rotate_loc_descriptor(), rtx_to_double_int(), rtx_to_poly_int64(), SCALAR_FLOAT_MODE_P, SCALAR_INT_MODE_P, scompare_loc_descriptor(), shift, size_of_int_loc_descriptor(), stack_realign_drap, subreg_lowpart_p(), SUBREG_REG, SYMBOL_REF_TLS_MODEL, targetm, tls_mem_loc_descriptor(), TLS_MODEL_NONE, trunc_int_for_mode(), typed_binop(), ucompare_loc_descriptor(), used_rtx_array, dw_val_node::v, dw_val_node::val_class, dw_val_node::dw_val_struct_union::val_die_ref, VAR_INIT_STATUS_INITIALIZED, VAR_INIT_STATUS_UNINITIALIZED, vec_safe_push(), word_mode, XEXP, XINT, XVECEXP, and XVECLEN.

Referenced by bswap_loc_descriptor(), clz_loc_descriptor(), cst_pool_loc_descr(), dw_loc_list_1(), dwarf2out_frame_debug_cfa_expression(), dwarf2out_frame_debug_cfa_val_expression(), loc_descriptor(), loc_list_from_tree_1(), mem_loc_descriptor(), minmax_loc_descriptor(), popcount_loc_descriptor(), reg_loc_descriptor(), rotate_loc_descriptor(), scompare_loc_descriptor(), typed_binop(), and ucompare_loc_descriptor().

◆ member_declared_type()

static tree member_declared_type ( const_tree member)
inlinestatic
Return the type associated with a data member, make a special check
for bit field types.   

References DECL_IGNORED_P, DECL_NAME, DECL_NAMELESS, lang_hooks::dwarf_name, IDENTIFIER_POINTER, TREE_CODE, TYPE_NAME, and TYPE_NAMELESS.

◆ minmax_loc_descriptor()

◆ modified_type_die()

static dw_die_ref modified_type_die ( tree type,
int cv_quals,
bool reverse,
dw_die_ref context_die )
static
Given a pointer to an arbitrary ..._TYPE tree node, return a debugging
entry that chains the modifiers specified by CV_QUALS in front of the
given type.  REVERSE is true if the type is to be interpreted in the
reverse storage order wrt the target order.   

References add_alignment_attribute(), add_AT_die_ref(), add_AT_flag(), add_AT_loc(), add_AT_unsigned(), add_child_die(), add_child_die_after(), add_gnat_descriptive_type_attribute(), add_name_attribute(), add_pubtype(), ADDR_SPACE_GENERIC_P, base_type_die(), check_base_type(), check_lang_type(), comp_unit_die(), count, DECL_ARTIFICIAL, DECL_NAME, DECL_ORIGINAL_TYPE, decl_ultimate_origin(), die_struct::die_sib, dwarf_qual_info, dwarf_qual_info_size, ENCODE_QUAL_ADDR_SPACE, equate_type_number_to_die(), gcc_assert, gcc_checking_assert, gen_type_die(), lang_hooks_for_types::get_array_descr_info, get_AT_unsigned(), lang_hooks_for_types::get_debug_type, get_nearest_type_subqualifiers(), get_qualified_type(), lang_hooks_for_types::get_type_bias, ggc_alloc(), i, IDENTIFIER_POINTER, is_base_type(), last, long_double_as_float128(), lookup_type_die(), main(), modified_type_die(), need_endianity_attribute_p(), new_die(), new_die_raw(), NULL, NULL_TREE, one_reg_loc_descriptor(), dwarf_qual_info_t::q, qualified_die_p(), scope_die_for(), simple_type_size_in_bits(), size_type_node, sizetype, subrange_type_die(), subrange_type_for_debug_p(), targetm, TREE_CODE, TREE_TYPE, TYPE_ADDR_SPACE, TYPE_ARTIFICIAL, TYPE_IDENTIFIER, TYPE_MAIN_VARIANT, type_main_variant(), TYPE_NAME, TYPE_NEXT_VARIANT, TYPE_PRECISION, TYPE_QUAL_ATOMIC, TYPE_QUAL_CONST, TYPE_QUAL_RESTRICT, TYPE_QUAL_VOLATILE, TYPE_QUALS_NO_ADDR_SPACE, TYPE_REF_IS_RVALUE, TYPE_UNQUALIFIED, TYPE_UNSIGNED, lang_hooks::types, use_debug_types, and VAR_INIT_STATUS_INITIALIZED.

Referenced by add_calling_convention_attribute(), base_type_for_mode(), declare_in_namespace(), and modified_type_die().

◆ move_all_children()

static void move_all_children ( dw_die_ref old_parent,
dw_die_ref new_parent )
static
Move all children from OLD_PARENT to NEW_PARENT.   

References die_struct::die_parent, FOR_EACH_CHILD, ggc_alloc(), and NULL.

Referenced by generate_skeleton_bottom_up().

◆ move_linkage_attr()

static void move_linkage_attr ( dw_die_ref die)
inlinestatic
Move a DW_AT_{,MIPS_}linkage_name attribute just added to dw_die_ref
to the location it would have been added, should we know its
DECL_ASSEMBLER_NAME when we added other attributes.  This will
probably improve compactness of debug info, removing equivalent
abbrevs, and hide any differences caused by deferring the
computation of the assembler name, triggered by e.g. PCH.   

◆ move_marked_base_types()

static void move_marked_base_types ( void )
static
Move base types marked by mark_base_types as early as possible
in the CU, sorted by decreasing usage count both to make the
uleb128 references as small as possible and to make sure they
will have die_offset already computed by calc_die_sizes when
sizes of typed stack loc ops is computed.   

References get_AT_unsigned(), ggc_alloc(), and y.

◆ multiple_reg_loc_descriptor()

static dw_loc_descr_ref multiple_reg_loc_descriptor ( rtx rtl,
rtx regs,
enum var_init_status initialized )
static

◆ need_endianity_attribute_p()

static bool need_endianity_attribute_p ( bool reverse)
inlinestatic
Return true if DW_AT_endianity should be emitted according to REVERSE.   

References ggc_alloc().

Referenced by base_type_die(), and modified_type_die().

◆ new_addr_loc_descr()

static dw_loc_descr_ref new_addr_loc_descr ( rtx addr,
enum dtprel_bool dtprel )
inlinestatic

◆ new_die()

◆ new_die_raw()

dw_die_ref new_die_raw ( enum dwarf_tag tag_value)
Create and return a new die with TAG_VALUE as tag.   

References die_struct::die_tag, and ggc_alloc().

Referenced by add_AT_external_die_ref(), base_type_die(), clone_as_declaration(), clone_die(), ctf_debug_init(), modified_type_die(), and new_die().

◆ new_dwarf_proc_die()

static dw_die_ref new_dwarf_proc_die ( dw_loc_descr_ref location,
tree fndecl,
dw_die_ref parent_die )
static
Return a pointer to a newly created DIE node for a DWARF procedure.  Add
LOCATION as its DW_AT_location attribute.  If FNDECL is not NULL_TREE,
equate it to this DIE.   

References add_AT_loc(), equate_decl_number_to_die(), ggc_alloc(), new_die(), and NULL.

Referenced by function_to_dwarf_procedure().

◆ new_line_info_table()

static dw_line_info_table * new_line_info_table ( void )
static
Create a new line number table.   

◆ new_loc_descr()

static dw_loc_descr_ref new_loc_descr ( enum dwarf_location_atom op,
unsigned HOST_WIDE_INT oprnd1,
unsigned HOST_WIDE_INT oprnd2 )
inlinestatic

◆ new_loc_descr_op_bit_piece()

static dw_loc_descr_ref new_loc_descr_op_bit_piece ( HOST_WIDE_INT bitsize,
HOST_WIDE_INT offset )
static
Create a DW_OP_piece or DW_OP_bit_piece for bitsize, or return NULL
if it is not possible.   

References ggc_alloc(), new_loc_descr(), NULL, and offset.

Referenced by dw_sra_loc_expr().

◆ new_loc_list()

static dw_loc_list_ref new_loc_list ( dw_loc_descr_ref expr,
const char * begin,
var_loc_view vbegin,
const char * end,
var_loc_view vend,
const char * section )
inlinestatic
Return a new location list, given the begin and end range, and the
expression.   

References begin(), end(), expr, ggc_alloc(), and NULL.

Referenced by convert_cfa_to_fb_loc_list(), dw_loc_list(), loc_list_from_tree_1(), and resolve_addr().

◆ new_reg_loc_descr()

static dw_loc_descr_ref new_reg_loc_descr ( unsigned int reg,
poly_int64 offset )
inlinestatic
Return a pointer to a newly allocated location description for
REG and OFFSET.   

References ggc_alloc(), loc_descr_plus_const(), new_loc_descr(), new_reg_loc_descr(), and offset.

Referenced by based_loc_descr(), build_cfa_aligned_loc(), build_cfa_loc(), int_loc_descriptor(), and new_reg_loc_descr().

◆ non_dwarf_expression()

static dw_loc_descr_ref non_dwarf_expression ( dw_loc_descr_ref l)
static
Return NULL if l is a DWARF expression, or first op that is not
valid DWARF expression.   

◆ note_rnglist_head()

static void note_rnglist_head ( unsigned int offset)
static
Note that (*rnglist_table)[offset] is either a head of a rnglist
chain, or middle entry of a chain that will be directly referred to.   

References gen_internal_sym(), ggc_alloc(), offset, and ranges_table.

Referenced by add_ranges_by_labels().

◆ note_variable_value()

◆ note_variable_value_in_expr()

static void note_variable_value_in_expr ( dw_die_ref die,
dw_loc_descr_ref loc )
static
Helper function for note_variable_value, handle one location
expression.   

Referenced by dwarf2out_early_finish().

◆ offset_int_type_size_in_bits()

static offset_int offset_int_type_size_in_bits ( const_tree type)
inlinestatic
Similarly, but return an offset_int instead of UHWI.   

References BITS_PER_WORD, ggc_alloc(), NULL_TREE, wi::to_offset(), TREE_CODE, TYPE_ALIGN, and TYPE_SIZE.

Referenced by field_byte_offset().

◆ one_reg_loc_descriptor()

static dw_loc_descr_ref one_reg_loc_descriptor ( unsigned int regno,
enum var_init_status initialized )
static
Return a location descriptor that designates a machine register for
a given hard register number.   

References add_loc_descr(), ggc_alloc(), initialized, new_loc_descr(), and VAR_INIT_STATUS_UNINITIALIZED.

Referenced by mem_loc_descriptor(), modified_type_die(), multiple_reg_loc_descriptor(), and reg_loc_descriptor().

◆ optimize_abbrev_table()

◆ optimize_external_refs()

static external_ref_hash_type * optimize_external_refs ( dw_die_ref die)
static
DIE is a unit; look through all the DIE references to see if there are
any external references to types, and if so, create local stubs for
them which will be applied in build_abbrev_table.  This is useful because
references to local DIEs are smaller.   

References dwarf2_build_local_stub(), map, and optimize_external_refs_1().

Referenced by output_comdat_type_unit(), and output_comp_unit().

◆ optimize_external_refs_1()

static void optimize_external_refs_1 ( dw_die_ref die,
external_ref_hash_type * map )
static
Subroutine of optimize_external_refs, below.

If we see a type skeleton, record it as our stub.  If we see external
references, remember how many we've seen.   

References a, AT_class(), AT_ref(), die_struct::die_attr, dw_val_class_die_ref, FOR_EACH_CHILD, FOR_EACH_VEC_SAFE_ELT, get_AT_ref(), ggc_alloc(), is_type_die(), lookup_external_ref(), map, external_ref::n_refs, optimize_external_refs_1(), and external_ref::stub.

Referenced by optimize_external_refs(), and optimize_external_refs_1().

◆ optimize_implicit_const()

static void optimize_implicit_const ( unsigned int first_id,
unsigned int end,
vec< bool > & implicit_consts )
static
Convert dw_val_class_const and dw_val_class_unsigned_const class attributes
of DIEs in between sorted_abbrev_dies[first_id] and abbrev_dies[end_id - 1]
into dw_val_class_const_implicit or
dw_val_class_unsigned_const_implicit.   

References a, AT_class(), AT_unsigned(), constant_size(), die_struct::die_attr, dw_val_class_const, dw_val_class_const_implicit, dw_val_class_file, dw_val_class_file_implicit, dw_val_class_none, dw_val_class_unsigned_const, dw_val_class_unsigned_const_implicit, end(), FOR_EACH_VEC_SAFE_ELT, ggc_alloc(), i, size_of_sleb128(), and sorted_abbrev_dies.

Referenced by optimize_abbrev_table().

◆ optimize_location_into_implicit_ptr()

static void optimize_location_into_implicit_ptr ( dw_die_ref die,
tree decl )
static
Helper function of resolve_addr.  DIE had DW_AT_location of
DW_OP_addr alone, which referred to DECL in DW_OP_addr's operand
and DW_OP_addr couldn't be resolved.  resolve_addr has already
removed the DW_AT_location attribute.  This function attempts to
add a new DW_AT_location attribute with DW_OP_implicit_pointer
to it or DW_AT_const_value attribute, if possible.   

◆ optimize_location_lists()

static void optimize_location_lists ( dw_die_ref die)
static
Optimize location lists referenced from DIE
children and share them whenever possible.   

References a, AT_class(), AT_loc_list(), die_struct::die_attr, dw_val_class_loc_list, FOR_EACH_VEC_SAFE_ELT, ggc_alloc(), and NULL.

◆ optimize_location_lists_1()

static void optimize_location_lists_1 ( dw_die_ref die,
loc_list_hash_type * htab )
static
Recursively optimize location lists referenced from DIE
children and share them whenever possible.   

◆ optimize_macinfo_range()

static unsigned optimize_macinfo_range ( unsigned int idx,
vec< macinfo_entry, va_gc > * files,
macinfo_hash_type ** macinfo_htab )
static
Attempt to make a sequence of define/undef macinfo ops shareable with
other compilation unit .debug_macinfo sections.  IDX is the first
index of a define/undef, return the number of ops that should be
emitted in a comdat .debug_macinfo section and emit
a DW_MACRO_import entry referencing it.
If the define/undef entry should be emitted normally, return 0.   

◆ optimize_one_addr_into_implicit_ptr()

static bool optimize_one_addr_into_implicit_ptr ( dw_loc_descr_ref loc)
static
Helper function of resolve_addr_in_expr.  LOC is
a DW_OP_addr followed by DW_OP_stack_value, either at the start
of exprloc or after DW_OP_{,bit_}piece, and val_addr can't be
resolved.  Replace it (both DW_OP_addr and DW_OP_stack_value)
with DW_OP_implicit_pointer if possible
and return true, if unsuccessful, return false.   

◆ optimize_string_length()

static int optimize_string_length ( dw_attr_node * a)
static
For DW_AT_string_length attribute with DW_OP_GNU_variable_value
reference to a variable or argument, adjust it if needed and return:
-1 if the DW_AT_string_length attribute and DW_AT_{string_length_,}byte_size
   attribute if present should be removed
0 keep the attribute perhaps with minor modifications, no need to rescan
1 if the attribute has been successfully adjusted.   

◆ output_abbrev_section()

static void output_abbrev_section ( void )
static
Output the .debug_abbrev section which defines the DIE abbreviation
table.   

References abbrev_die_table, dw2_asm_output_data(), FOR_EACH_VEC_SAFE_ELT, ggc_alloc(), NULL, and output_die_abbrevs().

◆ output_addr_table()

◆ output_addr_table_entry()

int output_addr_table_entry ( addr_table_entry ** slot,
unsigned int * cur_index )
Callback for htab_traverse to assign an index to an entry in the
table, and to write that entry to the .debug_addr section.   

◆ output_aranges()

◆ output_asm_line_debug_info()

static bool output_asm_line_debug_info ( void )
static
Return true iff we're to emit .loc directives for the assembler to
generate line number sections.

When we're not emitting views, all we need from the assembler is
support for .loc directives.

If we are emitting views, we can only use the assembler's .loc
support if it also supports views.

When the compiler is emitting the line number programs and
computing view numbers itself, it resets view numbers at known PC
changes and counts from that, and then it emits view numbers as
literal constants in locviewlists.  There are cases in which the
compiler is not sure about PC changes, e.g. when extra alignment is
requested for a label.  In these cases, the compiler may not reset
the view counter, and the potential PC advance in the line number
program will use an opcode that does not reset the view counter
even if the PC actually changes, so that compiler and debug info
consumer can keep view numbers in sync.

When the compiler defers view computation to the assembler, it
emits symbolic view numbers in locviewlists, with the exception of
views known to be zero (forced resets, or reset after
compiler-visible PC changes): instead of emitting symbols for
these, we emit literal zero and assert the assembler agrees with
the compiler's assessment.  We could use symbolic views everywhere,
instead of special-casing zero views, but then we'd be unable to
optimize out locviewlists that contain only zeros.   

References ggc_alloc().

Referenced by asm_outputs_debug_line_str().

◆ output_attr_index_or_value()

◆ output_call_frame_info()

◆ output_comdat_type_unit()

◆ output_comp_unit()

◆ output_compilation_unit_header()

static void output_compilation_unit_header ( enum dwarf_unit_type ut)
static
Output the compilation unit that appears at the beginning of the
.debug_info section, and precedes the DIE descriptions.   

References abbrev_section_label, debug_abbrev_section, dw2_asm_output_data(), dw2_asm_output_offset(), DWARF2_ADDR_SIZE, DWARF_INITIAL_LENGTH_SIZE, gcc_unreachable, ggc_alloc(), next_die_offset, output_dwarf_version(), and XCOFF_DEBUGGING_INFO.

Referenced by output_comdat_type_unit(), and output_comp_unit().

◆ output_die()

static void output_die ( dw_die_ref die)
static
Output the DIE and its attributes.  Called recursively to generate
the definitions of each child DIE.   

References a, ASM_COMMENT_START, asm_out_file, AT_class(), AT_discr_list(), AT_flag(), AT_index(), AT_int(), AT_lbl(), AT_loc(), AT_ref(), AT_ref_external(), AT_string(), AT_unsigned(), AT_vms_delta1(), AT_vms_delta2(), constant_size(), debug_frame_section, debug_info_section, debug_line_section, debug_line_str_section, debug_loc_section, debug_macinfo_section, debug_str_section, die_struct::die_abbrev, die_struct::die_attr, die_struct::die_child, die_struct::die_id, die_struct::die_offset, die_struct::die_symbol_or_type_node::die_symbol, die_struct::die_tag, die_struct::die_symbol_or_type_node::die_type_node, dw2_asm_output_addr(), dw2_asm_output_data(), dw2_asm_output_data_sleb128(), dw2_asm_output_data_uleb128(), dw2_asm_output_delta(), dw2_asm_output_nstring(), dw2_asm_output_offset(), dw2_asm_output_vms_delta(), dw_discr_list_node::dw_discr_lower_bound, dw_discr_list_node::dw_discr_next, dw_discr_list_node::dw_discr_range, dw_discr_list_node::dw_discr_upper_bound, dw_val_class_addr, dw_val_class_const, dw_val_class_const_double, dw_val_class_const_implicit, dw_val_class_data8, dw_val_class_die_ref, dw_val_class_discr_list, dw_val_class_discr_value, dw_val_class_fde_ref, dw_val_class_file, dw_val_class_file_implicit, dw_val_class_flag, dw_val_class_high_pc, dw_val_class_lbl_id, dw_val_class_lineptr, dw_val_class_loc, dw_val_class_loc_list, dw_val_class_loclistsptr, dw_val_class_macptr, dw_val_class_offset, dw_val_class_range_list, dw_val_class_str, dw_val_class_symview, dw_val_class_unsigned_const, dw_val_class_unsigned_const_implicit, dw_val_class_vec, dw_val_class_view_list, dw_val_class_vms_delta, dw_val_class_wide_int, DWARF2_ADDR_SIZE, dwarf_attr_name(), dwarf_FORM(), DWARF_LARGEST_DATA_FORM_BITS, dwarf_tag_name(), extract_int(), FDE_LABEL, FOR_EACH_CHILD, FOR_EACH_VEC_SAFE_ELT, gcc_assert, gcc_unreachable, get_AT_low_pc(), get_full_len(), ggc_alloc(), HOST_BITS_PER_CHAR, HOST_BITS_PER_DOUBLE_INT, HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT_PRINT_DEC, HOST_WIDE_INT_PRINT_HEX, i, MAX_ARTIFICIAL_LABEL_BYTES, maybe_emit_file(), NULL, output_attr_index_or_value(), output_die(), output_discr_value(), output_loc_list_offset(), output_loc_sequence(), output_range_list_offset(), output_signature(), output_view_list_offset(), size_of_discr_list(), size_of_locs(), and symview_upper_bound.

Referenced by output_comdat_type_unit(), output_comp_unit(), output_die(), and output_skeleton_debug_sections().

◆ output_die_abbrevs()

◆ output_discr_value()

static void output_discr_value ( dw_discr_value * discr_value,
const char * name )
inlinestatic
Output a discriminant value.   

References dw2_asm_output_data_sleb128(), dw2_asm_output_data_uleb128(), and ggc_alloc().

Referenced by output_die().

◆ output_dwarf_version()

static void output_dwarf_version ( )
static

◆ output_fde()

◆ output_file_names()

◆ output_index_string()

int output_index_string ( indirect_string_node ** h,
unsigned int * cur_idx )
A helper function for dwarf2out_finish called through
htab_traverse.  Output the indexed string.   

References dwarf_FORM(), find_string_form(), indirect_string_node::form, gcc_assert, ggc_alloc(), indirect_string_node::index, NO_INDEX_ASSIGNED, and indirect_string_node::refcount.

◆ output_index_string_offset()

int output_index_string_offset ( indirect_string_node ** h,
unsigned int * offset )
A helper function for output_indirect_strings called through
htab_traverse.  Output the offset to a string and update the
current offset.   

References comp_unit_die(), get_AT_string(), ggc_alloc(), lookup_filename(), maybe_emit_file(), and NULL.

◆ output_indirect_string()

int output_indirect_string ( indirect_string_node ** h,
enum dwarf_form form )
A helper function for dwarf2out_finish called through
htab_traverse.  Emit one queued .debug_str string.   

◆ output_indirect_strings()

static void output_indirect_strings ( void )
static
Output the indexed string table.   

◆ output_line_info()

◆ output_line_string()

static void output_line_string ( enum dwarf_form form,
const char * str,
const char * entry_kind,
unsigned int idx )
static

◆ output_loc_list()

◆ output_loc_list_offset()

◆ output_loc_operands()

static void output_loc_operands ( dw_loc_descr_ref loc,
int for_eh_or_skip )
static

◆ output_loc_operands_raw()

◆ output_loc_sequence()

void output_loc_sequence ( dw_loc_descr_ref loc,
int for_eh_or_skip )
Output a sequence of location operations.  
The for_eh_or_skip parameter controls whether register numbers are
converted using DWARF2_FRAME_REG_OUT, which is needed in the case that
hard reg numbers have been processed via DWARF_FRAME_REGNUM (i.e. for unwind
info).  This should be suppressed for the cases that have not been converted
(i.e. symbolic debug info), by setting the parameter < 0.  See PR47324.   


References dw2_asm_output_data(), dw_loc_descr_node::dw_loc_next, dw_loc_descr_node::dw_loc_opc, DWARF2_FRAME_REG_OUT, dwarf_stack_op_name(), gcc_assert, ggc_alloc(), NULL, output_loc_operands(), and r.

Referenced by output_cfa_loc(), output_die(), output_loc_list(), and output_loc_operands().

◆ output_loc_sequence_raw()

◆ output_location_lists()

static void output_location_lists ( dw_die_ref die)
static

◆ output_loclists_offsets()

◆ output_macinfo()

◆ output_macinfo_op()

static void output_macinfo_op ( macinfo_entry * ref)
static
Output a single .debug_macinfo entry.   

References macinfo_struct::code, macinfo_struct::info, macinfo_struct::lineno, macinfo_table, NULL, and vec_safe_push().

◆ output_one_line_info_table()

◆ output_pubname()

static void output_pubname ( dw_offset die_offset,
pubname_entry * entry )
static

◆ output_pubnames()

◆ output_pubtables()

static void output_pubtables ( void )
static

◆ output_range_list_offset()

static void output_range_list_offset ( dw_attr_node * a)
static
Output a range_list offset into the .debug_ranges or .debug_rnglists
section.  Emit a relocated reference if val_entry is NULL, otherwise,
emit an indirect reference.   

References a, debug_ranges_section, dw2_asm_output_data(), dw2_asm_output_data_uleb128(), dw2_asm_output_offset(), DWARF2_ADDR_SIZE, dwarf_attr_name(), gcc_assert, ggc_alloc(), HOST_WIDE_INT_PRINT_HEX, r, ranges_section_label, RELOCATED_OFFSET, and rnglist_idx.

Referenced by output_die().

◆ output_ranges()

◆ output_rnglists()

◆ output_signature()

static void output_signature ( const char * sig,
const char * name )
inlinestatic
Output a type signature.   

References dw2_asm_output_data(), DWARF_TYPE_SIGNATURE_SIZE, i, and NULL.

Referenced by output_comdat_type_unit(), and output_die().

◆ output_skeleton_debug_sections()

◆ output_value_format()

static void output_value_format ( dw_attr_node * a)
static
Output the encoding of an attribute value.   

References a, dw2_asm_output_data_uleb128(), dwarf_form_name(), ggc_alloc(), and value_format().

Referenced by output_die_abbrevs().

◆ output_view_list_offset()

static void output_view_list_offset ( dw_attr_node * a)
static

◆ override_type_for_decl_p()

static bool override_type_for_decl_p ( tree decl,
dw_die_ref old_die,
dw_die_ref context_die )
static
Return true iff DECL overrides (presumably completes) the type of
OLD_DIE within CONTEXT_DIE.   

◆ parameter_ref_descriptor()

static dw_loc_descr_ref parameter_ref_descriptor ( rtx rtl)
static
Helper function for mem_loc_descriptor.  Return DW_OP_GNU_parameter_ref
for DEBUG_PARAMETER_REF RTL.   

References DEBUG_PARAMETER_REF_DECL, dw_val_class_decl_ref, dw_val_class_die_ref, gcc_assert, ggc_alloc(), lookup_decl_die(), new_loc_descr(), NULL, and TREE_CODE.

Referenced by mem_loc_descriptor().

◆ popcount_loc_descriptor()

static dw_loc_descr_ref popcount_loc_descriptor ( rtx rtl,
scalar_int_mode mode,
machine_mode mem_mode )
static
POPCOUNT (const0 is DW_OP_lit0 or corresponding typed constant,
const1 is DW_OP_lit1 or corresponding typed constant):
    const0 DW_OP_swap
L1: DW_OP_dup DW_OP_bra <L2> DW_OP_dup DW_OP_rot const1 DW_OP_and
    DW_OP_plus DW_OP_swap const1 DW_OP_shr DW_OP_skip <L1>
L2: DW_OP_drop

PARITY is similar:
L1: DW_OP_dup DW_OP_bra <L2> DW_OP_dup DW_OP_rot const1 DW_OP_and
    DW_OP_xor DW_OP_swap const1 DW_OP_shr DW_OP_skip <L1>
L2: DW_OP_drop   

References add_loc_descr(), const0_rtx, const1_rtx, dw_val_class_loc, GET_CODE, GET_MODE, ggc_alloc(), mem_loc_descriptor(), new_loc_descr(), NULL, VAR_INIT_STATUS_INITIALIZED, and XEXP.

Referenced by mem_loc_descriptor().

◆ premark_types_used_by_global_vars()

static void premark_types_used_by_global_vars ( void )
static
Mark all members of types_used_by_vars_entry as perennial.   

References gcc_assert, NULL, and types_used_by_vars_entry::type.

◆ premark_types_used_by_global_vars_helper()

int premark_types_used_by_global_vars_helper ( types_used_by_vars_entry ** slot,
void *  )
Helper function of premark_types_used_by_global_vars which gets called
through htab_traverse.

Marks the DIE of a given type in *SLOT as perennial, so it never gets
marked as unused by prune_unused_types. The DIE of the type is marked
only if the global variable using the type will actually be emitted.   

References add_AT_unsigned(), cgraph_function_possibly_inlined_p(), and ggc_alloc().

◆ premark_used_types()

static void premark_used_types ( struct function * fun)
static
Mark all members of used_types_hash as perennial.   

◆ premark_used_types_helper()

bool premark_used_types_helper ( tree const & type,
void *  )
Helper function of premark_used_types() which gets called through
htab_traverse.

Marks the DIE of a given type in *SLOT as perennial, so it never gets
marked as unused by prune_unused_types.   

◆ premark_used_variables()

static void premark_used_variables ( void )
static
Mark all variables used by the symtab as perennial.   

◆ prepend_loc_descr_to_each()

static void prepend_loc_descr_to_each ( dw_loc_list_ref list,
dw_loc_descr_ref ref )
static
To each location in list LIST prepend loc descr REF.   

References add_loc_descr(), copy_loc_descr(), dw_loc_list_struct::dw_loc_next, end(), and dw_loc_list_struct::expr.

Referenced by add_loc_list().

◆ print_attribute()

static void print_attribute ( dw_attr_node * a,
bool recurse,
FILE * outfile )
static
Likewise, for a DIE attribute.   

References a, ggc_alloc(), and print_dw_val().

Referenced by print_die().

◆ print_die()

◆ print_discr_value()

static void print_discr_value ( FILE * outfile,
dw_discr_value * discr_value )
inlinestatic

◆ print_dw_val()

static void print_dw_val ( dw_val_node * val,
bool recurse,
FILE * outfile )
static
Print the value associated to the VAL DWARF value node to OUTFILE.  If
RECURSE, output location descriptor operations.   

References die_struct::comdat_type_p, dw_val_node::dw_val_struct_union::dw_val_die_union::die, die_struct::die_id, die_struct::die_offset, die_struct::die_symbol_or_type_node::die_symbol, die_struct::die_symbol_or_type_node::die_type_node, dw_val_class_addr, dw_val_class_const, dw_val_class_const_double, dw_val_class_const_implicit, dw_val_class_data8, dw_val_class_die_ref, dw_val_class_discr_list, dw_val_class_discr_value, dw_val_class_file, dw_val_class_file_implicit, dw_val_class_flag, dw_val_class_high_pc, dw_val_class_lbl_id, dw_val_class_lineptr, dw_val_class_loc, dw_val_class_loc_list, dw_val_class_loclistsptr, dw_val_class_macptr, dw_val_class_offset, dw_val_class_range_list, dw_val_class_str, dw_val_class_symview, dw_val_class_unsigned_const, dw_val_class_unsigned_const_implicit, dw_val_class_vec, dw_val_class_view_list, dw_val_class_vms_delta, dw_val_class_wide_int, dw_wide_int::elt(), dwarf_file_data::emitted_number, dwarf_file_data::filename, gcc_assert, dw_wide_int::get_len(), ggc_alloc(), double_int::high, HOST_WIDE_INT_PRINT_DEC, HOST_WIDE_INT_PRINT_HEX, HOST_WIDE_INT_PRINT_PADDED_HEX, HOST_WIDE_INT_PRINT_UNSIGNED, i, dw_val_node::dw_val_struct_union::dw_val_vms_delta_union::lbl1, dw_val_node::dw_val_struct_union::dw_val_vms_delta_union::lbl2, dw_loc_list_struct::ll_symbol, double_int::low, NULL, print_discr_value(), print_indent, print_loc_descr(), print_signature(), comdat_type_node::signature, indirect_string_node::str, dw_val_node::v, dw_val_node::val_class, dw_val_node::dw_val_struct_union::val_data8, dw_val_node::dw_val_struct_union::val_die_ref, dw_val_node::dw_val_struct_union::val_discr_list, dw_val_node::dw_val_struct_union::val_discr_value, dw_val_node::dw_val_struct_union::val_double, dw_val_node::dw_val_struct_union::val_file, dw_val_node::dw_val_struct_union::val_flag, dw_val_node::dw_val_struct_union::val_int, dw_val_node::dw_val_struct_union::val_lbl_id, dw_val_node::dw_val_struct_union::val_loc, dw_val_node::dw_val_struct_union::val_loc_list, dw_val_node::dw_val_struct_union::val_str, dw_val_node::dw_val_struct_union::val_symbolic_view, dw_val_node::dw_val_struct_union::val_unsigned, dw_val_node::dw_val_struct_union::val_vms_delta, dw_val_node::dw_val_struct_union::val_wide, view_list_to_loc_list_val_node(), dw_loc_list_struct::vl_symbol, and die_struct::with_offset.

Referenced by print_attribute(), and print_loc_descr().

◆ print_loc_descr()

static void print_loc_descr ( dw_loc_descr_ref loc,
FILE * outfile )
static
Print the list of operands in the LOC location description to OUTFILE.  This
routine is a debugging aid only.   

References dw_loc_descr_node::dw_loc_next, dw_val_class_none, dwarf_stack_op_name(), ggc_alloc(), NULL, print_dw_val(), and print_spaces().

Referenced by debug_dwarf_loc_descr(), and print_dw_val().

◆ print_signature()

static void print_signature ( FILE * outfile,
char * sig )
inlinestatic
Print a type signature in hex.   

References DWARF_TYPE_SIGNATURE_SIZE, ggc_alloc(), and i.

Referenced by print_die(), and print_dw_val().

◆ print_spaces()

static void print_spaces ( FILE * outfile)
inlinestatic
Indent the line the number of spaces given by print_indent.   

References ggc_alloc(), and print_indent.

Referenced by print_die(), and print_loc_descr().

◆ process_scope_var()

static void process_scope_var ( tree stmt,
tree decl,
tree origin,
dw_die_ref context_die )
static
Process variable DECL (or variable with origin ORIGIN) within
block STMT and add it to CONTEXT_DIE.   

References BLOCK_NUM_NONLOCALIZED_VARS, BLOCK_VARS, DECL_CHAIN, DECL_IGNORED_P, and ggc_alloc().

Referenced by is_redundant_typedef().

◆ prune_unmark_dies()

static void prune_unmark_dies ( dw_die_ref die)
static
Clear the marks for a die and its children.
Be cool if the mark isn't set.   

References addr_index_table, count_index_addrs(), dw2_asm_output_data(), DWARF2_ADDR_SIZE, DWARF_INITIAL_LENGTH_SIZE, and ggc_alloc().

◆ prune_unused_types()

static void prune_unused_types ( void )
static
Remove dies representing declarations that we never use.   

◆ prune_unused_types_mark()

static void prune_unused_types_mark ( dw_die_ref die,
int dokids )
static
Mark DIE as being used.  If DOKIDS is true, then walk down
to DIE's children.   

◆ prune_unused_types_mark_generic_parms_dies()

static void prune_unused_types_mark_generic_parms_dies ( dw_die_ref die)
static
Mark the generic parameters and arguments children DIEs of DIE.   

◆ prune_unused_types_prune()

◆ prune_unused_types_update_strings()

static void prune_unused_types_update_strings ( dw_die_ref die)
static
Increment the string counts on strings referred to from DIE's
attributes.   

References die_struct::die_parent, die_struct::die_tag, and ggc_alloc().

◆ prune_unused_types_walk()

static void prune_unused_types_walk ( dw_die_ref die)
static
Walk the tree DIE and mark types that we actually use.   

◆ prune_unused_types_walk_attribs()

◆ prune_unused_types_walk_loc_descr()

static void prune_unused_types_walk_loc_descr ( dw_loc_descr_ref loc)
static
Given LOC that is referenced by a DIE we're marking as used, find all
referenced DWARF procedures it references and mark them as used.   

◆ prune_unused_types_walk_local_classes()

static void prune_unused_types_walk_local_classes ( dw_die_ref die)
static
For local classes, look if any static member functions were emitted
and if so, mark them.   

◆ push_dw_line_info_entry()

static void push_dw_line_info_entry ( dw_line_info_table * table,
enum dw_line_info_opcode opcode,
unsigned int val )
static
Add OPCODE+VAL as an entry at the end of the opcode array in TABLE.   

◆ qualified_die_p()

static dw_die_ref qualified_die_p ( dw_die_ref die,
int * mask,
unsigned int depth )
static
If DIE is a qualified DIE of some base DIE with the same parent,
return the base DIE, otherwise return NULL.  Set MASK to the
qualifiers added compared to the returned DIE.   

References die_struct::die_attr, die_struct::die_parent, die_struct::die_tag, dwarf_qual_info, dwarf_qual_info_size, get_AT_ref(), ggc_alloc(), i, NULL, dwarf_qual_info_t::q, qualified_die_p(), dwarf_qual_info_t::t, type(), and vec_safe_length().

Referenced by modified_type_die(), and qualified_die_p().

◆ record_type_tag()

◆ reference_to_unused()

static tree reference_to_unused ( tree * tp,
int * walk_subtrees,
void * data )
static
Determine whether the evaluation of EXPR references any variables
or functions which aren't otherwise used (and therefore may not be
output).   

References CONSTANT_CLASS_P, DECL_DECLARED_INLINE_P, DECL_EXTERNAL, DECL_P, symtab_node::definition, EXPR_P, cgraph_node::get(), varpool_node::get(), ggc_alloc(), symbol_table::global_info_ready, NULL_TREE, symtab, TREE_ASM_WRITTEN, TREE_CODE, TREE_PUBLIC, TREE_USED, and VAR_P.

Referenced by rtl_for_decl_init().

◆ reg_loc_descriptor()

◆ remove_addr_table_entry()

static void remove_addr_table_entry ( addr_table_entry * entry)
static
Remove an entry from the addr table by decrementing its refcount.
Strictly, decrementing the refcount would be enough, but the
assertion that the entry is actually in the table has found
bugs.   

References addr_index_table, gcc_assert, ggc_alloc(), addr_table_entry::index, NO_INDEX_ASSIGNED, and addr_table_entry::refcount.

Referenced by remove_loc_list_addr_table_entries().

◆ remove_AT()

static bool remove_AT ( dw_die_ref die,
enum dwarf_attribute attr_kind )
static
Remove the specified attribute if present.  Return TRUE if removal
was successful.   

References a, AT_class(), die_struct::die_attr, dw_val_class_str, FOR_EACH_VEC_SAFE_ELT, and ggc_alloc().

Referenced by add_data_member_location_attribute(), copy_declaration_context(), generate_skeleton_bottom_up(), and output_skeleton_debug_sections().

◆ remove_child_or_replace_with_skeleton()

static dw_die_ref remove_child_or_replace_with_skeleton ( dw_die_ref unit,
dw_die_ref child,
dw_die_ref prev )
static
Remove the CHILD DIE from its parent, possibly replacing it with a cloned
declaration.  The original DIE is moved to a new compile unit so that
existing references to it follow it to the new location.  If any of the
original DIE's descendants is a declaration, we need to replace the
original DIE with a skeleton tree and move the declarations back into the
skeleton tree.   

References add_child_die(), copy_declaration_context(), die_struct::die_id, die_struct::die_symbol_or_type_node::die_type_node, generate_skeleton(), ggc_alloc(), NULL, remove_child_with_prev(), and replace_child().

Referenced by break_out_comdat_types().

◆ remove_child_TAG()

static void remove_child_TAG ( dw_die_ref die,
enum dwarf_tag tag )
static
Remove child DIE whose die_tag is TAG.  Do nothing if no child
matches TAG.   

References die_struct::die_child, die_struct::die_parent, die_struct::die_sib, die_struct::die_tag, NULL, and remove_child_with_prev().

◆ remove_child_with_prev()

static void remove_child_with_prev ( dw_die_ref child,
dw_die_ref prev )
static
Remove CHILD from its parent.  PREV must have the property that
PREV->DIE_SIB == CHILD.  Does not alter CHILD.   

References die_struct::die_child, die_struct::die_parent, die_struct::die_sib, gcc_assert, and NULL.

Referenced by generate_skeleton_bottom_up(), remove_child_or_replace_with_skeleton(), remove_child_TAG(), and reparent_child().

◆ remove_loc_list_addr_table_entries()

static void remove_loc_list_addr_table_entries ( dw_loc_descr_ref descr)
static
Given a location list, remove all addresses it refers to from the
address_table.   

References gcc_assert, ggc_alloc(), NO_INDEX_ASSIGNED, NULL, and remove_addr_table_entry().

Referenced by dw_sra_loc_expr().

◆ reparent_child()

static void reparent_child ( dw_die_ref child,
dw_die_ref new_parent )
static
Unassociate CHILD from its parent, and make its parent be
NEW_PARENT.   

References add_child_die(), die_struct::die_child, die_struct::die_parent, ggc_alloc(), and remove_child_with_prev().

Referenced by splice_child_die().

◆ replace_child()

static void replace_child ( dw_die_ref old_child,
dw_die_ref new_child,
dw_die_ref prev )
static
Replace OLD_CHILD with NEW_CHILD.  PREV must have the property that
PREV->DIE_SIB == OLD_CHILD.  Does not alter OLD_CHILD.   

References die_struct::die_child, die_struct::die_parent, die_struct::die_sib, gcc_assert, ggc_alloc(), and NULL.

Referenced by generate_skeleton_bottom_up(), and remove_child_or_replace_with_skeleton().

◆ reset_dies()

static void reset_dies ( dw_die_ref die)
static
Reset DIEs so we can output them again.   

References add_child_die(), comp_unit_die(), die_struct::die_parent, get_AT_ref(), ggc_alloc(), is_cu_die(), and seen_error().

◆ reset_indirect_string()

int reset_indirect_string ( indirect_string_node ** h,
void *  )
A helper function for dwarf2out_finish, called to reset indirect
string decisions done for early LTO dwarf output before fat object
dwarf output.   

References dwarf_FORM(), indirect_string_node::form, free(), ggc_alloc(), indirect_string_node::index, indirect_string_node::label, and NULL.

◆ resolve_addr()

static void resolve_addr ( dw_die_ref die)
static
Resolve DW_OP_addr and DW_AT_const_value CONST_STRING arguments to
an address in .rodata section if the string literal is emitted there,
or remove the containing location list or replace DW_AT_const_value
with DW_AT_location and empty location expression, if it isn't found
in .rodata.  Similarly for SYMBOL_REFs, keep only those that refer
to something that has been emitted in the current CU.   

References a, AT_loc(), AT_loc_list(), AT_loc_list_ptr(), dw_loc_list_struct::begin, copy_deref_exprloc(), dw_loc_list_struct::dw_loc_next, dw_val_class_loc, dw_val_class_loc_list, dw_loc_list_struct::end, dw_loc_list_struct::expr, gcc_unreachable, gen_llsym(), ggc_alloc(), new_loc_list(), NULL, dw_loc_list_struct::section, dw_loc_list_struct::vbegin, and dw_loc_list_struct::vend.

◆ resolve_addr_in_expr()

static bool resolve_addr_in_expr ( dw_attr_node * a,
dw_loc_descr_ref loc )
static
Helper function for resolve_addr, handle one location
expression, return false if at least one CONST_STRING or SYMBOL_REF in
the location list couldn't be resolved.   

References build_array_type(), build_index_type(), build_string(), char_type_node, ggc_alloc(), size_int, string_cst_pool_decl(), TREE_TYPE, and XSTR.

◆ resolve_args_picking()

static bool resolve_args_picking ( dw_loc_descr_ref loc,
unsigned initial_frame_offset,
struct dwarf_procedure_info * dpi )
static
Make a DFS over operations reachable through LOC (i.e. follow branch
operations) in order to resolve the operand of DW_OP_pick operations that
target DWARF procedure arguments (DPI).  INITIAL_FRAME_OFFSET is the frame
offset *before* LOC is executed.  Return if all relocations were
successful.   

References ggc_alloc(), and resolve_args_picking_1().

Referenced by function_to_dwarf_procedure(), and lower_bound_default().

◆ resolve_args_picking_1()

◆ resolve_one_addr()

static bool resolve_one_addr ( rtx * addr)
static
Helper function for resolve_addr, attempt to resolve
one CONST_STRING, return true if successful.  Similarly verify that
SYMBOL_REFs refer to variables emitted in the current CU.   

Referenced by add_const_value_attribute(), and mem_loc_descriptor().

◆ resolve_variable_value()

static void resolve_variable_value ( dw_die_ref die)
static
Attempt to resolve DW_OP_GNU_variable_value using loc_list_from_tree.   

◆ resolve_variable_value_in_expr()

static bool resolve_variable_value_in_expr ( dw_attr_node * a,
dw_loc_descr_ref loc )
static
Helper function for resolve_variable_value, handle
DW_OP_GNU_variable_value in one location expression.
Return true if exprloc has been changed into loclist.   

◆ resolve_variable_values()

static void resolve_variable_values ( void )
static
Attempt to optimize DW_OP_GNU_variable_value refering to
temporaries in the current function.   

◆ retry_incomplete_types()

static void retry_incomplete_types ( void )
static
Walk through the list of incomplete types again, trying once more to
emit full debugging info for them.   

◆ rotate_loc_descriptor()

static dw_loc_descr_ref rotate_loc_descriptor ( rtx rtl,
scalar_int_mode mode,
machine_mode mem_mode )
static
ROTATE (constMASK is mode mask, BITSIZE is bitsize of mode):
DW_OP_over DW_OP_over DW_OP_shl [ constMASK DW_OP_and ] DW_OP_rot
[ DW_OP_swap constMASK DW_OP_and DW_OP_swap ] DW_OP_neg
DW_OP_plus_uconst <BITSIZE> DW_OP_shr DW_OP_or

ROTATERT is similar:
DW_OP_over DW_OP_over DW_OP_neg DW_OP_plus_uconst <BITSIZE>
DW_OP_shl [ constMASK DW_OP_and ] DW_OP_rot
[ DW_OP_swap constMASK DW_OP_and DW_OP_swap ] DW_OP_shr DW_OP_or   

References add_loc_descr(), DWARF2_ADDR_SIZE, GEN_INT, GET_CODE, GET_MODE, GET_MODE_BITSIZE(), GET_MODE_MASK, GET_MODE_SIZE(), ggc_alloc(), HOST_BITS_PER_WIDE_INT, i, is_narrower_int_mode(), mem_loc_descriptor(), new_loc_descr(), NULL, VAR_INIT_STATUS_INITIALIZED, and XEXP.

Referenced by mem_loc_descriptor().

◆ round_up_to_align()

static offset_int round_up_to_align ( const offset_int & t,
unsigned int align )
inlinestatic
Return the result of rounding T up to ALIGN.   

References wi::udiv_trunc().

Referenced by field_byte_offset().

◆ rtl_for_decl_init()

◆ rtl_for_decl_location()

◆ same_attr_p()

static bool same_attr_p ( dw_attr_node * at1,
dw_attr_node * at2,
int * mark )
static
Do the attributes look the same?   

References ggc_alloc(), and same_dw_val_p().

Referenced by same_die_p().

◆ same_die_p()

static bool same_die_p ( dw_die_ref die1,
dw_die_ref die2,
int * mark )
static
Do the dies look the same?   

References FOR_EACH_VEC_SAFE_ELT, ggc_alloc(), same_attr_p(), same_die_p(), and vec_safe_length().

Referenced by same_die_p(), and same_dw_val_p().

◆ same_dw_val_p()

◆ same_loc_p()

static bool same_loc_p ( dw_loc_descr_ref loc1,
dw_loc_descr_ref loc2,
int * mark )
inlinestatic
Do the location expressions look same?   

References ggc_alloc(), and same_dw_val_p().

Referenced by same_dw_val_p().

◆ save_macinfo_strings()

static void save_macinfo_strings ( void )
static
Save any strings needed by the macinfo table in the debug str
table.  All strings must be collected into the table by the time
index_string is called.   

◆ schedule_generic_params_dies_gen()

static void schedule_generic_params_dies_gen ( tree t)
static
Schedule the generation of the generic parameter dies for the
instance of generic type T. The proper generation itself is later
done by gen_scheduled_generic_parms_dies.  

◆ scompare_loc_descriptor()

static dw_loc_descr_ref scompare_loc_descriptor ( enum dwarf_location_atom op,
rtx rtl,
machine_mode mem_mode )
static

◆ scompare_loc_descriptor_narrow()

static dw_loc_descr_ref scompare_loc_descriptor_narrow ( enum dwarf_location_atom op,
rtx rtl,
scalar_int_mode op_mode,
dw_loc_descr_ref op0,
dw_loc_descr_ref op1 )
static
Subroutine of scompare_loc_descriptor for the case in which we're
comparing two scalar integer operands OP0 and OP1 that have mode OP_MODE,
and in which OP_MODE is smaller than DWARF2_ADDR_SIZE.   

References add_loc_descr(), compare_loc_descriptor(), CONST_INT_P, DWARF2_ADDR_SIZE, GET_MODE_BITSIZE(), GET_MODE_MASK, GET_MODE_SIZE(), ggc_alloc(), HOST_BITS_PER_WIDE_INT, int_loc_descriptor(), INTVAL, new_loc_descr(), NULL, shift, size_of_int_loc_descriptor(), UINTVAL, and XEXP.

Referenced by scompare_loc_descriptor().

◆ scompare_loc_descriptor_wide()

static dw_loc_descr_ref scompare_loc_descriptor_wide ( enum dwarf_location_atom op,
scalar_int_mode op_mode,
dw_loc_descr_ref op0,
dw_loc_descr_ref op1 )
static
Subroutine of scompare_loc_descriptor for the case in which we're
comparing two scalar integer operands OP0 and OP1 that have mode OP_MODE,
and in which OP_MODE is bigger than DWARF2_ADDR_SIZE.   

References add_loc_descr(), base_type_for_mode(), compare_loc_descriptor(), dw_val_class_die_ref, dwarf_OP(), ggc_alloc(), new_loc_descr(), and NULL.

Referenced by scompare_loc_descriptor().

◆ scope_die_for()

static dw_die_ref scope_die_for ( tree t,
dw_die_ref context_die )
static
Return the DIE for the scope that immediately contains this type.
Non-named types that do not involve a function-local type get global
scope.  Named types nested in namespaces or other types get their
containing scope.  All other types (i.e. function-local named types) get
the current active scope.   

References comp_unit_die(), die_struct::die_child, and die_struct::die_sib.

Referenced by modified_type_die().

◆ secname_for_decl()

static const char * secname_for_decl ( const_tree decl)
static
We need to figure out what section we should use as the base for the
address ranges where a given location is valid.
1. If this particular DECL has a section associated with it, use that.
2. If this function has a section associated with it, use that.
3. Otherwise, use the text section.
XXX: If you split a variable across multiple sections, we won't notice.   

References cfun, crtl, current_function_decl, current_function_section(), DECL_EXTERNAL, DECL_SECTION_NAME, ggc_alloc(), in_cold_section_p, SECTION_NAMED, text_section_label, TREE_PUBLIC, TREE_STATIC, and VAR_OR_FUNCTION_DECL_P.

Referenced by convert_cfa_to_fb_loc_list(), and dw_loc_list().

◆ set_AT_ref_external()

static void set_AT_ref_external ( dw_attr_node * a,
int i )
inlinestatic

References a, AT_class(), dw_val_class_die_ref, gcc_assert, and i.

Referenced by build_abbrev_table().

◆ set_block_origin_self()

static void set_block_origin_self ( tree stmt)
static
Given a pointer to some BLOCK node, if the BLOCK_ABSTRACT_ORIGIN for the
given BLOCK node is NULL, set the BLOCK_ABSTRACT_ORIGIN for the node so
that it points to the node itself, thus indicating that the node is its
own (abstract) origin.  Additionally, if the BLOCK_ABSTRACT_ORIGIN for
the given node is NULL, recursively descend the decl/block tree which
it is the root of, and for each other ..._DECL or BLOCK node contained
therein whose DECL_ABSTRACT_ORIGINs or BLOCK_ABSTRACT_ORIGINs are also
still NULL, set *their* DECL_ABSTRACT_ORIGIN or BLOCK_ABSTRACT_ORIGIN
values to point to themselves.   

◆ set_cur_line_info_table()

static void set_cur_line_info_table ( section * sec)
static
Lookup the "current" table into which we emit line info, so
that we don't have to do it for every source line.   

References var_loc_list_def::first, var_loc_list_def::last, var_loc_list_def::last_before_switch, and var_loc_node::next.

Referenced by dwarf2out_switch_text_section(), and find_empty_loc_ranges_at_text_label().

◆ set_decl_origin_self()

static void set_decl_origin_self ( tree decl)
static
Forward declare these functions, because they are mutually recursive
with their set_block_* pairing functions.   
Given a pointer to some ..._DECL node, if the DECL_ABSTRACT_ORIGIN for
the given ..._DECL node is NULL, set the DECL_ABSTRACT_ORIGIN for the
node to so that it points to the node itself, thus indicating that the
node represents its own (abstract) origin.  Additionally, if the
DECL_ABSTRACT_ORIGIN for the given node is NULL, recursively descend
the decl/block tree of which the given node is the root of, and for
each other ..._DECL or BLOCK node contained therein whose
DECL_ABSTRACT_ORIGINs or BLOCK_ABSTRACT_ORIGINs are also still NULL,
set *their* DECL_ABSTRACT_ORIGIN or BLOCK_ABSTRACT_ORIGIN values to
point to themselves.   

References BLOCK_ABSTRACT_ORIGIN, BLOCK_SUBBLOCKS, BLOCK_VARS, DECL_CHAIN, DECL_EXTERNAL, ggc_alloc(), NULL_TREE, set_decl_origin_self(), and TREE_CODE.

Referenced by set_decl_origin_self().

◆ set_indirect_string()

static void set_indirect_string ( struct indirect_string_node * node)
static

◆ setup_namespace_context()

static dw_die_ref setup_namespace_context ( tree thing,
dw_die_ref context_die )
static
Force out any required namespaces to be able to output DECL,
and return the new context_die for it, if it's changed.   

◆ should_emit_struct_debug()

◆ should_move_die_to_comdat()

static bool should_move_die_to_comdat ( dw_die_ref die)
static
Return true if this is a type DIE that should be moved to a
COMDAT .debug_types section or .debug_info section with DW_UT_*type
unit type.   

References AT_class(), contains_subprogram_definition(), die_struct::die_tag, dw_val_class_unsigned_const, dw_val_class_unsigned_const_implicit, get_AT(), ggc_alloc(), is_declaration_die(), is_nested_in_subprogram(), and NULL.

Referenced by break_out_comdat_types().

◆ simple_decl_align_in_bits()

static unsigned simple_decl_align_in_bits ( const_tree decl)
inlinestatic

◆ simple_type_align_in_bits()

static unsigned simple_type_align_in_bits ( const_tree type)
inlinestatic
Given a pointer to a tree node, return the alignment in bits for
it, or else return BITS_PER_WORD if the node actually turns out to
be an ERROR_MARK node.   

References BITS_PER_WORD, ggc_alloc(), TREE_CODE, and TYPE_ALIGN.

Referenced by field_byte_offset().

◆ simple_type_size_in_bits()

static unsigned HOST_WIDE_INT simple_type_size_in_bits ( const_tree type)
inlinestatic
Given a pointer to a tree node, assumed to be some kind of a ..._TYPE
node, return the size in bits for the type if it is a constant, or else
return the alignment for the type if the type's size is not constant, or
else return BITS_PER_WORD if the type actually turns out to be an
ERROR_MARK node.   

References BITS_PER_WORD, ggc_alloc(), NULL_TREE, TREE_CODE, tree_fits_uhwi_p(), tree_to_uhwi(), TYPE_ALIGN, and TYPE_SIZE.

Referenced by add_prototyped_attribute(), and modified_type_die().

◆ single_element_loc_list_p()

static bool single_element_loc_list_p ( dw_loc_list_ref list)
static
Return true if the loc_list has only single element and thus
can be represented as location description.    

References dw_loc_list_struct::dw_loc_next, gcc_assert, and dw_loc_list_struct::ll_symbol.

Referenced by add_AT_location_description(), and field_byte_offset().

◆ size_of_aranges()

◆ size_of_die()

static unsigned long size_of_die ( dw_die_ref die)
static
Return the size of a DIE as it is represented in the
.debug_info section.   

References a, AT_class(), AT_discr_list(), AT_index(), AT_int(), AT_loc(), AT_loc_list(), AT_ref(), AT_ref_external(), AT_string_form(), AT_unsigned(), constant_size(), die_struct::die_abbrev, die_struct::die_attr, dw_val_class_addr, dw_val_class_const, dw_val_class_const_double, dw_val_class_const_implicit, dw_val_class_data8, dw_val_class_die_ref, dw_val_class_discr_list, dw_val_class_discr_value, dw_val_class_fde_ref, dw_val_class_file, dw_val_class_file_implicit, dw_val_class_flag, dw_val_class_high_pc, dw_val_class_lbl_id, dw_val_class_lineptr, dw_val_class_loc, dw_val_class_loc_list, dw_val_class_loclistsptr, dw_val_class_macptr, dw_val_class_offset, dw_val_class_range_list, dw_val_class_str, dw_val_class_symview, dw_val_class_unsigned_const, dw_val_class_unsigned_const_implicit, dw_val_class_vec, dw_val_class_view_list, dw_val_class_vms_delta, dw_val_class_wide_int, DWARF2_ADDR_SIZE, dwarf_FORM(), DWARF_LARGEST_DATA_FORM_BITS, DWARF_TYPE_SIGNATURE_SIZE, FOR_EACH_VEC_SAFE_ELT, gcc_assert, gcc_unreachable, get_full_len(), ggc_alloc(), HOST_BITS_PER_CHAR, HOST_BITS_PER_DOUBLE_INT, HOST_BITS_PER_WIDE_INT, maybe_emit_file(), NO_INDEX_ASSIGNED, NOT_INDEXED, r, rnglist_idx, size_of_discr_list(), size_of_discr_value(), size_of_locs(), size_of_sleb128(), size_of_uleb128(), symview_upper_bound, and value_format().

Referenced by calc_base_type_die_sizes(), calc_die_sizes(), and output_skeleton_debug_sections().

◆ size_of_discr_list()

static int size_of_discr_list ( dw_discr_list_ref discr_list)
static
Return the size of the value in a DW_AT_discr_list attribute.   

References ggc_alloc(), NULL, and size_of_discr_value().

Referenced by output_die(), size_of_die(), and value_format().

◆ size_of_discr_value()

static int size_of_discr_value ( dw_discr_value * discr_value)
static
Return the size of the value in a DW_AT_discr_value attribute.   

References ggc_alloc(), size_of_sleb128(), and size_of_uleb128().

Referenced by size_of_die(), and size_of_discr_list().

◆ size_of_int_loc_descriptor()

◆ size_of_int_shift_loc_descriptor()

static unsigned long size_of_int_shift_loc_descriptor ( HOST_WIDE_INT i,
int shift )
static
Return size_of_locs (int_shift_loc_descriptor (i, shift))
without actually allocating it.   

References i, shift, and size_of_int_loc_descriptor().

Referenced by size_of_int_loc_descriptor().

◆ size_of_loc_descr()

◆ size_of_locs()

◆ size_of_pubnames()

static unsigned long size_of_pubnames ( vec< pubname_entry, va_gc > * names)
static
Return the size of the .debug_pubnames or .debug_pubtypes table
generated for the compilation unit.   

References DWARF_PUBNAMES_HEADER_SIZE, FOR_EACH_VEC_ELT, ggc_alloc(), i, include_pubname_in_output(), pubname_struct::name, and names.

Referenced by output_pubnames().

◆ skip_loc_list_entry()

static bool skip_loc_list_entry ( dw_loc_list_ref curr,
unsigned long * sizep = NULL )
static
Determine whether or not to skip loc_list entry CURR.  If SIZEP is
NULL, don't consider size of the location expression.  If we're not
to skip it, and SIZEP is non-null, store the size of CURR->expr's
representation in *SIZEP.   

References ggc_alloc(), and size_of_locs().

Referenced by output_loc_list().

◆ splice_child_die()

static void splice_child_die ( dw_die_ref parent,
dw_die_ref child )
static
Move CHILD, which must be a child of PARENT or the DIE for which PARENT
is the specification, to the end of PARENT's list of children.
This is done by removing and re-adding it.   

References die_struct::die_parent, gcc_assert, get_AT_ref(), ggc_alloc(), and reparent_child().

◆ string_cst_pool_decl()

static rtx string_cst_pool_decl ( tree t)
static
For STRING_CST, return SYMBOL_REF of its constant pool entry,
if possible, and create DW_TAG_dwarf_procedure that can be referenced
from DW_OP_implicit_pointer if the string hasn't been seen yet.   

Referenced by resolve_addr_in_expr().

◆ strip_naming_typedef()

static dw_die_ref strip_naming_typedef ( tree type,
dw_die_ref type_die )
inlinestatic
Given a TYPE_DIE representing the type TYPE, if TYPE is an
anonymous type named by the typedef TYPE_DIE, return the DIE of the
anonymous type instead the one of the naming typedef.   

References die_struct::die_tag, get_AT_ref(), ggc_alloc(), is_naming_typedef_decl(), TREE_CODE, and TYPE_NAME.

Referenced by force_decl_die(), and lookup_type_die_strip_naming_typedef().

◆ subrange_type_die()

static dw_die_ref subrange_type_die ( tree type,
tree low,
tree high,
tree bias,
dw_die_ref context_die )
static
Given a pointer to a tree node for a subrange type, return a pointer
to a DIE that describes the given type.   

References add_alignment_attribute(), add_AT_unsigned(), add_bound_info(), add_scalar_info(), comp_unit_die(), dw_scalar_form_constant, dw_scalar_form_exprloc, dw_scalar_form_reference, ggc_alloc(), int_size_in_bytes(), new_die(), NULL, size_in_bytes(), and TREE_TYPE.

Referenced by modified_type_die().

◆ switch_to_eh_frame_section()

static void switch_to_eh_frame_section ( bool back)
static
Switch [BACK] to eh_frame_section.  If we don't have an eh_frame_section,
switch to the data section instead, and write out a synthetic start label
for collect2 the first time around.   

References asm_out_file, ASM_OUTPUT_LABEL, ASM_PREFERRED_EH_DATA_FORMAT, data_section, eh_frame_section, EH_TABLES_CAN_BE_READ_ONLY, floor_log2(), get_file_function_name(), get_section(), ggc_alloc(), IDENTIFIER_POINTER, NULL, PTR_SIZE, readonly_data_section, SECTION_WRITE, switch_to_section(), and targetm.

Referenced by switch_to_frame_table_section().

◆ switch_to_frame_table_section()

static void switch_to_frame_table_section ( int for_eh,
bool back )
static
Switch [BACK] to the eh or debug frame table section, depending on
FOR_EH.   

References debug_frame_section, DEBUG_FRAME_SECTION, get_section(), ggc_alloc(), NULL, SECTION_DEBUG, switch_to_eh_frame_section(), and switch_to_section().

Referenced by output_call_frame_info(), and output_fde().

◆ template_parameter_pack_die()

static dw_die_ref template_parameter_pack_die ( tree parm_pack,
tree parm_pack_args,
dw_die_ref parent_die )
static
Generate and return a  DW_TAG_GNU_template_parameter_pack DIE representing.
PARM_PACK must be a template parameter pack. The returned DIE
will be child DIE of PARENT_DIE.   

References add_name_and_src_coords_attributes(), gcc_assert, generic_parameter_die(), ggc_alloc(), new_die(), TREE_VEC_ELT, and TREE_VEC_LENGTH.

Referenced by gen_generic_params_dies().

◆ tls_mem_loc_descriptor()

static dw_loc_descr_ref tls_mem_loc_descriptor ( rtx mem)
static
Try to handle TLS MEMs, for which mem_loc_descriptor on XEXP (mem, 0)
failed.   

References DECL_THREAD_LOCAL_P, get_base_address(), ggc_alloc(), loc_descr_plus_const(), loc_descriptor_from_tree(), MEM_EXPR, MEM_OFFSET, MEM_OFFSET_KNOWN_P, NULL, NULL_TREE, and VAR_P.

Referenced by loc_descriptor(), and mem_loc_descriptor().

◆ tree_add_const_value_attribute()

◆ tree_add_const_value_attribute_for_decl()

static bool tree_add_const_value_attribute_for_decl ( dw_die_ref var_die,
tree decl )
static
Attach a DW_AT_const_value attribute to VAR_DIE. The value of the
attribute is the const value of T, where T is an integral constant
variable with static storage duration
(so it can't be a PARM_DECL or a RESULT_DECL).   

References DECL_INITIAL, get_AT(), ggc_alloc(), tree_add_const_value_attribute(), TREE_CODE, TREE_READONLY, TREE_STATIC, TREE_THIS_VOLATILE, and VAR_P.

Referenced by add_location_or_const_value_attribute().

◆ type_main_variant()

static tree type_main_variant ( tree type)
inlinestatic
Return a reference to a type, with its const and volatile qualifiers
removed.   

References ggc_alloc(), TREE_CODE, type(), and TYPE_MAIN_VARIANT.

Referenced by modified_type_die().

◆ type_tag()

static const char * type_tag ( const_tree type)
static
Given a tree pointer to a struct, class, union, or enum type node, return
a pointer to the (string) tag name for the given type, or zero if the type
was declared without a tag.   

Referenced by add_pubtype().

◆ typed_binop()

static dw_loc_descr_ref typed_binop ( enum dwarf_location_atom op,
rtx rtl,
dw_die_ref type_die,
scalar_int_mode mode,
machine_mode mem_mode )
static
Helper function for mem_loc_descriptor.  Perform OP binary op,
but after converting arguments to type_die, afterwards
convert back to unsigned.   

References add_loc_descr(), convert_descriptor_to_mode(), dw_val_class_die_ref, dwarf_OP(), ggc_alloc(), mem_loc_descriptor(), new_loc_descr(), NULL, VAR_INIT_STATUS_INITIALIZED, and XEXP.

Referenced by mem_loc_descriptor().

◆ typed_binop_from_tree()

static dw_loc_list_ref typed_binop_from_tree ( enum dwarf_location_atom op,
tree loc,
dw_die_ref type_die,
scalar_int_mode mode,
struct loc_descr_context * context )
static
Helper function for loc_list_from_tree.  Perform OP binary op,
but after converting arguments to type_die, afterwards convert
back to unsigned.   

References add_loc_descr_to_each(), add_loc_list(), convert_descriptor_to_mode(), dw_val_class_die_ref, dwarf_OP(), ggc_alloc(), loc_list_from_tree(), new_loc_descr(), NULL, and TREE_OPERAND.

Referenced by loc_list_from_tree_1().

◆ ucompare_loc_descriptor()

static dw_loc_descr_ref ucompare_loc_descriptor ( enum dwarf_location_atom op,
rtx rtl,
machine_mode mem_mode )
static

◆ uint_comparison_loc_list()

static dw_loc_descr_ref uint_comparison_loc_list ( enum tree_code kind)
static
Generate and return a location description that computes the unsigned
comparison of the two stack top entries (a OP b where b is the top-most
entry and a is the second one).  The KIND of comparison can be LT_EXPR,
LE_EXPR, GT_EXPR or GE_EXPR.   

References add_loc_descr(), dw_val_class_loc, gcc_unreachable, ggc_alloc(), and new_loc_descr().

Referenced by loc_list_from_uint_comparison().

◆ uint_loc_descriptor()

◆ unmark_all_dies()

◆ unmark_dies()

static void unmark_dies ( dw_die_ref die)
static

◆ use_distinct_base_address_for_range()

static bool use_distinct_base_address_for_range ( unsigned int i)
static
Return true if it is beneficial to use DW_RLE_base_address{,x}.
I is index of the following range.   

References ggc_alloc(), i, NULL, ranges_table, and vec_safe_length().

Referenced by index_rnglists(), and output_rnglists().

◆ uses_local_type()

static tree uses_local_type ( tree type)
static
If TYPE involves a function-local type (including a local typedef to a
non-local type), returns that type; otherwise returns NULL_TREE.   

◆ uses_local_type_r()

static tree uses_local_type_r ( tree * tp,
int * walk_subtrees,
void * data )
static
walk_tree helper function for uses_local_type, below.   

References dw_attr_struct::dw_attr_val, dw_val_node::v, and dw_val_node::dw_val_struct_union::val_discr_list.

◆ value_format()

◆ var_location_switch_text_section()

static void var_location_switch_text_section ( void )
static
Note in all location lists that text section has changed.   

Referenced by dwarf2out_switch_text_section().

◆ var_location_switch_text_section_1()

int var_location_switch_text_section_1 ( var_loc_list ** slot,
void *  )
Note in one location list that text section has changed.   

◆ verify_die()

◆ view_list_to_loc_list_val_node()

static dw_val_node * view_list_to_loc_list_val_node ( dw_val_node * val)
inlinestatic

◆ want_pubnames()

static bool want_pubnames ( void )
inlinestatic
Whether to generate the DWARF accelerator tables in .debug_pubnames
and .debug_pubtypes.  This is configured per-target, but can be
overridden by the -gpubnames or -gno-pubnames options.   

References DINFO_LEVEL_TERSE, ggc_alloc(), and targetm.

Referenced by add_AT_pubnames(), add_pubname(), add_pubtype(), and output_pubtables().

Variable Documentation

◆ abbrev_die_table

vec<dw_die_ref, va_gc>* abbrev_die_table
static
A vector of references to DIE's that are uniquely identified by their tag,
presence/absence of children DIE's, and list of attribute/value pairs.   

Referenced by build_abbrev_table(), optimize_abbrev_table(), output_abbrev_section(), and output_comp_unit().

◆ abbrev_opt_base_type_end

unsigned int abbrev_opt_base_type_end
static
Maximum abbrev_id of a base type plus one (we can't optimize DIEs with
abbrev_id smaller than this, because they must be already sized
during build_abbrev_table).   

Referenced by calc_base_type_die_sizes(), die_abbrev_cmp(), and optimize_abbrev_table().

◆ abbrev_opt_start

unsigned int abbrev_opt_start
static
The following 3 variables are temporaries that are computed only during the
build_abbrev_table call and used and released during the following
optimize_abbrev_table call.   
First abbrev_id that can be optimized based on usage.   

Referenced by build_abbrev_table(), calc_base_type_die_sizes(), die_abbrev_cmp(), optimize_abbrev_table(), and output_comp_unit().

◆ abbrev_section_label

char abbrev_section_label[MAX_ARTIFICIAL_LABEL_BYTES]
static

◆ abbrev_usage_count

vec<unsigned int> abbrev_usage_count
static
Vector of usage counts during build_abbrev_table.  Indexed by
abbrev_id - abbrev_opt_start.   

Referenced by build_abbrev_table(), die_abbrev_cmp(), and optimize_abbrev_table().

◆ addr_index_table

hash_table<addr_hasher>* addr_index_table
static
Table of entries into the .debug_addr section.   

Referenced by add_addr_table_entry(), add_top_level_skeleton_die_attrs(), prune_unmark_dies(), and remove_addr_table_entry().

◆ auto_die

dw_die_ref auto_die
static
The DIE for C++14 'auto' in a function return type.   

Referenced by gen_block_die().

◆ base_types

vec<dw_die_ref> base_types
static

◆ cached_dw_loc_list_table

hash_table<dw_loc_list_hasher>* cached_dw_loc_list_table
static
Table of cached location lists.   

Referenced by add_location_or_const_value_attribute(), and dwarf2out_ignore_block().

◆ cached_next_real_insn

rtx_insn* cached_next_real_insn
static

Referenced by dwarf2out_end_epilogue().

◆ call_arg_loc_last

struct call_arg_loc_node* call_arg_loc_last
static

Referenced by dwarf2out_ignore_block().

◆ call_arg_locations

struct call_arg_loc_node* call_arg_locations
static
Head and tail of call_arg_loc chain.   

Referenced by dwarf2out_ignore_block(), and gen_field_die().

◆ call_site_count

int call_site_count = -1
static
Number of call sites in the current function.   

Referenced by dwarf2out_ignore_block(), and find_empty_loc_ranges_at_text_label().

◆ cold_end_label

char cold_end_label[MAX_ARTIFICIAL_LABEL_BYTES]
static

Referenced by output_aranges().

◆ cold_text_section

section* cold_text_section
static

◆ cold_text_section_label

char cold_text_section_label[MAX_ARTIFICIAL_LABEL_BYTES]
static

◆ cold_text_section_line_info

dw_line_info_table* cold_text_section_line_info
static

Referenced by output_line_info().

◆ comdat_type_list

comdat_type_node* comdat_type_list
static
A list of type DIEs that have been separated into comdat sections.   

Referenced by break_out_comdat_types().

◆ common_block_die_table

hash_table<block_die_hasher>* common_block_die_table
static
A hash table of references to DIE's that describe COMMON blocks.
The key is DECL_UID() ^ die_parent.   

◆ cu_die_list

limbo_die_node* cu_die_list
static
A list of CU DIEs that have been separated.   

◆ cur_line_info_table

dw_line_info_table* cur_line_info_table
static
The current table to which we should emit line number information
for the current function.  This will be set up at the beginning of
assembly for the function.   

Referenced by find_empty_loc_ranges_at_text_label().

◆ current_unit_personality

rtx current_unit_personality
static
Personality decl of current unit.  Used only when assembler does not support
personality CFI.   

Referenced by dwarf2out_begin_prologue(), and output_call_frame_info().

◆ debug_abbrev_section

section* debug_abbrev_section
static

◆ debug_addr_section

section* debug_addr_section
static

◆ debug_addr_section_label

char debug_addr_section_label[MAX_ARTIFICIAL_LABEL_BYTES]
static

◆ debug_aranges_section

section* debug_aranges_section
static

◆ debug_frame_section

section* debug_frame_section
static

◆ debug_info_section

section* debug_info_section
static
Pointers to various DWARF2 sections.   

Referenced by output_aranges(), output_comp_unit(), output_die(), output_loc_operands(), and output_pubnames().

◆ debug_info_section_label

◆ debug_line_section

section* debug_line_section
static

Referenced by output_die().

◆ debug_line_section_label

char debug_line_section_label[MAX_ARTIFICIAL_LABEL_BYTES]
static

◆ debug_line_str_hash

hash_table<indirect_string_hasher>* debug_line_str_hash
static

◆ debug_line_str_section

section* debug_line_str_section
static

Referenced by output_die(), and output_line_string().

◆ debug_loc_section

section* debug_loc_section
static

◆ debug_macinfo_section

section* debug_macinfo_section
static

Referenced by output_die().

◆ debug_macinfo_section_name

const char* debug_macinfo_section_name
static

◆ debug_pubnames_section

section* debug_pubnames_section
static

Referenced by output_pubtables().

◆ debug_pubtypes_section

section* debug_pubtypes_section
static

Referenced by output_pubtables().

◆ debug_ranges_dwo_section

section* debug_ranges_dwo_section
static

Referenced by output_rnglists().

◆ debug_ranges_section

section* debug_ranges_section
static

◆ debug_skeleton_abbrev_section

section* debug_skeleton_abbrev_section
static

◆ debug_skeleton_abbrev_section_label

char debug_skeleton_abbrev_section_label[MAX_ARTIFICIAL_LABEL_BYTES]
static

◆ debug_skeleton_info_section

section* debug_skeleton_info_section
static

◆ debug_skeleton_info_section_label

char debug_skeleton_info_section_label[MAX_ARTIFICIAL_LABEL_BYTES]
static

◆ debug_skeleton_line_section

section* debug_skeleton_line_section
static

◆ debug_skeleton_line_section_label

char debug_skeleton_line_section_label[MAX_ARTIFICIAL_LABEL_BYTES]
static

◆ debug_str_dwo_section

section* debug_str_dwo_section
static

◆ debug_str_hash

◆ debug_str_offsets_section

section* debug_str_offsets_section
static

◆ debug_str_section

section* debug_str_section
static

◆ decl_die_table

hash_table<decl_die_hasher>* decl_die_table
static
A hash table of references to DIE's that describe declarations.
The key is a DECL_UID() which is a unique number identifying each decl.   

Referenced by equate_decl_number_to_die(), and lookup_decl_die().

◆ decl_loc_table

hash_table<decl_loc_hasher>* decl_loc_table
static
Table of decl location linked lists.   

Referenced by add_var_loc_to_decl(), dwarf2out_ignore_block(), and lookup_decl_loc().

◆ decltype_auto_die

dw_die_ref decltype_auto_die
static
The DIE for C++14 'decltype(auto)' in a function return type.   

Referenced by gen_block_die().

◆ deferred_asm_name

limbo_die_node* deferred_asm_name
static
A list of DIEs for which we may have to generate
DW_AT_{,MIPS_}linkage_name once their DECL_ASSEMBLER_NAMEs are set.   

◆ demangle_name_func

const char *(* demangle_name_func) (const char *) ( const char * )
static
We allow a language front-end to designate a function that is to be
called to "demangle" any name before it is put into a DIE.   

Referenced by add_desc_attribute(), add_name_attribute(), and dwarf2out_set_demangle_name_func().

◆ do_eh_frame

bool do_eh_frame = false
static
Whether an eh_frame section is required.   

Referenced by dwarf2out_begin_prologue(), and dwarf2out_frame_finish().

◆ dw2_string_counter

int dw2_string_counter
static

Referenced by set_indirect_string().

◆ dwarf2_debug_hooks

const struct gcc_debug_hooks dwarf2_debug_hooks
The debug hooks structure.   

Referenced by process_options().

◆ dwarf2_lineno_debug_hooks

const struct gcc_debug_hooks dwarf2_lineno_debug_hooks

Referenced by process_options().

◆ dwarf_proc_stack_usage_map

hash_map<dw_die_ref, int>* dwarf_proc_stack_usage_map
static
A hash map to remember the stack usage for DWARF procedures.  The value
stored is the stack size difference between before the DWARF procedure
invokation and after it returned.  In other words, for a DWARF procedure
that consumes N stack slots and that pushes M ones, this stores M - N.   

Referenced by function_to_dwarf_procedure(), and resolve_args_picking_1().

◆ dwarf_qual_info

const dwarf_qual_info_t dwarf_qual_info[]
static
Initial value:
=
{
}
@ TYPE_QUAL_CONST
Definition tree-core.h:620
@ TYPE_QUAL_VOLATILE
Definition tree-core.h:621
@ TYPE_QUAL_RESTRICT
Definition tree-core.h:622
@ TYPE_QUAL_ATOMIC
Definition tree-core.h:623

Referenced by modified_type_die(), and qualified_die_p().

◆ dwarf_qual_info_size

const unsigned int dwarf_qual_info_size = ARRAY_SIZE (dwarf_qual_info)
static

◆ early_dwarf

◆ early_dwarf_finished

bool early_dwarf_finished
static

◆ external_die_map

◆ fde_vec

◆ file_table

hash_table<dwarf_file_hasher>* file_table
static
Filenames referenced by this compilation unit.   

Referenced by maybe_emit_file(), and output_file_names().

◆ first_loclabel_num_not_at_text_label

unsigned int first_loclabel_num_not_at_text_label
static
One above highest N where .LVLN label might be equal to .Ltext0 label.   

◆ frame_pointer_fb_offset

poly_int64 frame_pointer_fb_offset
static
Offset from the "steady-state frame pointer" to the frame base,
within the current function.   

Referenced by based_loc_descr(), and compute_frame_pointer_to_fb_displacement().

◆ frame_pointer_fb_offset_valid

bool frame_pointer_fb_offset_valid
static

◆ generic_type_instances

vec<tree, va_gc>* generic_type_instances
static
Instances of generic types for which we need to generate debug
info that describe their generic parameters and arguments. That
generation needs to happen once all types are properly laid out so
we do it at the end of compilation.   

◆ have_location_lists

bool have_location_lists
static
Whether we have location lists that need outputting  

Referenced by add_AT_loc_list(), and add_AT_view_list().

◆ have_multiple_function_sections

bool have_multiple_function_sections = false
static

◆ in_first_function_p

bool in_first_function_p = true
static
True if before or during processing of the first function being emitted.   

◆ in_text_section_p

bool in_text_section_p = false
static
True if currently in text section.   

Referenced by dwarf2out_begin_prologue(), dwarf2out_switch_text_section(), and mark_ignored_debug_section().

◆ incomplete_types

vec<tree, va_gc>* incomplete_types
static
A pointer to the base of a list of incomplete types which might be
completed at some later time.  incomplete_types_list needs to be a
vec<tree, va_gc> *because we want to tell the garbage collector about
it.   

◆ info_section_emitted

bool info_section_emitted
static
A flag to tell pubnames/types export if there is an info section to
refer to.   

Referenced by output_comp_unit(), and output_pubtables().

◆ init_sections_and_labels_generation

unsigned init_sections_and_labels_generation
static
As init_sections_and_labels may get called multiple times, have a
generation count for labels.   

◆ inline_entry_data_table

hash_table<inline_entry_data_hasher>* inline_entry_data_table
static
Inlined entry points pending DIE creation in this compilation unit.   

◆ label_num

int label_num
static
Number of internal labels generated by gen_internal_sym().   

Referenced by gen_internal_sym(), and gen_llsym().

◆ last_cold_label

const char* last_cold_label
static

◆ last_emitted_file

struct dwarf_file_data* last_emitted_file
static
The last file entry emitted by maybe_emit_file().   

Referenced by output_file_names().

◆ last_text_label

const char* last_text_label
static
Last debug-on location in corresponding section.   

Referenced by mark_ignored_debug_section().

◆ last_var_location_insn

rtx_insn* last_var_location_insn
static

Referenced by dwarf2out_end_epilogue().

◆ limbo_die_list

limbo_die_node* limbo_die_list
static
A list of DIEs with a NULL parent waiting to be relocated.   

Referenced by new_die().

◆ line_info_label_num

unsigned int line_info_label_num
static
A global counter for generating labels for line number data.   

◆ loc_list_idx

unsigned int loc_list_idx
static
During assign_location_list_indexes and output_loclists_offset the
current index, after it the number of assigned indexes (i.e. how
large the .debug_loclists* offset table should be).   

Referenced by assign_location_list_indexes(), and output_loclists_offsets().

◆ loc_section_label

◆ loclabel_num

unsigned int loclabel_num
static
Unique label counter.   

◆ macinfo_label_base

unsigned macinfo_label_base = 1
static

◆ macinfo_section_label

char macinfo_section_label[MAX_ARTIFICIAL_LABEL_BYTES]
static

◆ macinfo_table

vec<macinfo_entry, va_gc>* macinfo_table
static
A pointer to the base of a table that contains a list of macro
defines/undefines (and file start/end markers).   

Referenced by dwarf2out_define(), and output_macinfo_op().

◆ main_translation_unit

tree main_translation_unit = NULL_TREE
static
Temporary holder for dwarf2out_register_main_translation_unit.  Used to let
front-ends register a translation unit even before dwarf2out_init is
called.   

◆ maybe_at_text_label_p

bool maybe_at_text_label_p = true
static
True if loc_note during dwarf2out_var_location call might still be
before first real instruction at address equal to .Ltext0.   

◆ next_die_offset

unsigned long next_die_offset
static
This location is used by calc_die_sizes() to keep track
the offset of each DIE within the .debug_info section.   

Referenced by calc_die_sizes(), output_comdat_type_unit(), output_comp_unit(), output_compilation_unit_header(), and output_pubnames().

◆ output_line_info_generation

unsigned int output_line_info_generation
static

Referenced by output_line_info().

◆ poc_label_num

unsigned int poc_label_num
static
Unique label counter for point-of-call tables.   

◆ print_indent

int print_indent
static
Keep track of the number of spaces used to indent the
output of the debugging routines that print the structure of
the DIE internal representation.   

Referenced by debug_dwarf(), print_die(), print_dw_val(), and print_spaces().

◆ producer_string

char* producer_string
static

◆ pubname_table

vec<pubname_entry, va_gc>* pubname_table
static
A pointer to the base of a table that contains a list of publicly
accessible names.   

Referenced by add_enumerator_pubname(), add_pubname_string(), include_pubname_in_output(), output_pubnames(), and output_pubtables().

◆ pubtype_table

vec<pubname_entry, va_gc>* pubtype_table
static
A pointer to the base of a table that contains a list of publicly
accessible types.   

Referenced by add_pubtype(), output_pubnames(), and output_pubtables().

◆ ranges_base_label

char ranges_base_label[2 *MAX_ARTIFICIAL_LABEL_BYTES]
static

Referenced by output_rnglists().

◆ ranges_by_label

vec<dw_ranges_by_label, va_gc>* ranges_by_label
static
Vector of pairs of labels referenced in ranges_table.   

Referenced by add_ranges_by_labels(), and output_ranges().

◆ ranges_section_label

char ranges_section_label[2 *MAX_ARTIFICIAL_LABEL_BYTES]
static

◆ ranges_table

vec<dw_ranges, va_gc>* ranges_table
static
Vector of dies for which we should generate .debug_ranges info.   

Referenced by add_ranges_num(), index_rnglists(), note_rnglist_head(), output_ranges(), output_rnglists(), and use_distinct_base_address_for_range().

◆ rnglist_idx

unsigned int rnglist_idx
static

◆ separate_line_info

vec<dw_line_info_table *, va_gc>* separate_line_info
static
The set of all non-default tables of line number info.   

Referenced by output_line_info().

◆ single_comp_unit_die

dw_die_ref single_comp_unit_die
static
Record the root of the DIE's built for the current compilation unit.   

Referenced by comp_unit_die().

◆ skeleton_debug_str_hash

hash_table<indirect_string_hasher>* skeleton_debug_str_hash
static
With split_debug_info, both the comp_dir and dwo_name go in the
main object file, rather than the dwo, similar to the force_direct
parameter elsewhere but with additional complications:

1) The string is needed in both the main object file and the dwo.
That is, the comp_dir and dwo_name will appear in both places.

2) Strings can use four forms: DW_FORM_string, DW_FORM_strp,
DW_FORM_line_strp or DW_FORM_strx/GNU_str_index.

3) GCC chooses the form to use late, depending on the size and
reference count.

Rather than forcing the all debug string handling functions and
callers to deal with these complications, simply use a separate,
special-cased string table for any attribute that should go in the
main object file.  This limits the complexity to just the places
that need it.   

Referenced by add_skeleton_AT_string().

◆ sorted_abbrev_dies

vec<dw_die_ref> sorted_abbrev_dies
static
Vector of all DIEs added with die_abbrev >= abbrev_opt_start.   

Referenced by build_abbrev_table(), optimize_abbrev_table(), and optimize_implicit_const().

◆ switch_cold_ranges

vec<const char *, va_gc>* switch_cold_ranges
static

◆ switch_text_ranges

vec<const char *, va_gc>* switch_text_ranges
static
Mark debug-on/off locations per section.
NULL means the section is not used at all.   

Referenced by mark_ignored_debug_section(), output_aranges(), and size_of_aranges().

◆ symview_upper_bound

var_loc_view symview_upper_bound
static
This is an upper bound for view numbers that the assembler may
assign to symbolic views output in this translation.  It is used to
decide how big a field to use to represent view numbers in
symview-classed attributes.   

Referenced by output_die(), size_of_die(), and value_format().

◆ tail_call_site_count

int tail_call_site_count = -1
static
Number of tail call sites in the current function.   

Referenced by dwarf2out_ignore_block(), and find_empty_loc_ranges_at_text_label().

◆ text_end_label

char text_end_label[MAX_ARTIFICIAL_LABEL_BYTES]
static
Definitions of defaults for formats and names of various special
(artificial) labels which may be generated within this file (when the -g
options is used and DWARF2_DEBUGGING_INFO is in effect.
If necessary, these may be overridden from within the tm.h file, but
typically, overriding these defaults is unnecessary.   

Referenced by dw_loc_list(), and output_aranges().

◆ text_section_label

◆ text_section_line_info

dw_line_info_table* text_section_line_info
static
The two default tables of line number info.   

Referenced by output_line_info().

◆ tmpl_value_parm_die_table

vec<die_arg_entry, va_gc>* tmpl_value_parm_die_table
static

◆ used_rtx_array

vec<rtx, va_gc>* used_rtx_array
static
Array of RTXes referenced by the debugging information, which therefore
must be kept around forever.   

Referenced by add_const_value_attribute(), loc_descriptor(), and mem_loc_descriptor().

◆ variable_value_hash

hash_table<variable_value_hasher>* variable_value_hash
static
A hash table of DIEs that contain DW_OP_GNU_variable_value with
dw_val_class_decl_ref class, indexed by FUNCTION_DECLs which is
DECL_CONTEXT of the referenced VAR_DECLs.   

◆ zero_view_p

bitmap zero_view_p
static
A bit is set in ZERO_VIEW_P if we are using the assembler-supported
view computation, and it refers to a view identifier for which we
will not emit a label because it is known to map to a view number
zero.  We won't allocate the bitmap if we're not using assembler
support for location views, but we have to make the variable
visible for GGC and for code that will be optimized out for lack of
support but that's still parsed and compiled.  We could abstract it
out with macros, but it's not worth it.