GCC Middle and Back End API 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"
Macros | |
#define | INCLUDE_MEMORY |
#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) |
#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) |
#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) |
#define | RESET_NEXT_VIEW(x) |
#define | FORCE_RESETTING_VIEW_P(x) |
#define | 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) |
#define | CHECKSUM_BLOCK(FOO, SIZE) |
#define | CHECKSUM_STRING(FOO) |
#define | CHECKSUM(FOO) |
#define | CHECKSUM_BLOCK(FOO, SIZE) |
#define | CHECKSUM_STRING(FOO) |
#define | CHECKSUM_SLEB128(FOO) |
#define | CHECKSUM_ULEB128(FOO) |
#define | CHECKSUM_ATTR(FOO) |
#define | DWARF5_USE_DEBUG_LINE_STR |
Typedefs | |
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_hasher > | decl_hash_type |
typedef hash_table< external_ref_hasher > | external_ref_hash_type |
typedef hash_table< macinfo_entry_hasher > | macinfo_hash_type |
typedef hash_table< loc_list_hasher > | loc_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 } |
#define BLOCK_BEGIN_LABEL "LBB" |
Referenced by index_rnglists(), output_ranges(), and output_rnglists().
#define BLOCK_END_LABEL "LBE" |
Referenced by index_rnglists(), output_ranges(), and output_rnglists().
#define BLOCK_INLINE_ENTRY_LABEL "LBI" |
#define CHECKSUM | ( | FOO | ) |
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().
#define CHECKSUM | ( | FOO | ) |
For DWARF-4 types, include the trailing NULL when checksumming strings.
#define CHECKSUM_ATTR | ( | FOO | ) |
Referenced by die_checksum_ordered().
#define CHECKSUM_BLOCK | ( | FOO, | |
SIZE ) |
Referenced by attr_checksum(), and attr_checksum_ordered().
#define CHECKSUM_BLOCK | ( | FOO, | |
SIZE ) |
#define CHECKSUM_SLEB128 | ( | FOO | ) |
Referenced by attr_checksum_ordered(), and loc_checksum_ordered().
#define CHECKSUM_STRING | ( | FOO | ) |
Referenced by attr_checksum(), attr_checksum_ordered(), checksum_die_context(), die_checksum_ordered(), and die_odr_checksum().
#define CHECKSUM_STRING | ( | FOO | ) |
#define CHECKSUM_ULEB128 | ( | FOO | ) |
Referenced by attr_checksum_ordered(), checksum_die_context(), die_checksum_ordered(), die_odr_checksum(), and loc_checksum_ordered().
#define CIE_AFTER_SIZE_LABEL "LSCIE" |
Referenced by output_call_frame_info().
#define CIE_END_LABEL "LECIE" |
Referenced by output_call_frame_info().
#define COLD_END_LABEL "Letext_cold" |
#define COLD_TEXT_SECTION_LABEL "Ltext_cold" |
#define DEBUG_ABBREV_SECTION ".debug_abbrev" |
#define DEBUG_ABBREV_SECTION_LABEL "Ldebug_abbrev" |
#define DEBUG_ADDR_SECTION ".debug_addr" |
#define DEBUG_ADDR_SECTION_LABEL "Ldebug_addr" |
#define DEBUG_ARANGES_SECTION ".debug_aranges" |
#define DEBUG_DWO_ABBREV_SECTION ".debug_abbrev.dwo" |
#define DEBUG_DWO_INFO_SECTION ".debug_info.dwo" |
Referenced by output_comdat_type_unit().
#define DEBUG_DWO_LINE_SECTION ".debug_line.dwo" |
#define DEBUG_DWO_LOC_SECTION ".debug_loc.dwo" |
#define DEBUG_DWO_LOCLISTS_SECTION ".debug_loclists.dwo" |
#define DEBUG_DWO_MACINFO_SECTION ".debug_macinfo.dwo" |
#define DEBUG_DWO_MACRO_SECTION ".debug_macro.dwo" |
#define DEBUG_DWO_RNGLISTS_SECTION ".debug_rnglists.dwo" |
#define DEBUG_DWO_STR_OFFSETS_SECTION ".debug_str_offsets.dwo" |
#define DEBUG_FRAME_SECTION ".debug_frame" |
Referenced by switch_to_frame_table_section().
#define DEBUG_INFO_SECTION ".debug_info" |
Section names used to hold DWARF debugging information.
Referenced by output_comdat_type_unit().
#define DEBUG_INFO_SECTION_LABEL "Ldebug_info" |
#define DEBUG_LINE_SECTION ".debug_line" |
#define DEBUG_LINE_SECTION_LABEL "Ldebug_line" |
#define DEBUG_LINE_STR_SECTION ".debug_line_str" |
#define DEBUG_LOC_SECTION ".debug_loc" |
#define DEBUG_LOC_SECTION_LABEL "Ldebug_loc" |
#define DEBUG_LOCLISTS_SECTION ".debug_loclists" |
#define DEBUG_LTO_ABBREV_SECTION ".gnu.debuglto_.debug_abbrev" |
#define DEBUG_LTO_DWO_ABBREV_SECTION ".gnu.debuglto_.debug_abbrev.dwo" |
#define DEBUG_LTO_DWO_INFO_SECTION ".gnu.debuglto_.debug_info.dwo" |
Referenced by output_comdat_type_unit().
#define DEBUG_LTO_DWO_LINE_SECTION ".gnu.debuglto_.debug_line.dwo" |
#define DEBUG_LTO_DWO_MACINFO_SECTION ".gnu.debuglto_.debug_macinfo.dwo" |
#define DEBUG_LTO_DWO_MACRO_SECTION ".gnu.debuglto_.debug_macro.dwo" |
#define DEBUG_LTO_DWO_STR_OFFSETS_SECTION ".gnu.debuglto_.debug_str_offsets.dwo" |
#define DEBUG_LTO_INFO_SECTION ".gnu.debuglto_.debug_info" |
Referenced by output_comdat_type_unit().
#define DEBUG_LTO_LINE_SECTION ".gnu.debuglto_.debug_line" |
#define DEBUG_LTO_LINE_STR_SECTION ".gnu.debuglto_.debug_line_str" |
#define DEBUG_LTO_MACINFO_SECTION ".gnu.debuglto_.debug_macinfo" |
#define DEBUG_LTO_MACRO_SECTION ".gnu.debuglto_.debug_macro" |
#define DEBUG_LTO_STR_DWO_SECTION ".gnu.debuglto_.debug_str.dwo" |
#define DEBUG_LTO_STR_SECTION ".gnu.debuglto_.debug_str" |
#define DEBUG_MACINFO_SECTION ".debug_macinfo" |
#define DEBUG_MACINFO_SECTION_LABEL "Ldebug_macinfo" |
#define DEBUG_MACRO_ATTRIBUTE |
Attribute used to refer to the macro section.
#define DEBUG_MACRO_SECTION ".debug_macro" |
#define DEBUG_MACRO_SECTION_LABEL "Ldebug_macro" |
#define DEBUG_PUBNAMES_SECTION |
#define DEBUG_PUBTYPES_SECTION |
#define DEBUG_RANGES_SECTION ".debug_ranges" |
#define DEBUG_RANGES_SECTION_LABEL "Ldebug_ranges" |
Referenced by output_rnglists().
#define DEBUG_RNGLISTS_SECTION ".debug_rnglists" |
#define DEBUG_SKELETON_ABBREV_SECTION_LABEL "Lskeleton_debug_abbrev" |
#define DEBUG_SKELETON_INFO_SECTION_LABEL "Lskeleton_debug_info" |
#define DEBUG_SKELETON_LINE_SECTION_LABEL "Lskeleton_debug_line" |
#define DEBUG_STR_DWO_SECTION ".debug_str.dwo" |
#define DEBUG_STR_DWO_SECTION_FLAGS (SECTION_DEBUG | SECTION_EXCLUDE) |
Section flags for .debug_str.dwo section.
#define DEBUG_STR_OFFSETS_SECTION ".debug_str_offsets" |
#define DEBUG_STR_SECTION ".debug_str" |
#define DEBUG_STR_SECTION_FLAGS |
Section flags for .debug_str section.
Referenced by prune_unused_types_prune().
#define DIE_LABEL_PREFIX "DW" |
Referenced by should_emit_struct_debug().
#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().
#define DW_FORM_ref (dwarf_offset_size == 8 ? DW_FORM_ref8 : DW_FORM_ref4) |
Referenced by value_format().
#define DW_RANGES_IDX_SKELETON ((1U << 31) - 1) |
Referenced by add_ranges_by_labels(), index_rnglists(), and output_rnglists().
#define DWARF2_ASM_LINE_DEBUG_INFO 0 |
Use assembler line directives if available.
Referenced by dwarf2out_default_as_loc_support().
#define DWARF2_ASM_VIEW_DEBUG_INFO 0 |
Use assembler views in line directives if available.
Referenced by dwarf2out_default_as_locview_support().
#define DWARF2_DIR_SHOULD_END_WITH_SEPARATOR 0 |
Referenced by comp_dir_string(), and output_file_names().
#define DWARF2_INDIRECT_STRING_SUPPORT_MISSING_ON_TARGET 0 |
Referenced by find_string_form(), and output_macinfo().
#define DWARF5_USE_DEBUG_LINE_STR |
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().
#define DWARF_ARANGES_HEADER_SIZE |
Fixed size portion of the address range info.
Referenced by size_of_aranges().
#define DWARF_ARANGES_PAD_SIZE |
Size of padding portion in the address range info. It must be aligned to twice the pointer size.
Referenced by output_aranges().
#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().
#define DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE |
Fixed size portion of the DWARF comdat type unit header.
Referenced by output_comdat_type_unit().
#define DWARF_COMPILE_UNIT_HEADER_SIZE |
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().
#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().
#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().
#define DWARF_INITIAL_LENGTH_SIZE_STR (dwarf_offset_size == 4 ? "-4" : "-12") |
#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().
#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().
#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().
#define DWARF_LINE_DEFAULT_MAX_OPS_PER_INSN 1 |
Maximum number of operations per instruction bundle.
Referenced by output_line_info().
#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().
#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().
#define DWARF_PUBNAMES_HEADER_SIZE (2 * dwarf_offset_size + 2) |
Fixed size portion of public names info.
Referenced by size_of_pubnames().
#define DWARF_REF_SIZE (dwarf_version == 2 ? DWARF2_ADDR_SIZE : dwarf_offset_size) |
Referenced by output_loc_operands(), and size_of_loc_descr().
#define DWARF_ROUND | ( | SIZE, | |
BOUNDARY ) |
Round SIZE up to the nearest BOUNDARY.
#define EPILOGUE_BEGIN_LABEL "LEB" |
Referenced by dwarf2out_vms_begin_epilogue().
#define FDE_AFTER_SIZE_LABEL "LASFDE" |
Referenced by output_fde().
#define FDE_END_LABEL "LEFDE" |
Referenced by output_fde().
#define FDE_LABEL "LSFDE" |
Referenced by output_die(), and output_fde().
#define FOR_EACH_CHILD | ( | die, | |
c, | |||
expr ) |
Evaluate 'expr' while 'c' is set to each child of DIE in order.
Referenced by add_pubtype(), add_sibling_attributes(), assign_location_list_indexes(), build_abbrev_table(), calc_die_sizes(), clone_tree(), clone_tree_partial(), collect_skeleton_dies(), contains_subprogram_definition(), copy_declaration_context(), copy_decls_walk(), copy_dwarf_procs_ref_in_dies(), die_checksum(), is_template_instantiation(), mark_dies(), move_all_children(), optimize_external_refs_1(), output_die(), output_location_lists(), output_loclists_offsets(), print_die(), unmark_all_dies(), and unmark_dies().
#define FORCE_RESET_NEXT_VIEW | ( | x | ) |
Referenced by find_empty_loc_ranges_at_text_label().
#define FORCE_RESETTING_VIEW_P | ( | x | ) |
#define FRAME_BEGIN_LABEL "Lframe" |
Referenced by output_call_frame_info().
#define FUNC_BEGIN_LABEL "LFB" |
Referenced by dwarf2out_begin_prologue().
#define FUNC_END_LABEL "LFE" |
Referenced by dw_loc_list(), and dwarf2out_end_epilogue().
#define FUNC_SECOND_SECT_LABEL "LFSB" |
Referenced by dwarf2out_switch_text_section().
#define have_macinfo |
True if .debug_macinfo or .debug_macros section is going to be emitted.
#define HAVE_XCOFF_DWARF_EXTRAS 0 |
Referenced by add_AT_loc_list(), and add_AT_view_list().
#define INCLUDE_MEMORY |
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
#define LINE_CODE_LABEL "LM" |
Referenced by output_one_line_info_table().
#define LINE_NUMBER_BEGIN_LABEL "LSLT" |
Referenced by output_line_info().
#define LINE_NUMBER_END_LABEL "LELT" |
Referenced by output_line_info().
#define LN_PROLOG_AS_LABEL "LASLTP" |
Referenced by output_line_info().
#define LN_PROLOG_END_LABEL "LELTP" |
Referenced by output_line_info().
#define MAX_ARTIFICIAL_LABEL_BYTES 40 |
Maximum size (in bytes) of an artificially generated label.
Referenced by dw_loc_list(), dwarf2out_begin_prologue(), dwarf2out_do_cfi_startproc(), dwarf2out_end_epilogue(), dwarf2out_maybe_output_loclist_view_pair(), dwarf2out_switch_text_section(), dwarf2out_vms_begin_epilogue(), dwarf2out_vms_end_prologue(), gen_internal_sym(), index_rnglists(), output_call_frame_info(), output_die(), output_fde(), output_line_info(), output_loc_list(), output_loc_operands(), output_one_line_info_table(), output_ranges(), output_rnglists(), and set_indirect_string().
#define NO_INDEX_ASSIGNED (-2U) |
#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().
#define PROLOGUE_END_LABEL "LPE" |
Referenced by dwarf2out_vms_end_prologue().
#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().
#define RELOCATED_OFFSET (NULL) |
Referenced by add_AT_range_list(), output_range_list_offset(), and value_format().
#define RESET_NEXT_VIEW | ( | x | ) |
Referenced by maybe_reset_location_view().
#define RESETTING_VIEW_P | ( | x | ) |
Referenced by maybe_reset_location_view().
#define SKELETON_COMP_DIE_ABBREV 1 |
Referenced by output_skeleton_debug_sections().
#define SKELETON_TYPE_DIE_ABBREV 2 |
#define TEXT_END_LABEL "Letext" |
#define TEXT_SECTION_LABEL "Ltext" |
Labels we insert at beginning sections we can reference instead of the section names themselves.
#define TYPE_DECL_IS_STUB | ( | decl | ) |
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.
#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().
#define use_debug_types |
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().
#define XCOFF_DEBUGGING_INFO 0 |
#define ZERO_VIEW_P | ( | N | ) |
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 struct cached_dw_loc_list_def cached_dw_loc_list |
typedef struct die_arg_entry_struct die_arg_entry |
typedef struct die_struct 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.
typedef struct dw_line_info_struct dw_line_info_entry |
typedef long int dw_offset |
Various DIE's use offsets relative to the beginning of the .debug_info section to refer to each other.
typedef struct limbo_die_struct 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.
typedef hash_table<loc_list_hasher> loc_list_hash_type |
typedef struct macinfo_struct macinfo_entry |
A structure to hold a macinfo entry.
typedef struct pubname_struct pubname_entry |
The pubname structure
typedef struct skeleton_chain_struct skeleton_chain_node |
typedef struct var_loc_list_def var_loc_list |
enum ate_kind |
enum dtprel_bool |
enum 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 |
enum dw_scalar_form |
|
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, TREE_CODE, tree_fits_uhwi_p(), and tree_to_uhwi().
Referenced by record_type_tag().
|
static |
Add DW_AT_accessibility attribute to DIE if needed.
References add_AT_unsigned(), die_struct::die_parent, die_struct::die_tag, NULL, TREE_PRIVATE, and TREE_PROTECTED.
|
static |
Add attr to the address table entry to the table. Defer setting an index until output time.
References addr_index_table, hash_table< Descriptor, Lazy, Allocator >::create_ggc(), gcc_assert, ggc_cleared_alloc(), init_addr_table_entry(), and addr_table_entry::refcount.
Referenced by add_AT_addr(), add_AT_lbl_id(), add_AT_low_high_pc(), index_rnglists(), and new_addr_loc_descr().
|
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().
|
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, 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().
|
inlinestatic |
Add an 8-byte data attribute value to a DIE.
References add_dwarf_attr(), dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_data8, NULL, dw_val_node::v, dw_val_node::val_class, dw_val_node::dw_val_struct_union::val_data8, and dw_val_node::val_entry.
|
static |
Referenced by generate_type_signature().
|
inlinestatic |
Add a DIE reference attribute value to a DIE.
References add_dwarf_attr(), dw_val_node::dw_val_struct_union::dw_val_die_union::die, dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_die_ref, dw_val_node::dw_val_struct_union::dw_val_die_union::external, gcc_assert, gcc_checking_assert, NULL, dw_val_node::v, dw_val_node::val_class, dw_val_node::dw_val_struct_union::val_die_ref, and dw_val_node::val_entry.
Referenced by add_AT_external_die_ref(), add_AT_specification(), add_gnat_descriptive_type_attribute(), add_linkage_attr(), add_sibling_attributes(), add_src_coords_attributes(), base_type_die(), clone_as_declaration(), dwarf2_build_local_stub(), dwarf2out_decl(), gen_subprogram_die(), and modified_type_die().
|
inlinestatic |
Add an unsigned double integer attribute value to a DIE.
References add_dwarf_attr(), dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_const_double, double_int::high, double_int::low, NULL, dw_val_node::v, dw_val_node::val_class, dw_val_node::dw_val_struct_union::val_double, and dw_val_node::val_entry.
Referenced by add_const_value_attribute().
|
static |
Add a reference of kind ATTR_KIND to a DIE at SYMBOL + OFFSET to DIE.
References add_AT_die_ref(), die_struct::die_id, die_struct::die_offset, die_struct::die_symbol_or_type_node::die_symbol, die_struct::die_tag, new_die_raw(), offset, and die_struct::with_offset.
Referenced by add_pure_or_virtual_attribute(), and maybe_create_die_with_external_ref().
|
inlinestatic |
Add a file attribute value to a DIE.
References add_dwarf_attr(), dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_file, NULL, dw_val_node::v, dw_val_node::val_class, dw_val_node::val_entry, and dw_val_node::dw_val_struct_union::val_file.
Referenced by add_linkage_name().
|
inlinestatic |
Add a flag value attribute to a DIE.
References add_dwarf_attr(), dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_flag, NULL, dw_val_node::v, dw_val_node::val_class, dw_val_node::val_entry, and dw_val_node::dw_val_struct_union::val_flag.
|
static |
|
inlinestatic |
Add a signed integer attribute value to a DIE.
References add_dwarf_attr(), dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_const, NULL, dw_val_node::v, dw_val_node::val_class, dw_val_node::val_entry, and dw_val_node::dw_val_struct_union::val_int.
Referenced by add_const_value_attribute(), add_data_member_location_attribute(), base_type_die(), and tree_add_const_value_attribute().
|
inlinestatic |
Add a label identifier attribute value to a DIE.
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_lbl_id, NULL, offset, 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.
Referenced by add_high_low_attributes(), gen_subprogram_die(), and record_type_tag().
|
inlinestatic |
Add a section offset attribute value to a DIE, an offset into the debug_line section.
References add_dwarf_attr(), dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_lineptr, 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.
Referenced by add_top_level_skeleton_die_attrs().
|
inlinestatic |
Add a location description attribute value to a DIE.
References add_dwarf_attr(), dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_loc, NULL, dw_val_node::v, dw_val_node::val_class, dw_val_node::val_entry, and dw_val_node::dw_val_struct_union::val_loc.
Referenced by add_AT_location_description(), add_const_value_attribute(), add_data_member_location_attribute(), add_src_coords_attributes(), dwarf2out_set_name(), gen_const_die(), modified_type_die(), and new_dwarf_proc_die().
|
inlinestatic |
References add_dwarf_attr(), dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_loc_list, have_location_lists, HAVE_XCOFF_DWARF_EXTRAS, NULL, dw_val_node::v, dw_val_node::val_class, dw_val_node::val_entry, dw_val_node::dw_val_struct_union::val_loc_list, and XCOFF_DEBUGGING_INFO.
Referenced by add_AT_location_description().
|
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(), dw_loc_list_struct::expr, gcc_assert, get_AT(), dw_loc_list_struct::ll_symbol, single_element_loc_list_p(), and dw_loc_list_struct::vl_symbol.
Referenced by add_location_or_const_value_attribute().
|
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, 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.
|
inlinestatic |
Add a section offset attribute value to a DIE, an offset into the debug_macinfo section.
References add_dwarf_attr(), dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_macptr, 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.
|
static |
Add the DW_AT_GNU_pubnames and DW_AT_GNU_pubtypes attributes.
References add_AT_flag(), and want_pubnames().
Referenced by add_top_level_skeleton_die_attrs().
|
static |
|
static |
Referenced by add_ranges_by_labels().
|
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(), die_struct::die_definition, and gcc_assert.
Referenced by copy_declaration_context().
|
inlinestatic |
Add a string attribute value to a DIE.
References add_dwarf_attr(), dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_str, find_AT_string(), NULL, dw_val_node::v, dw_val_node::val_class, dw_val_node::val_entry, and dw_val_node::dw_val_struct_union::val_str.
Referenced by add_const_value_attribute(), add_desc_attribute(), add_filepath_AT_string(), add_name_attribute(), dwarf2out_decl(), and generic_parameter_die().
|
inlinestatic |
Add a symbolic view identifier attribute value to a DIE.
References add_dwarf_attr(), dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_symview, NULL, dw_val_node::v, dw_val_node::val_class, dw_val_node::val_entry, and dw_val_node::dw_val_struct_union::val_symbolic_view.
|
inlinestatic |
Add an unsigned integer attribute value to a DIE.
References add_dwarf_attr(), dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_unsigned_const, NULL, dw_val_node::v, dw_val_node::val_class, dw_val_node::val_entry, and dw_val_node::dw_val_struct_union::val_unsigned.
Referenced by add_abstract_origin_attribute(), add_accessibility_attribute(), add_const_value_attribute(), add_data_member_location_attribute(), add_linkage_name(), add_src_coords_attributes(), base_type_die(), break_out_comdat_types(), modified_type_die(), premark_types_used_by_global_vars_helper(), subrange_type_die(), and tree_add_const_value_attribute().
|
inlinestatic |
Add a floating point attribute value to a DIE and return it.
References add_dwarf_attr(), dw_vec_const::array, dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_vec, dw_vec_const::elt_size, dw_vec_const::length, NULL, dw_val_node::v, dw_val_node::val_class, dw_val_node::val_entry, and dw_val_node::dw_val_struct_union::val_vec.
Referenced by add_const_value_attribute(), and tree_add_const_value_attribute().
|
inlinestatic |
Add a view list attribute to DIE. It must have a DW_AT_location attribute, because the view list complements the location list.
References add_dwarf_attr(), dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_view_list, gcc_assert, gcc_checking_assert, get_AT(), have_location_lists, HAVE_XCOFF_DWARF_EXTRAS, NULL, dw_val_node::v, dw_val_node::val_class, dw_val_node::val_entry, dw_val_node::dw_val_struct_union::val_view_list, and XCOFF_DEBUGGING_INFO.
Referenced by add_AT_location_description().
|
inlinestatic |
Add an unsigned wide integer attribute value to a DIE.
References add_dwarf_attr(), alloc_dw_wide_int(), dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_wide_int, NULL, dw_val_node::v, dw_val_node::val_class, dw_val_node::val_entry, and dw_val_node::dw_val_struct_union::val_wide.
Referenced by add_const_value_attribute().
|
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, and DECL_USER_ALIGN.
|
inlinestatic |
For a FIELD_DECL node which represents a bit field, output an attribute which specifies the length in bits of the given field.
|
static |
Given a tree node describing an array bound (either lower or upper) output a representation for that bound.
References comp_unit_die(), and get_AT_unsigned().
Referenced by subrange_type_die().
|
static |
Add a DW_AT_byte_size attribute to DIE with TREE_NODE's size.
|
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.
|
static |
Given an object die, add the calling convention attribute for the function call type.
References DINFO_LEVEL_TERSE, modified_type_die(), NULL, TREE_CODE, TREE_TYPE, TYPE_NAME, and TYPE_QUALS.
|
static |
Add a CHILD_DIE as the last child of DIE.
References die_struct::die_child, die_struct::die_parent, die_struct::die_sib, and gcc_assert.
Referenced by break_out_comdat_types(), clone_tree(), clone_tree_partial(), copy_ancestor_tree(), copy_declaration_context(), copy_decls_walk(), copy_dwarf_procedure(), generate_skeleton_ancestor_tree(), generate_skeleton_bottom_up(), modified_type_die(), new_die(), remove_child_or_replace_with_skeleton(), reparent_child(), and reset_dies().
|
static |
Like add_child_die, but put CHILD_DIE after AFTER_DIE.
References die_struct::die_child, die_struct::die_parent, die_struct::die_sib, and gcc_assert.
Referenced by modified_type_die().
|
static |
|
static |
Attach a DW_AT_const_value attribute for a variable or a parameter which does not have a "location" either in memory or in a register. These things can arise in GNU C when a constant is passed as an actual parameter to an inlined function. They can also arise in C++ where declared constants do not necessarily get memory "homes".
References add_AT_double(), add_AT_int(), add_AT_loc(), add_AT_string(), add_AT_unsigned(), add_AT_vec(), add_AT_wide(), add_const_value_attribute(), add_loc_descr(), as_a(), CONST_DOUBLE_HIGH, CONST_DOUBLE_LOW, const_ok_for_output(), CONST_VECTOR_ELT, CONST_VECTOR_NUNITS, CONSTANT_P, dtprel_false, gcc_unreachable, GET_CODE, GET_MODE, GET_MODE_CLASS, GET_MODE_INNER, GET_MODE_PRECISION(), GET_MODE_SIZE(), GET_MODE_UNIT_SIZE, ggc_vec_alloc(), HOST_BITS_PER_WIDE_INT, i, insert_float(), insert_wide_int(), INTVAL, is_int_mode(), MEM_READONLY_P, new_addr_loc_descr(), new_loc_descr(), resolve_one_addr(), SCALAR_FLOAT_MODE_P, TARGET_SUPPORTS_WIDE_INT, used_rtx_array, vec_safe_push(), XEXP, and XSTR.
Referenced by add_const_value_attribute(), add_location_or_const_value_attribute(), and tree_add_const_value_attribute().
|
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(), 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.
|
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, and NULL.
|
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(), 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().
|
static |
Add DISCR_LIST as a DW_AT_discr_list to DIE.
|
static |
Add VALUE as a DW_AT_discr_value attribute to DIE.
References add_desc_attribute(), add_name_attribute(), add_src_coords_attributes(), DECL_ARTIFICIAL, DECL_NAME, dwarf2_name(), IDENTIFIER_POINTER, and NULL.
|
inlinestatic |
Add an attribute/value pair to a DIE.
References a, die_struct::die_attr, dw_attr_struct::dw_attr, FOR_EACH_VEC_SAFE_ELT, gcc_assert, NULL, vec_safe_push(), and vec_safe_reserve().
Referenced by add_AT_addr(), add_AT_data8(), add_AT_die_ref(), add_AT_double(), add_AT_file(), add_AT_flag(), add_AT_int(), add_AT_lbl_id(), add_AT_lineptr(), add_AT_loc(), add_AT_loc_list(), add_AT_low_high_pc(), add_AT_macptr(), add_AT_range_list(), add_AT_string(), add_AT_symview(), add_AT_unsigned(), add_AT_vec(), add_AT_view_list(), add_AT_wide(), add_filepath_AT_string(), add_skeleton_AT_string(), clone_as_declaration(), clone_die(), and copy_declaration_context().
|
static |
Add an enumerator to the pubnames section.
References pubname_struct::die, gcc_assert, get_AT_string(), pubname_struct::name, NULL, pubname_table, and vec_safe_push().
Referenced by add_pubtype().
|
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(), and NULL.
|
inlinestatic |
Add a string representing a file or filepath attribute value to a DIE.
References add_AT_string(), add_dwarf_attr(), asm_outputs_debug_line_str(), hash_table< Descriptor, Lazy, Allocator >::create_ggc(), debug_line_str_hash, dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_str, find_AT_string_in_table(), indirect_string_node::form, NULL, set_indirect_string(), dw_val_node::v, dw_val_node::val_class, dw_val_node::val_entry, and dw_val_node::dw_val_struct_union::val_str.
Referenced by add_filename_attribute().
|
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(), lookup_type_die(), and lang_hooks::types.
Referenced by modified_type_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(), and CODE_LABEL_NUMBER.
|
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(), and get_AT().
|
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(), LOCATION_LOCUS, lookup_filename(), and UNKNOWN_LOCATION.
|
static |
Add DW_AT_{,MIPS_}linkage_name attribute for the given decl.
|
inlinestatic |
Add a location description term to a location description expression.
References dw_loc_descr_node::dw_loc_next, and NULL.
Referenced by add_const_value_attribute(), add_data_member_location_attribute(), add_loc_descr_to_each(), address_of_int_loc_descriptor(), based_loc_descr(), bswap_loc_descriptor(), build_breg_loc(), build_cfa_aligned_loc(), build_cfa_loc(), build_span_loc(), clz_loc_descriptor(), compare_loc_descriptor(), concat_loc_descriptor(), concatn_loc_descriptor(), convert_descriptor_to_mode(), dw_loc_list_1(), function_to_dwarf_procedure(), int_loc_descriptor(), int_shift_loc_descriptor(), loc_descr_plus_const(), loc_descriptor(), loc_list_from_tree_1(), mem_loc_descriptor(), minmax_loc_descriptor(), multiple_reg_loc_descriptor(), one_reg_loc_descriptor(), popcount_loc_descriptor(), prepend_loc_descr_to_each(), reg_loc_descriptor(), rotate_loc_descriptor(), scompare_loc_descriptor_narrow(), scompare_loc_descriptor_wide(), typed_binop(), ucompare_loc_descriptor(), and uint_comparison_loc_list().
|
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, new_loc_descr(), and NULL.
Referenced by concat_loc_descriptor(), concatn_loc_descriptor(), loc_descriptor(), and multiple_reg_loc_descriptor().
|
static |
To each location in list LIST append loc descr REF.
References add_loc_descr(), copy_loc_descr(), dw_loc_list_struct::dw_loc_next, and dw_loc_list_struct::expr.
Referenced by add_loc_list(), 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().
|
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, 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().
|
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_cleared_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.
|
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().
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, and NULL.
Referenced by add_discr_value(), ctf_debug_init(), gen_block_die(), gen_type_die(), and modified_type_die().
|
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, simple_type_size_in_bits(), and tree_to_shwi().
|
static |
|
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().
|
static |
Add a new entry to .debug_pubtypes if appropriate.
References add_enumerator_pubname(), COMPLETE_TYPE_P, pubname_struct::die, die_struct::die_parent, die_struct::die_tag, lang_hooks::dwarf_name, FOR_EACH_CHILD, is_cu_die(), is_cxx(), is_namespace_die(), pubname_struct::name, NULL, pubtype_table, TREE_CODE, TREE_PUBLIC, TYPE_CONTEXT, TYPE_P, type_tag(), vec_safe_push(), and want_pubnames().
Referenced by modified_type_die().
|
inlinestatic |
We do not currently support the pure_virtual attribute.
References add_AT_external_die_ref(), sym_off_pair::off, and sym_off_pair::sym.
|
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.
|
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(), note_rnglist_head(), offset, ranges_by_label, vec_safe_length(), and vec_safe_push().
|
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().
|
static |
Referenced by base_type_die(), and subrange_type_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, and FOR_EACH_CHILD.
Referenced by add_sibling_attributes().
|
inlinestatic |
Add a string attribute value to a skeleton DIE.
References add_dwarf_attr(), hash_table< Descriptor, Lazy, Allocator >::create_ggc(), dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_str, dwarf_FORM(), find_AT_string_in_table(), find_string_form(), indirect_string_node::form, NULL, skeleton_debug_str_hash, dw_val_node::v, dw_val_node::val_class, dw_val_node::val_entry, and dw_val_node::dw_val_struct_union::val_str.
Referenced by add_top_level_skeleton_die_attrs().
|
static |
Add source coordinate attributes for the given decl.
References add_AT_die_ref(), add_AT_loc(), add_AT_unsigned(), DECL_CONTEXT, DECL_VINDEX, DINFO_LEVEL_TERSE, lookup_type_die(), new_loc_descr(), tree_fits_shwi_p(), and tree_to_shwi().
Referenced by add_discr_value(), and gen_formal_types_die().
|
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.
|
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(), and NULL.
|
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 die_struct::die_parent, and die_struct::die_tag.
Referenced by generic_parameter_die(), and record_type_tag().
|
static |
Add a variable location node to the linked list for DECL.
References adjust_piece_list(), as_a(), construct_piece_list(), DECL_DEBUG_EXPR, DECL_HAS_DEBUG_EXPR_P, var_loc_list_def::decl_id, DECL_IGNORED_P, DECL_INCOMING_RTL, decl_loc_table, DECL_P, decl_piece_bitsize(), decl_piece_varloc_ptr(), DECL_UID, var_loc_list_def::first, gcc_assert, GET_CODE, get_ref_base_and_extent_hwi(), ggc_cleared_alloc(), ggc_free(), handled_component_p(), last, var_loc_list_def::last, var_loc_node::loc, filedep::next, var_loc_node::next, NOTE_P, NOTE_VAR_LOCATION_DECL, NOTE_VAR_LOCATION_LOC, NOTE_VAR_LOCATION_STATUS, NULL, NULL_RTX, prev_real_insn(), rtx_equal_p(), TREE_CODE, TREE_OPERAND, TREE_STATIC, VAR_INIT_STATUS_UNINITIALIZED, VAR_P, and XEXP.
|
static |
Return loc description representing "address" of integer value. This can appear only as toplevel expression.
References add_loc_descr(), dw_loc_descr_node::dw_loc_oprnd2, dw_val_class_const, DWARF2_ADDR_SIZE, i, int_loc_descriptor(), new_loc_descr(), NULL, size_of_int_loc_descriptor(), dw_val_node::v, dw_val_node::val_class, and dw_val_node::dw_val_struct_union::val_int.
Referenced by loc_descriptor(), and loc_list_from_tree_1().
|
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.
|
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, NULL, NULL_RTX, and XEXP.
Referenced by add_var_loc_to_decl().
dw_wide_int * alloc_dw_wide_int | ( | const wide_int_ref & | w | ) |
References ggc_internal_alloc(), dw_wide_int::len, dw_wide_int::precision, and dw_wide_int::val.
Referenced by add_AT_wide(), loc_descriptor(), and mem_loc_descriptor().
Check that OPERAND is a reference to a field in STRUCT_TYPE. If it is, return the FIELD_DECL. Return NULL_TREE otherwise.
|
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.
|
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().
|
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, and output_asm_line_debug_info().
Referenced by add_filepath_AT_string().
|
static |
Recursively set indexes of location lists.
References a, assign_location_list_indexes(), AT_class(), AT_loc_list(), die_struct::die_attr, dw_val_class_loc_list, FOR_EACH_CHILD, FOR_EACH_VEC_SAFE_ELT, dw_loc_list_struct::hash, loc_list_idx, and dw_loc_list_struct::num_assigned.
Referenced by assign_location_list_indexes().
|
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().
enum dw_val_class AT_class | ( | dw_attr_node * | a | ) |
References a.
Referenced by assign_location_list_indexes(), AT_addr(), AT_file(), AT_flag(), AT_index(), AT_int(), AT_lbl(), AT_loc(), AT_loc_list(), AT_loc_list_ptr(), AT_ref(), AT_ref_external(), AT_string(), AT_string_form(), AT_unsigned(), AT_vms_delta1(), AT_vms_delta2(), attr_checksum(), attr_checksum_ordered(), build_abbrev_table(), copy_decls_walk(), ctf_get_AT_data_member_location(), gen_ctf_enumeration_type(), gen_ctf_sou_type(), gen_ctf_subrange_type(), optimize_abbrev_table(), optimize_external_refs_1(), optimize_implicit_const(), optimize_location_lists(), output_attr_index_or_value(), output_die(), output_die_abbrevs(), output_location_lists(), output_loclists_offsets(), prune_unused_types_prune(), remove_AT(), set_AT_ref_external(), should_move_die_to_comdat(), size_of_die(), unmark_all_dies(), value_format(), and view_list_to_loc_list_val_node().
|
inlinestatic |
Referenced by output_die(), size_of_die(), and value_format().
|
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().
|
inlinestatic |
References a, AT_class(), dw_val_class_flag, and gcc_assert.
Referenced by get_AT_flag(), and output_die().
|
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().
HOST_WIDE_INT AT_int | ( | dw_attr_node * | a | ) |
References a, AT_class(), dw_val_class_const, dw_val_class_const_implicit, and gcc_assert.
Referenced by ctf_get_AT_data_member_location(), gen_ctf_enumeration_type(), gen_ctf_sou_type(), output_die(), and size_of_die().
|
inlinestatic |
References a, AT_class(), dw_val_class_high_pc, dw_val_class_lbl_id, dw_val_class_lineptr, dw_val_class_loclistsptr, dw_val_class_macptr, and gcc_assert.
Referenced by get_AT_low_pc(), output_attr_index_or_value(), and output_die().
dw_loc_descr_ref AT_loc | ( | dw_attr_node * | a | ) |
References a, AT_class(), dw_val_class_loc, and gcc_assert.
Referenced by attr_checksum(), attr_checksum_ordered(), ctf_get_AT_data_member_location(), dwarf2out_early_finish(), output_die(), resolve_addr(), size_of_die(), and value_format().
|
inlinestatic |
|
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(), and NULL.
Referenced by AT_loc_list_ptr(), output_view_list_offset(), and resolve_addr().
|
inlinestatic |
References a, AT_class(), dw_val_class_die_ref, and gcc_assert.
Referenced by add_linkage_attr(), attr_checksum(), attr_checksum_ordered(), build_abbrev_table(), collect_skeleton_dies(), copy_decls_walk(), get_AT(), get_AT_ref(), optimize_external_refs_1(), output_die(), size_of_die(), unmark_all_dies(), and value_format().
|
inlinestatic |
References a, AT_class(), and dw_val_class_die_ref.
Referenced by output_die(), size_of_die(), and value_format().
|
inlinestatic |
References a, AT_class(), dw_val_class_str, and gcc_assert.
Referenced by attr_checksum(), attr_checksum_ordered(), die_checksum_ordered(), get_AT_string(), and output_die().
|
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().
unsigned HOST_WIDE_INT AT_unsigned | ( | dw_attr_node * | a | ) |
References a, AT_class(), dw_val_class_unsigned_const, dw_val_class_unsigned_const_implicit, and gcc_assert.
Referenced by ctf_die_bitsize(), gen_ctf_enumeration_type(), gen_ctf_sou_type(), get_AT_unsigned(), optimize_implicit_const(), output_die(), size_of_die(), and value_format().
|
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().
|
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().
|
static |
Calculate the checksum of an attribute.
References dw_vec_const::array, AT_addr(), AT_class(), AT_file(), AT_loc(), AT_ref(), AT_string(), CHECKSUM, CHECKSUM_BLOCK, CHECKSUM_STRING, die_checksum(), dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_loc_descr_node::dw_loc_next, 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_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_loclistsptr, dw_val_class_macptr, dw_val_class_offset, 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_vms_delta, dw_val_class_wide_int, dw_vec_const::elt_size, gcc_assert, GET_CODE, get_full_len(), dw_wide_int::get_val(), HOST_BITS_PER_CHAR, HOST_BITS_PER_WIDE_INT, dw_vec_const::length, loc_checksum(), r, dw_val_node::v, dw_val_node::dw_val_struct_union::val_data8, dw_val_node::dw_val_struct_union::val_double, 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_offset, dw_val_node::dw_val_struct_union::val_unsigned, dw_val_node::dw_val_struct_union::val_vec, dw_val_node::dw_val_struct_union::val_wide, and XSTR.
Referenced by die_checksum().
|
static |
Calculate the checksum of an attribute.
References dw_vec_const::array, AT_addr(), AT_class(), AT_file(), AT_loc(), AT_ref(), AT_string(), CHECKSUM, CHECKSUM_BLOCK, checksum_die_context(), CHECKSUM_SLEB128, CHECKSUM_STRING, CHECKSUM_ULEB128, die_checksum_ordered(), die_struct::die_mark, dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_loc_descr_node::dw_loc_next, 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_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_loclistsptr, dw_val_class_macptr, dw_val_class_offset, 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_wide_int, dw_vec_const::elt_size, gcc_assert, get_AT(), get_AT_ref(), GET_CODE, get_full_len(), dw_wide_int::get_val(), HOST_BITS_PER_CHAR, HOST_BITS_PER_WIDE_INT, dw_vec_const::length, loc_checksum_ordered(), NULL, r, dw_val_node::v, dw_val_node::dw_val_struct_union::val_data8, dw_val_node::dw_val_struct_union::val_double, 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_offset, dw_val_node::dw_val_struct_union::val_unsigned, dw_val_node::dw_val_struct_union::val_vec, dw_val_node::dw_val_struct_union::val_wide, and XSTR.
|
static |
Comparison function for sorting marked base types.
dw_die_ref base_type_die | ( | tree | type, |
bool | reverse ) |
Given a pointer to a tree node for some base type, return a pointer to a DIE that describes the given type. REVERSE is true if the type is to be interpreted in the reverse storage order wrt the target order. This routine must only be called for GCC type nodes that correspond to Dwarf base (fundamental) types.
References add_alignment_attribute(), add_AT_die_ref(), add_AT_int(), add_AT_unsigned(), add_scalar_info(), fixed_point_type_info::arbitrary, fixed_point_type_info::binary, comp_unit_die(), fixed_point_type_info::decimal, DECIMAL_FLOAT_MODE_P, DECL_IS_UNDECLARED_BUILTIN, DECL_NAME, fixed_point_type_info::denominator, dw_scalar_form_constant, dw_scalar_form_exprloc, dw_scalar_form_reference, fixed_point_scale_factor_arbitrary, fixed_point_scale_factor_binary, fixed_point_scale_factor_decimal, gcc_unreachable, lang_hooks_for_types::get_fixed_point_type_info, lang_hooks_for_types::get_type_bias, IDENTIFIER_POINTER, int_size_in_bytes(), is_rust(), need_endianity_attribute_p(), new_die(), new_die_raw(), NULL, NULL_TREE, fixed_point_type_info::numerator, SCALAR_FLOAT_TYPE_P, fixed_point_type_info::scale_factor, fixed_point_type_info::scale_factor_kind, TREE_CODE, TREE_TYPE, TYPE_MODE, TYPE_NAME, TYPE_PRECISION, TYPE_STRING_FLAG, TYPE_UNSIGNED, and lang_hooks::types.
Referenced by ctf_debug_init(), and modified_type_die().
|
static |
Return a reference to DW_TAG_base_type corresponding to MODE and UNSIGNEDP if possible, NULL otherwise.
References comp_unit_die(), die_struct::die_tag, lookup_type_die(), modified_type_die(), NULL, TREE_CODE, lang_hooks_for_types::type_for_mode, TYPE_UNQUALIFIED, and lang_hooks::types.
Referenced by convert_descriptor_to_mode(), loc_list_from_tree_1(), mem_loc_descriptor(), minmax_loc_descriptor(), and scompare_loc_descriptor_wide().
|
static |
Return a location descriptor that designates a base+offset location.
References add_loc_descr(), arg_pointer_rtx, cfun, crtl, dw_fde_node::drap_reg, DWARF_FRAME_REGNUM, eliminate_regs(), frame_pointer_fb_offset, frame_pointer_fb_offset_valid, frame_pointer_rtx, gcc_assert, HARD_FRAME_POINTER_REGNUM, hard_frame_pointer_rtx, initialized, INVALID_REGNUM, ira_use_lra_p, loc_descr_plus_const(), lra_eliminate_regs(), new_loc_descr(), new_reg_loc_descr(), NULL_RTX, offset, REGNO, stack_pointer_rtx, strip_offset_and_add(), VAR_INIT_STATUS_UNINITIALIZED, and dw_fde_node::vdrap_reg.
Referenced by mem_loc_descriptor().
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.
|
static |
Traverse the DIE and set up additional .debug_types or .debug_info DW_UT_*type sections for each type worthy of being placed in a COMDAT section.
References add_AT_unsigned(), add_child_die(), break_out_comdat_types(), comdat_type_list, comp_unit_die(), copy_dwarf_procs_ref_in_dies(), die_struct::die_child, die_struct::die_sib, die_struct::die_tag, generate_type_signature(), get_AT_unsigned(), ggc_cleared_alloc(), new_die(), comdat_type_node::next, NULL, remove_child_or_replace_with_skeleton(), comdat_type_node::root_die, should_move_die_to_comdat(), and comdat_type_node::skeleton_die.
Referenced by break_out_comdat_types().
|
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_loc_descr_node::dw_loc_oprnd1, dw_val_class_loc, GEN_INT, GET_MODE_BITSIZE(), mem_loc_descriptor(), new_loc_descr(), NULL, dw_val_node::v, dw_val_node::val_class, dw_val_node::dw_val_struct_union::val_loc, VAR_INIT_STATUS_INITIALIZED, and XEXP.
Referenced by mem_loc_descriptor().
|
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_attr_struct::dw_attr, dw_val_class_die_ref, FOR_EACH_CHILD, FOR_EACH_VEC_SAFE_ELT, gcc_assert, 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().
|
static |
References add_loc_descr(), and new_loc_descr().
Referenced by build_span_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, 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().
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, 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().
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, 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().
|
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_abbrev, die_struct::die_child, die_struct::die_offset, die_struct::die_sib, DWARF_COMPILE_UNIT_HEADER_SIZE, DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE, gcc_assert, i, NULL, and size_of_die().
Referenced by get_base_type_offset().
|
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().
|
inlinestatic |
Change DIE reference REF to point to NEW_DIE instead.
References dw_val_node::dw_val_struct_union::dw_val_die_union::die, dw_attr_struct::dw_attr_val, dw_val_class_die_ref, dw_val_node::dw_val_struct_union::dw_val_die_union::external, gcc_assert, new_die(), dw_val_node::v, dw_val_node::val_class, and dw_val_node::dw_val_struct_union::val_die_ref.
Referenced by build_abbrev_table().
|
static |
Sanity checks on DIEs.
References a, debug_dwarf_die(), die_struct::die_attr, FOR_EACH_VEC_SAFE_ELT, gcc_assert, and gcc_unreachable.
|
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(), and NULL.
Referenced by attr_checksum_ordered(), checksum_die_context(), and generate_type_signature().
|
static |
Calculate the checksum of a number in signed LEB128 format.
References CHECKSUM.
|
static |
Calculate the checksum of a number in unsigned LEB128 format.
References CHECKSUM.
|
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.
|
inlinestatic |
Returns true if CONTEXT_DIE is a class.
Referenced by add_pubname().
|
static |
Make a clone of DIE as a declaration.
References a, add_AT_die_ref(), add_AT_flag(), add_dwarf_attr(), clone_die(), die_struct::comdat_type_p, die_struct::die_attr, die_struct::die_tag, FOR_EACH_VEC_SAFE_ELT, get_AT_ref(), is_declaration_die(), new_die_raw(), and NULL.
Referenced by clone_tree_partial(), copy_ancestor_tree(), generate_skeleton(), and generate_skeleton_ancestor_tree().
|
static |
Make a clone of DIE.
References a, add_dwarf_attr(), die_struct::die_attr, die_struct::die_tag, FOR_EACH_VEC_SAFE_ELT, and new_die_raw().
Referenced by clone_as_declaration(), clone_tree(), clone_tree_partial(), copy_decls_walk(), copy_dwarf_procedure(), and generate_skeleton_bottom_up().
|
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().
|
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, and decl_table_entry::orig.
Referenced by clone_tree_partial(), and copy_decls_walk().
|
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_loc_descr_node::dw_loc_oprnd1, dw_val_class_loc, GEN_INT, GET_CODE, GET_MODE, GET_MODE_BITSIZE(), GET_MODE_PRECISION(), 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(), dw_val_node::v, dw_val_node::val_class, dw_val_node::dw_val_struct_union::val_loc, VAR_INIT_STATUS_INITIALIZED, and XEXP.
Referenced by mem_loc_descriptor().
|
static |
Collect the attributes that we will want to use for the checksum.
References a, die_struct::die_attr, and FOR_EACH_VEC_SAFE_ELT.
Referenced by die_checksum_ordered().
|
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(), die_struct::comdat_type_p, decl_table_entry::copy, decl_table, die_struct::die_mark, FOR_EACH_CHILD, gcc_assert, get_AT(), and decl_table_entry::orig.
Referenced by collect_skeleton_dies(), and copy_decls_for_unworthy_types().
|
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(), NULL, and remap_debug_filename().
Referenced by add_top_level_skeleton_die_attrs(), and output_file_names().
|
static |
Return the root of the DIE's built for the current compilation unit.
References gen_compile_unit_die(), NULL, and single_comp_unit_die.
Referenced by add_bound_info(), base_type_die(), base_type_for_mode(), break_out_comdat_types(), calc_base_type_die_sizes(), debug_dwarf(), force_decl_die(), gen_block_die(), gen_type_die(), get_base_type_offset(), is_ada(), is_c(), is_cxx(), is_dlang(), is_fortran(), is_rust(), maybe_create_die_with_external_ref(), modified_type_die(), output_comp_unit(), output_file_names(), output_index_string_offset(), output_pubnames(), reset_dies(), scope_die_for(), and subrange_type_die().
|
static |
Return location descriptor for comparison OP with operands OP0 and OP1.
References add_loc_descr(), int_loc_descriptor(), new_loc_descr(), and STORE_FLAG_VALUE.
Referenced by scompare_loc_descriptor(), scompare_loc_descriptor_narrow(), scompare_loc_descriptor_wide(), and ucompare_loc_descriptor().
|
inlinestatic |
Return true if X and Y opcodes have the same operands.
|
inlinestatic |
Return true if DWARF location expressions X and Y are the same.
|
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(), die_struct::die_id, die_struct::die_symbol_or_type_node::die_symbol, get_AT_string(), i, and unmark_all_dies().
|
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, hard_frame_pointer_rtx, ira_use_lra_p, lra_eliminate_regs(), NULL_RTX, offset, stack_pointer_rtx, and strip_offset_and_add().
|
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(), initialized, loc_descriptor(), new_loc_descr(), NULL, VAR_INIT_STATUS_INITIALIZED, and VAR_INIT_STATUS_UNINITIALIZED.
Referenced by loc_descriptor().
|
static |
Return a descriptor that describes the concatenation of N locations.
References add_loc_descr(), add_loc_descr_op_piece(), GET_MODE, GET_MODE_SIZE(), i, initialized, loc_descriptor(), new_loc_descr(), NULL, VAR_INIT_STATUS_INITIALIZED, VAR_INIT_STATUS_UNINITIALIZED, XVECEXP, and XVECLEN.
Referenced by loc_descriptor().
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 ALL, const_ok_for_output_1(), FOR_EACH_SUBRTX_VAR, GET_CODE, and XEXP.
Referenced by add_const_value_attribute(), loc_descriptor(), loc_list_from_tree_1(), and mem_loc_descriptor().
Helper function for const_ok_for_output.
References ALL, CONST_POLY_INT_P, CONSTANT_POOL_ADDRESS_P, current_function_decl, DECL_SOURCE_LOCATION, expansion_failed(), FOR_EACH_SUBRTX_VAR, GET_CODE, get_pool_constant_mark(), inform(), LABEL_P, marked, NULL, NULL_TREE, SYMBOL_REF_DECL, SYMBOL_REF_EXTERNAL_P, SYMBOL_REF_P, SYMBOL_REF_TLS_MODEL, targetm, TLS_MODEL_NONE, UNKNOWN_LOCATION, XEXP, XINT, XVECEXP, and XVECLEN.
Referenced by const_ok_for_output(), and mem_loc_descriptor().
|
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().
|
static |
Return rtx that should be stored into loc field for LOC_NOTE and BITPOS/BITSIZE.
References decl_piece_node(), and NULL_RTX.
Referenced by add_var_loc_to_decl().
|
static |
Return true if this DIE contains a defining declaration of a subprogram.
References contains_subprogram_definition(), die_struct::die_tag, FOR_EACH_CHILD, and is_declaration_die().
Referenced by contains_subprogram_definition(), and should_move_die_to_comdat().
|
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, codeview_debuginfo_p(), current_function_decl, DEBUGGER_REGNO, dw_cfi_oprnd::dw_cfi_addr, dw_cfi_node::dw_cfi_opc, dw_cfi_node::dw_cfi_oprnd1, 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, dw_loc_list_struct::dw_loc_next, FOR_EACH_VEC_ELT, FOR_EACH_VEC_SAFE_ELT, gcc_assert, gcc_unreachable, INVALID_REGNUM, lookup_cfa_1(), maybe_gen_llsym(), new_loc_list(), NULL, dw_cfa_location::offset, offset, dw_cfa_location::reg, secname_for_decl(), and cfa_reg::set_by_dwreg().
|
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_node::dw_val_struct_union::dw_val_die_union::die, dw_loc_descr_node::dw_loc_oprnd1, dw_val_class_die_ref, DWARF2_ADDR_SIZE, dwarf_OP(), dw_val_node::dw_val_struct_union::dw_val_die_union::external, GET_MODE_SIZE(), new_loc_descr(), NULL, dw_val_node::v, dw_val_node::val_class, and dw_val_node::dw_val_struct_union::val_die_ref.
Referenced by mem_loc_descriptor(), minmax_loc_descriptor(), typed_binop(), and typed_binop_from_tree().
|
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(), is_unit_die(), NULL, and decl_table_entry::orig.
Referenced by copy_ancestor_tree(), copy_declaration_context(), and copy_decls_walk().
|
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(), is_unit_die(), NULL, and remove_AT().
Referenced by remove_child_or_replace_with_skeleton().
|
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().
|
static |
Walk the DIE and its children, looking for references to incomplete or trivial types that are unmarked (i.e., that are not in the current type_unit).
References a, add_child_die(), AT_class(), AT_ref(), clone_die(), clone_tree_partial(), die_struct::comdat_type_p, decl_table_entry::copy, copy_ancestor_tree(), copy_decls_walk(), decl_table, die_struct::die_attr, die_struct::die_mark, die_struct::die_parent, dw_val_class_die_ref, FOR_EACH_CHILD, FOR_EACH_VEC_SAFE_ELT, is_declaration_die(), is_unit_die(), mark_dies(), NULL, and decl_table_entry::orig.
Referenced by copy_decls_for_unworthy_types(), and copy_decls_walk().
|
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, and NULL.
Referenced by resolve_addr().
|
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, hash_map< KeyId, Value, Traits >::get_or_insert(), NULL, comdat_type_node::root_die, and vec_safe_length().
Referenced by copy_dwarf_procs_ref_in_attrs().
|
static |
Helper for copy_dwarf_procs_ref_in_dies. Look for references to DWARF procedures in DIE's attributes.
References a, copy_dwarf_procedure(), dw_val_node::dw_val_struct_union::dw_val_die_union::die, die_struct::die_attr, dw_loc_descr_node::dw_loc_next, dw_loc_descr_node::dw_loc_opc, dw_loc_descr_node::dw_loc_oprnd1, dw_val_class_die_ref, dw_val_class_loc, FOR_EACH_VEC_SAFE_ELT, gcc_assert, i, NULL, dw_val_node::v, dw_val_node::val_class, and dw_val_node::dw_val_struct_union::val_die_ref.
Referenced by copy_dwarf_procedure(), and copy_dwarf_procs_ref_in_dies().
|
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(), and FOR_EACH_CHILD.
Referenced by break_out_comdat_types(), and copy_dwarf_procs_ref_in_dies().
|
inlinestatic |
Duplicate a single element of location list.
References ggc_alloc().
Referenced by add_loc_descr_to_each(), and prepend_loc_descr_to_each().