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 | 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 dwarf2out_ignore_block(), index_rnglists(), output_ranges(), and output_rnglists().
#define BLOCK_END_LABEL "LBE" |
Referenced by dwarf_file_hasher::hash(), index_rnglists(), output_ranges(), and output_rnglists().
#define BLOCK_INLINE_ENTRY_LABEL "LBI" |
Referenced by var_location_switch_text_section().
#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" |
Referenced by init_sections_and_labels().
#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_addr_table_entry(), 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 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_register_main_translation_unit(), 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(), and uses_local_type().
#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 dwarf2out_set_ignored_loc(), and 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.
Referenced by lookup_filename().
#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(), dwarf2out_size_function(), 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.
References field_type().
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(), 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, 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, DECL_P, 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.
References bit_position(), DECL_SIZE, tree_fits_shwi_p(), and tree_fits_uhwi_p().
|
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.
References as_a(), CODE_LABEL_NUMBER, DECL_ABSTRACT_P, early_dwarf, LABEL_P, NOTE_KIND, and NOTE_P.
|
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, 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(), CODE_LABEL_NUMBER, and NOTE_KIND.
|
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 gen_formal_types_die(), 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(), external_die_map, 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(), 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().
|
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.
References contains_placeholder_p(), dw_scalar_form_constant, dw_scalar_form_exprloc, dw_scalar_form_reference, DWARF_GNAT_ENCODINGS_ALL, is_ada(), lower_bound_default(), tree_fits_shwi_p(), and tree_to_shwi().
|
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, 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.
References comp_unit_die(), DECL_CONTEXT, DECL_P, and TYPE_P.
|
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 wi::storage_ref::get_len(), wi::storage_ref::get_precision(), wi::storage_ref::get_val(), 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.
References NULL.
|
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.
References tree_fits_shwi_p(), tree_fits_uhwi_p(), and TREE_TYPE.
|
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(), dwarf2out_early_finish(), 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 |
References DECL_RTL, used_rtx_array, and XEXP.
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(), note_variable_value_in_expr(), output_die(), prune_unused_types_mark_generic_parms_dies(), resolve_addr(), size_of_die(), and value_format().
|
inlinestatic |
References a, AT_class(), dw_val_class_loc_list, and gcc_assert.
Referenced by assign_location_list_indexes(), dwarf2out_early_finish(), optimize_location_lists(), output_loc_list_offset(), output_location_lists(), output_loclists_offsets(), prune_unused_types_mark_generic_parms_dies(), resolve_addr(), size_of_die(), and value_format().
|
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(), prune_unused_types_mark(), 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.
Referenced by resolve_one_addr().
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, poly_int< N, C >::is_constant(), loc_descr_plus_const(), lra_eliminate_regs(), new_loc_descr(), new_reg_loc_descr(), NULL_RTX, 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(), 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, 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.
References NULL.
|
inlinestatic |
Returns true if CONTEXT_DIE is a class.
References current_function_decl, and uses_local_type().
Referenced by add_pubname(), and prune_unused_types_walk_local_classes().
|
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(), adjust_name_comp_dir(), base_type_die(), base_type_for_mode(), break_out_comdat_types(), calc_base_type_die_sizes(), debug_dwarf(), dwarf2out_assembly_start(), comdat_type_hasher::equal(), force_decl_die(), gen_block_die(), gen_enumeration_type_die(), gen_type_die(), get_base_type_offset(), index_string(), is_ada(), is_c(), is_cxx(), is_dlang(), is_fortran(), is_rust(), maybe_create_die_with_external_ref(), modified_type_die(), move_linkage_attr(), optimize_one_addr_into_implicit_ptr(), output_comp_unit(), output_file_names(), output_index_string_offset(), output_pubnames(), reset_dies(), scope_die_for(), subrange_type_die(), and uses_local_type().
|
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.
References NULL.
|
inlinestatic |
Return true if DWARF location expressions X and Y are the same.
References dw_val_class_const_double, and dw_val_class_wide_int.
|
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, 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, 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().
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, addr_table_entry::index, NO_INDEX_ASSIGNED, NOT_INDEXED, and addr_table_entry::refcount.
Referenced by prune_unmark_dies().
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, indirect_string_node::index, NO_INDEX_ASSIGNED, NOT_INDEXED, indirect_string_node::refcount, and indirect_string_node::str.
Referenced by output_addr_table_entry().
|
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, 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().
|
static |
Process DWARF dies for CTF generation.
DEBUG_FUNCTION void debug | ( | die_struct & | ref | ) |
References DEBUG_FUNCTION, and print_die().
DEBUG_FUNCTION void debug | ( | die_struct * | ptr | ) |
References debug, and DEBUG_FUNCTION.
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(), DEBUG_FUNCTION, print_die(), and print_indent.
DEBUG_FUNCTION void debug_dwarf_die | ( | dw_die_ref | die | ) |
Print the information collected for a given DIE.
References DEBUG_FUNCTION, and print_die().
Referenced by check_die().
DEBUG_FUNCTION void debug_dwarf_loc_descr | ( | dw_loc_descr_ref | loc | ) |
Print the list of operations in the LOC location description.
References DEBUG_FUNCTION, and print_loc_descr().
|
static |
Return the debugger register number described by a given RTL node.
References crtl, DEBUGGER_REGNO, gcc_assert, INVALID_REGNUM, and REGNO.
Referenced by mem_loc_descriptor(), multiple_reg_loc_descriptor(), and reg_loc_descriptor().
Return true when DECL_BY_REFERENCE is defined and set for DECL.
References DECL_BY_REFERENCE, TREE_CODE, and VAR_P.
Referenced by add_location_or_const_value_attribute().
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, NULL_TREE, TREE_CODE, TREE_TYPE, TREE_VALUE, TYPE_ARG_TYPES, TYPE_MAIN_VARIANT, and TYPE_P.
|
static |
Return how many bits covers PIECE EXPR_LIST.
References CONST_INT_P, gcc_assert, GET_CODE, GET_MODE, INTVAL, and XEXP.
Referenced by add_var_loc_to_decl(), adjust_piece_list(), and dw_sra_loc_expr().
|
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(), and GEN_INT.
Referenced by adjust_piece_list(), and construct_piece_list().
Return pointer to the location of location note in PIECE EXPR_LIST.
References GET_MODE, and XEXP.
Referenced by add_var_loc_to_decl(), adjust_piece_list(), and dw_sra_loc_expr().
|
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 TREE_CODE, TREE_READONLY, TREE_THIS_VOLATILE, TREE_TYPE, TYPE_QUAL_CONST, TYPE_QUAL_VOLATILE, and TYPE_UNQUALIFIED.
Referenced by gen_formal_parameter_pack_die().
|
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, NULL_TREE, and TREE_CODE.
Referenced by modified_type_die(), and record_type_tag().
|
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.
|
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(), lookup_type_die(), modified_type_die(), TYPE_CONTEXT, and TYPE_QUALS_NO_ADDR_SPACE.
|
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.
|
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, die_struct::die_abbrev, and gcc_checking_assert.
Referenced by optimize_abbrev_table().
|
static |
Calculate the checksum of a DIE.
References a, attr_checksum(), CHECKSUM, die_struct::die_attr, die_checksum(), die_struct::die_mark, die_struct::die_tag, FOR_EACH_CHILD, and FOR_EACH_VEC_SAFE_ELT.
Referenced by attr_checksum(), compute_comp_unit_symbol(), and die_checksum().
|
static |
Calculate the checksum of a DIE, using an ordered subset of attributes.
References AT_string(), CHECKSUM_ATTR, CHECKSUM_STRING, CHECKSUM_ULEB128, collect_checksum_attributes(), die_checksum_ordered(), die_struct::die_child, die_struct::die_mark, die_struct::die_sib, die_struct::die_tag, get_AT(), get_AT_ref(), is_template_instantiation(), is_type_die(), and NULL.
Referenced by attr_checksum_ordered(), die_checksum_ordered(), and generate_type_signature().
|
static |
Add a type name and tag to a hash.
References CHECKSUM_STRING, and CHECKSUM_ULEB128.
Referenced by generate_type_signature().
|
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, and dwarf_OP().
Referenced by new_addr_loc_descr().
enum dw_cfi_oprnd_type dw_cfi_oprnd1_desc | ( | 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 targetm.
Referenced by cfi_equal_p().
enum dw_cfi_oprnd_type dw_cfi_oprnd2_desc | ( | 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, and dw_cfi_oprnd_unused.
Referenced by cfi_equal_p().
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_die_ref dw_get_die_parent | ( | dw_die_ref | die | ) |
Returns the parent of the declaration of DIE.
References die_struct::die_parent, get_AT_ref(), and NULL.
Referenced by generate_type_signature().
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().
enum dwarf_tag dw_get_die_tag | ( | dw_die_ref | die | ) |
Return the tag of a given DIE.
References die_struct::die_tag.
Referenced by ctf_do_die(), gen_ctf_function_type(), gen_ctf_modifier_type(), gen_ctf_subrange_type(), and gen_ctf_type().
|
static |
Return the dwarf representation of the location list LOC_LIST of DECL. WANT_ADDRESS has the same meaning as in loc_list_from_tree function.
References cfun, crtl, current_function_decl, current_function_funcdef_no, dw_loc_list_1(), dw_loc_list_struct::dw_loc_next, dw_sra_loc_expr(), var_loc_list_def::first, first_function_block_is_cold, FUNC_END_LABEL, gcc_assert, gen_llsym(), GET_CODE, ggc_strdup, in_cold_section_p, initialized, var_loc_node::label, var_loc_list_def::last_before_switch, var_loc_node::loc, MAX_ARTIFICIAL_LABEL_BYTES, maybe_gen_llsym(), new_loc_list(), var_loc_node::next, NOTE_P, NOTE_VAR_LOCATION, NOTE_VAR_LOCATION_LOC, NOTE_VAR_LOCATION_STATUS, NULL, NULL_RTX, secname_for_decl(), text_end_label, TREE_CODE, var_loc_node::view, and ZERO_VIEW_P.
Referenced by loc_list_from_tree_1().
|
static |
Helper function for dw_loc_list. Compute proper Dwarf location descriptor for VARLOC.
References add_loc_descr(), avoid_constant_pool_reference(), DECL_MODE, DWARF2_ADDR_SIZE, expansion_failed(), gcc_assert, get_address_mode(), GET_CODE, GET_MODE, initialized, int_size_in_bytes(), loc_descriptor(), mem_loc_descriptor(), MEM_P, new_loc_descr(), NULL_RTX, PAT_VAR_LOCATION_DECL, PAT_VAR_LOCATION_LOC, TREE_TYPE, and XEXP.
Referenced by dw_loc_list(), and dw_sra_loc_expr().
|
static |
Helper function for dw_loc_list. Compute proper Dwarf location descriptor for VAR_LOC_NOTE for variable DECL that has been optimized by SRA.
References BITS_PER_WORD, decl_piece_bitsize(), decl_piece_varloc_ptr(), DECL_SIZE, dw_loc_list_1(), dw_loc_descr_node::dw_loc_next, GET_CODE, initialized, last, MEM_P, MEM_SIZE, new_loc_descr_op_bit_piece(), NOTE_VAR_LOCATION, NOTE_VAR_LOCATION_LOC, NOTE_VAR_LOCATION_STATUS, NULL, NULL_RTX, PAT_VAR_LOCATION_LOC, remove_loc_list_addr_table_entries(), SUBREG_REG, tree_fits_uhwi_p(), tree_to_uhwi(), and XEXP.
Referenced by dw_loc_list().
|
static |
Compare two location operands for exact equality.
References a, b, 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_decl_ref, 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_none, 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, gcc_unreachable, and rtx_equal_p().
Referenced by loc_descr_equal_p_1(), and optimize_abbrev_table().
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, external_ref::n_refs, new_die(), NULL, NULL_TREE, external_ref::stub, and external_ref::type.
Referenced by optimize_external_refs().
|
static |
Return the DWARF2/3 pubname associated with a decl.
References DECL_NAMELESS, lang_hooks::dwarf_name, and NULL.
Referenced by add_desc_attribute(), add_discr_value(), add_pubname(), dwarf2out_next_real_insn(), and generic_parameter_die().
|
static |
Mark the early DIE for DECL as the abstract instance.
References NULL_TREE, and set_block_origin_self().
dw_fde_ref dwarf2out_alloc_current_fde | ( | void | ) |
Allocate CURRENT_FDE. Immediately initialize all we can, noting that this allocation may be done before pass_final.
References dw_fde_node::all_throwers_are_sibcalls, cfun, crtl, current_function_decl, current_function_funcdef_no, dw_fde_node::decl, dw_fde_node::drap_reg, dw_fde_node::fde_index, fde_vec, dw_fde_node::funcdef_number, ggc_cleared_alloc(), INVALID_REGNUM, dw_fde_node::nothrow, dw_fde_node::uses_eh_lsda, dw_fde_node::vdrap_reg, vec_safe_length(), and vec_safe_push().
Referenced by dwarf2out_begin_prologue(), and execute_dwarf2_frame().
|
static |
Called before compile () starts outputtting functions, variables and toplevel asms into assembly.
References abbrev_die_table, cached_dw_loc_list_table, comp_unit_die(), decl_die_table, decl_loc_table, DINFO_LEVEL_VERBOSE, dwarf_proc_stack_usage_map, incomplete_types, macinfo_table, main_translation_unit, NULL, NULL_TREE, pubname_table, pubtype_table, and used_rtx_array.
|
static |
Output a marker (i.e. a label) for the beginning of the generated code for a lexical block.
References decl_function_context(), and NULL.
|
static |
|
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.
void dwarf2out_begin_prologue | ( | unsigned int | line, |
unsigned int | column, | ||
const char * | file ) |
Output a marker (i.e. a label) for the beginning of a function, before the prologue.
References asm_out_file, ASM_OUTPUT_DEBUG_LABEL, cfun, cold_text_section, current_function_decl, current_function_func_begin_label, current_function_funcdef_no, current_unit_personality, DECL_IGNORED_P, do_eh_frame, dw_fde_node::dw_fde_begin, dw_fde_node::dw_fde_current_label, dwarf2out_alloc_current_fde(), dwarf2out_do_cfi_asm(), dwarf2out_do_cfi_startproc(), dwarf2out_do_eh_frame(), dwarf2out_do_frame(), dwarf2out_source_line(), FUNC_BEGIN_LABEL, function_section(), get_personality_function(), global_options, dw_fde_node::ignored_debug, dw_fde_node::in_std_section, in_text_section_p, MAX_ARTIFICIAL_LABEL_BYTES, NULL, sorry(), switch_to_section(), text_section, and UI_SJLJ.
Referenced by final_start_function_1().
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.
References asm_out_file, debug_line_section_label, debug_macinfo_section, macinfo_section_label, and macinfo_table.
Referenced by toplev::finalize().
|
static |
Write the debugging output for DECL and return the DIE.
References add_AT_die_ref(), add_AT_flag(), add_AT_string(), CONSTRUCTOR_ELTS, DINFO_LEVEL_TERSE, FOR_EACH_CONSTRUCTOR_VALUE, force_decl_die(), gcc_assert, i, IDENTIFIER_POINTER, lookup_decl_die(), new_die(), NULL, and NULL_TREE.
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().
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().
|
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_strdup, macinfo_struct::info, macinfo_struct::lineno, macinfo_table, and vec_safe_push().
|
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, lookup_block_die(), lookup_decl_die(), NULL, sym_off_pair::off, sym_off_pair::sym, and TREE_CODE.
|
static |
Emit .cfi_startproc and .cfi_personality/.cfi_lsda if needed.
References asm_out_file, ASM_PREFERRED_EH_DATA_FORMAT, crtl, current_function_decl, current_function_funcdef_no, dw2_force_const_mem(), fputc(), get_personality_function(), global_options, MAX_ARTIFICIAL_LABEL_BYTES, NULL, output_addr_const(), SYMBOL_FLAG_LOCAL, SYMBOL_REF_FLAGS, targetm, and UI_DWARF2.
Referenced by dwarf2out_begin_prologue(), and dwarf2out_switch_text_section().
|
static |
Perform any cleanups needed after the early debug generation pass has run.
References a, AT_class(), AT_loc(), AT_loc_list(), dw_loc_list_struct::dw_loc_next, dw_val_class_loc, dw_val_class_loc_list, dw_loc_list_struct::expr, gcc_assert, note_variable_value_in_expr(), and dw_loc_list_struct::noted_variable_value.
|
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).
References TREE_TYPE.
|
static |
Output a marker (i.e. a label) for the end of the generated code for a lexical block.
|
static |
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, last_var_location_insn, mark_ignored_debug_section(), MAX_ARTIFICIAL_LABEL_BYTES, and NULL.
Referenced by final_end_function().
|
static |
Hook called after emitting a function into assembly. This does something only for the very first function emitted.
|
static |
Record the end of a source file.
References table.
|
static |
|
static |
Output stuff that dwarf requires at the end of every file, and generate the DWARF-2 debugging info.
References reset_dies().
void dwarf2out_frame_finish | ( | void | ) |
References do_eh_frame, output_call_frame_info(), targetm, and UI_DWARF2.
Referenced by compile_file().
|
static |
Write the debugging output for DECL.
References DECL_IS_UNDECLARED_BUILTIN, DINFO_LEVEL_TERSE, and TYPE_DECL_SUPPRESS_DEBUG.
|
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 asm_out_file, ASM_OUTPUT_DEBUG_LABEL, BLOCK_BEGIN_LABEL, codeview_begin_block(), codeview_debuginfo_p(), current_function_section(), and switch_to_section().
|
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.
References DECL_CONTEXT, DECL_NAME, get_context_die(), and NULL_TREE.
|
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.
References DECL_HAS_VALUE_EXPR_P, DECL_VALUE_EXPR, and is_trivial_indirect_ref().
|
static |
And now, the support for symbolic debugging information.
.debug_str support.
Set up for Dwarf output at the start of compilation.
References NULL, and SECTION_DEBUG.
|
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, and TREE_CODE.
|
static |
Output debug information for global decl DECL. Called from toplev.cc after compilation proper has finished.
|
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.
Referenced by add_AT_location_description(), gen_llsym(), and output_loc_list().
|
inlinestatic |
Return TRUE iff we're to output location view lists as part of the location lists, as proposed for standardization after DWARF 5.
Referenced by dwarf2out_maybe_output_loclist_view_pair().
|
static |
Output a view pair loclist entry for CURR, if it requires one.
References dw2_asm_output_data(), dw2_asm_output_data_uleb128(), dw2_asm_output_symname_uleb128(), dwarf2out_locviews_in_loclist(), MAX_ARTIFICIAL_LABEL_BYTES, dw_loc_list_struct::vbegin, dw_loc_list_struct::vend, and ZERO_VIEW_P.
Referenced by output_loc_list().
Look ahead for a real insn.
References dwarf2_name(), get_AT(), and TYPE_SYMTAB_DIE.
|
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(), and IDENTIFIER_POINTER.
|
static |
Hook called by front-ends after they built their main translation unit. Associate comp_unit_die to UNIT.
References first_loclabel_num_not_at_text_label, have_multiple_function_sections, i, and MAX_ARTIFICIAL_LABEL_BYTES.
void dwarf2out_set_demangle_name_func | ( | const char *(* | func )(const char *) | ) |
References demangle_name_func.
|
static |
Record a source file location for a DECL_IGNORED_P function.
References ASM_COMMENT_START, asm_out_file, label_num, LI_adv_address, LI_set_address, RESETTING_VIEW_P, and table.
|
static |
Replace DW_AT_name for the decl with name.
References add_AT_loc(), die_arg_entry_struct::arg, die_arg_entry_struct::die, early_dwarf, loc_descriptor_from_tree(), NULL, and tmpl_value_parm_die_table.
|
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.
References BLOCK_FRAGMENT_CHAIN, BLOCK_FRAGMENT_ORIGIN, cur_line_info_table, and ZERO_VIEW_P.
|
static |
Output Dwarf2 format symbol table information from GCC. Copyright (C) 1992-2025 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().
|
static |
Record the beginning of a new source file.
References table.
|
static |
void dwarf2out_switch_text_section | ( | void | ) |
References asm_out_file, cfun, codeview_debuginfo_p(), codeview_switch_text_section(), cold_text_section, crtl, current_function_funcdef_no, current_function_section(), dw_fde_node::dw_fde_end, dw_fde_node::dw_fde_second_begin, dw_fde_node::dw_fde_second_end, dwarf2out_do_cfi_asm(), dwarf2out_do_cfi_startproc(), FUNC_SECOND_SECT_LABEL, gcc_assert, ggc_strdup, have_multiple_function_sections, in_cold_section_p, in_text_section_p, mark_ignored_debug_section(), MAX_ARTIFICIAL_LABEL_BYTES, NULL, dw_fde_node::second_in_std_section, set_cur_line_info_table(), switch_to_section(), text_section, and var_location_switch_text_section().
Referenced by final_scan_insn_1().
|
static |
Output debug information for type decl DECL. Called from toplev.cc and from language front ends (to record built-in types).
References local_function_static(), lookup_decl_die(), and VAR_P.
|
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.
References macinfo_table, and NULL.
|
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.
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, and MAX_ARTIFICIAL_LABEL_BYTES.
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, MAX_ARTIFICIAL_LABEL_BYTES, and PROLOGUE_END_LABEL.
|
inlinestatic |
Similarly for attributes.
Referenced by add_top_level_skeleton_die_attrs(), gen_subprogram_die(), and block_die_hasher::hash().
|
static |
Convert a DWARF attribute code into its string name.
References NULL.
|
static |
|
inlinestatic |
And similarly for forms.
Referenced by add_skeleton_AT_string(), count_index_strings(), output_die(), output_index_string(), reset_indirect_string(), set_indirect_string(), size_of_die(), and value_format().
|
static |
Convert a DWARF value form code into its string name.
References NULL.
|
static |
Referenced by output_value_format().
|
inlinestatic |
Utility inline function for construction of ops that were GNU extension before DWARF 5.
Referenced by convert_descriptor_to_mode(), dw_addr_op(), implicit_ptr_descriptor(), loc_list_from_tree_1(), mem_loc_descriptor(), minmax_loc_descriptor(), scompare_loc_descriptor_wide(), typed_binop(), and typed_binop_from_tree().
|
static |
Convert a DWARF stack opcode into its string name.
References dwarf_stack_op_name(), and NULL.
Referenced by dwarf_stack_op_name(), output_loc_sequence(), and print_loc_descr().
|
inlinestatic |
And similarly for tags.
Referenced by gen_subprogram_die().
|
static |
Convert a DIE tag into its string name.
References NULL.
|
static |
Referenced by output_die(), output_die_abbrevs(), and print_die().
|
inlinestatic |
|
static |
Equate a DIE to a particular declaration.
References decl_die_table, die_struct::decl_id, and DECL_UID.
Referenced by decls_for_scope(), maybe_create_die_with_external_ref(), new_dwarf_proc_die(), and record_type_tag().
|
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().
Output debug info about reason why we failed to expand expression as dwarf expression.
References dump_file, dump_flags, print_generic_expr(), print_rtl(), and TDF_DETAILS.
Referenced by add_loc_list(), const_ok_for_output_1(), cst_pool_loc_descr(), dw_loc_list_1(), loc_descriptor_from_tree(), loc_list_for_address_of_addr_expr_of_indirect_ref(), loc_list_from_tree_1(), and mem_loc_descriptor().
|
static |
Referenced by output_die(), and output_loc_operands().
|
static |
Reads integers from dw_vec_const array. Inverse of insert_int.
|
static |
Return true if frame description entry FDE is needed for EH.
References dw_fde_node::all_throwers_are_sibcalls, dw_fde_node::decl, DECL_WEAK, dw_fde_node::nothrow, TARGET_USES_WEAK_UNWIND_INFO, and dw_fde_node::uses_eh_lsda.
Referenced by output_call_frame_info().
|
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, dw_loc_list_struct::expr, field_type(), fold_build2, gcc_assert, 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, vlr_context::variant_part_offset, and wide_int_to_tree().
Referenced by add_data_member_location_attribute().
|
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, integer_type_node, NULL_TREE, TREE_CODE, and TREE_TYPE.
Referenced by add_alignment_attribute(), field_byte_offset(), gen_ctf_sou_type(), oacc_rewrite_var_decl(), and push_fields_onto_fieldstack().
|
static |
Callback function for file_info comparison. We sort by looking at the directories in the path.
References file_info::fname, and file_info::path.
Referenced by output_file_names().
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, file_info::file_idx, dwarf_file_data::filename, file_name_acquire_data::files, file_info::fname, g, gcc_assert, file_info::length, file_name_acquire_data::max_files, NULL, file_info::path, and file_name_acquire_data::used_files.
Referenced by output_file_names().
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.
|
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().
|
static |
Add STR to the given string hash table.
References ggc_cleared_alloc(), ggc_strdup, insert(), NULL, indirect_string_node::refcount, indirect_string_node::str, and table.
Referenced by add_filepath_AT_string(), add_skeleton_AT_string(), find_AT_string(), and output_line_string().
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, have_multiple_function_sections, set_cur_line_info_table(), switch_to_section(), tail_call_site_count, text_section, and unlikely_text_section().
|
static |
Find out whether a string should be output inline in DIE or out-of-line in .debug_str section.
References debug_str_section, DWARF2_INDIRECT_STRING_SUPPORT_MISSING_ON_TARGET, indirect_string_node::form, indirect_string_node::refcount, SECTION_MERGE, set_indirect_string(), and indirect_string_node::str.
Referenced by add_skeleton_AT_string(), AT_string_form(), and output_index_string().
|
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.
References ate_kind_label, NULL, and skip_loc_list_entry().
|
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().
|
static |
Returns the DIE for TYPE, that must not be a base type. A DIE is always returned.
References DECL_CONTEXT, NULL, NULL_TREE, and TREE_CODE.
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(), poly_int< N, C >::is_constant(), is_fortran(), NULL, NULL_TREE, TREE_CODE, tree_fits_shwi_p(), TREE_PUBLIC, TREE_STATIC, tree_to_shwi(), and VAR_P.
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().
|
static |
Try to generate a DWARF procedure that computes the same result as FNDECL. Return NULL if it is not possible.
References add_loc_descr(), dwarf_procedure_info::args_count, DECL_ARGUMENTS, DECL_CONTEXT, DECL_RESULT, DECL_SAVED_TREE, dw_loc_descr_node::dw_loc_next, dwarf_proc_stack_usage_map, dwarf_procedure_info::fndecl, get_context_die(), i, is_handled_procedure_type(), list_length(), loc_descr_without_nops(), loc_descriptor_from_tree(), lookup_decl_die(), new_dwarf_proc_die(), new_loc_descr(), NULL, NULL_TREE, resolve_args_picking(), TREE_CHAIN, TREE_CODE, TREE_OPERAND, and TREE_TYPE.
Referenced by loc_list_from_tree_1().
|
static |
|
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(), IDENTIFIER_POINTER, is_cxx_auto(), new_die(), NULL_TREE, and TYPE_IDENTIFIER.
Referenced by is_naming_typedef_decl().
|
static |
Generate a DW_TAG_call_site DIE in function DECL under SUBR_DIE for CA_LOC call arg loc node.
|
static |
Generate the DIE for the compilation unit.
References gcc_unreachable.
Referenced by comp_unit_die().
|
static |
Generate a DIE to represent a named constant.
References add_AT_loc(), DECL_RTL, DECL_RTL_SET_P, get_AT(), reg_loc_descriptor(), REG_P, and VAR_INIT_STATUS_INITIALIZED.
|
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.
References DECL_EXTERNAL.
|
static |
This routine generates DIE for array with hidden descriptor, details are filled into *info by a langhook.
References NULL, size_int, and TYPE_VECTOR_SUBPARTS().
|
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.
References comp_unit_die(), DINFO_USAGE_DIR_USE, i, incomplete_types, should_emit_struct_debug(), and vec_safe_length().
|
static |
Generate a DIE for a field in a record, or structure. CTX is required: see the comment for VLR_CONTEXT.
References BLOCK_CHAIN, BLOCK_FRAGMENT_ORIGIN, BLOCK_SUPERCONTEXT, call_arg_locations, TREE_ASM_WRITTEN, and TREE_CODE.
|
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().
|
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.
References decl_quals().
|
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_name_and_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(), new_die(), and NULL.
|
static |
Generate DIEs for the generic parameters of T. T must be either a generic type or a generic function. See http://gcc.gnu.org/wiki/TemplateParmsDwarf for more.
References add_AT_flag(), COMPLETE_TYPE_P, DECL_P, gcc_assert, generic_parameter_die(), lang_hooks_for_types::get_argument_pack_elems, lang_hooks::get_innermost_generic_args, lang_hooks::get_innermost_generic_parms, i, int_cst_value(), lookup_decl_die(), lookup_type_die(), NULL, template_parameter_pack_die(), TREE_CHAIN, TREE_CODE, TREE_VALUE, TREE_VEC_ELT, TREE_VEC_LENGTH, TYPE_P, and lang_hooks::types.
|
static |
Generate the DIE for a base class.
|
static |
Generate a DIE for an inlined subprogram.
References NULL.
|
static |
References label_num, and MAX_ARTIFICIAL_LABEL_BYTES.
Referenced by gen_llsym(), and note_rnglist_head().
|
static |
Generate a DIE to represent a label identifier.
References get_AT().
|
static |
Generate a DIE for a lexical block.
References BLOCK_FRAGMENT_CHAIN, and ranges_table.
|
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().
|
static |
Generate a DIE for a class member.
References i, NULL, NULL_TREE, and TYPE_FIELDS.
|
static |
Output debug information for namelists.
References DINFO_USAGE_DIR_USE, should_emit_struct_debug(), TREE_CODE, and TYPE_P.
|
static |
Generate a DIE for a namespace or namespace alias.
References DECL_ABSTRACT_ORIGIN, DECL_EXTERNAL, DECL_P, is_dlang(), is_fortran(), local_scope_p(), and NULL.
|
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.
References DECL_BIT_FIELD_TYPE, DECL_FIELD_CONTEXT, and TYPE_REVERSE_STORAGE_ORDER.
|
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.
References tmpl_value_parm_die_table.
|
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, i, die_struct::removed, tmpl_value_parm_die_table, and tree_add_const_value_attribute().
|
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.
|
static |
Generate a DIE to represent a declared function (either file-scope or block-local).
References add_AT_addr(), add_AT_die_ref(), add_AT_flag(), add_AT_lbl_id(), call_arg_loc_node::block, BLOCK_SUPERCONTEXT, call_arg_loc_node::call_insn, DECL_INITIAL, dwarf_AT(), dwarf_TAG(), call_arg_loc_node::label, lookup_block_die(), lookup_decl_die(), new_die(), NULL, NULL_TREE, call_arg_loc_node::symbol_ref, SYMBOL_REF_DECL, call_arg_loc_node::tail_call_p, targetm, and TREE_CODE.
|
static |
Generate a DIE for a subroutine _type_.
|
static |
Generate a DIE for a struct, class, enum or union type.
References DINFO_USAGE_DIR_USE, lookup_type_die(), and TREE_ASM_WRITTEN.
|
static |
References add_name_attribute(), comp_unit_die(), equate_type_number_to_die(), IDENTIFIER_POINTER, lookup_type_die(), new_die(), NULL, and TYPE_IDENTIFIER.
Referenced by add_gnat_descriptive_type_attribute(), and modified_type_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.
|
static |
Generate a type description DIE.
References TREE_ASM_WRITTEN, and TYPE_CONTEXT.
|
static |
Generate a DIE for a type definition.
References decl_function_context(), incomplete_types, and TYPE_STUB_DECL.
|
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.
|
static |
Generate a DIE to represent a declared data object. Either DECL or ORIGIN must be non-null.
References DECL_CONTEXT, gcc_assert, TREE_CODE, TREE_STATIC, and VAR_P.
|
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, i, and NULL.
|
static |
Wrapper function for generate_skeleton_bottom_up.
References clone_as_declaration(), die_struct::die_parent, generate_skeleton_bottom_up(), is_template_instantiation(), is_type_die(), skeleton_chain_struct::new_die, NULL, skeleton_chain_struct::old_die, and skeleton_chain_struct::parent.
Referenced by remove_child_or_replace_with_skeleton().
|
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().
|
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(), 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().
|
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, dw_get_die_parent(), DWARF_TYPE_SIGNATURE_SIZE, get_AT_ref(), get_AT_string(), is_cxx(), NULL, comdat_type_node::root_die, comdat_type_node::signature, comdat_type_node::type_die, and unmark_all_dies().
Referenced by break_out_comdat_types().
|
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, 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().
Return TRUE if T is an instance of generic type, FALSE otherwise.
References asm_out_file, dwarf_file_data::emitted_number, dwarf_file_data::filename, fputc(), last_emitted_file, output_asm_line_debug_info(), and output_quoted_string().
dw_attr_node * get_AT | ( | dw_die_ref | die, |
enum dwarf_attribute | attr_kind ) |
Get the attribute of type attr_kind.
References a, AT_ref(), die_struct::die_attr, FOR_EACH_VEC_SAFE_ELT, get_AT(), and NULL.
Referenced by add_AT_location_description(), add_AT_view_list(), add_data_member_location_attribute(), add_linkage_attr(), add_location_or_const_value_attribute(), AT_loc_list_ptr(), attr_checksum_ordered(), collect_skeleton_dies(), ctf_die_bitsize(), ctf_get_AT_data_member_location(), die_checksum_ordered(), dwarf2out_next_real_insn(), gen_const_die(), gen_ctf_enumeration_type(), gen_ctf_sou_type(), gen_ctf_subrange_type(), gen_label_die(), get_AT(), get_AT_file(), get_AT_flag(), get_AT_low_pc(), get_AT_ref(), get_AT_string(), get_AT_unsigned(), premark_used_types_helper(), prune_unused_types_update_strings(), retry_incomplete_types(), should_move_die_to_comdat(), tree_add_const_value_attribute_for_decl(), and view_list_to_loc_list_val_node().
struct dwarf_file_data * get_AT_file | ( | dw_die_ref | die, |
enum dwarf_attribute | attr_kind ) |
References a, AT_file(), get_AT(), and NULL.
Referenced by ctf_get_die_loc_file().
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(), and get_AT().
Referenced by gen_ctf_array_type(), gen_ctf_enumeration_type(), gen_ctf_function_type(), gen_ctf_sou_type(), gen_ctf_variable(), output_pubname(), and prune_unused_types_walk_local_classes().
|
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(), and NULL.
Referenced by output_die().
dw_die_ref get_AT_ref | ( | dw_die_ref | die, |
enum dwarf_attribute | attr_kind ) |
References a, AT_ref(), get_AT(), and NULL.
Referenced by attr_checksum_ordered(), checksum_die_context(), clone_as_declaration(), copy_ancestor_tree(), copy_declaration_context(), ctf_get_AT_type(), die_checksum_ordered(), dw_get_die_parent(), gen_ctf_variable(), generate_type_signature(), is_nested_in_subprogram(), optimize_external_refs_1(), qualified_die_p(), reset_dies(), splice_child_die(), and strip_naming_typedef().
const char * get_AT_string | ( | dw_die_ref | die, |
enum dwarf_attribute | attr_kind ) |
Return the value of the string attribute designated by ATTR_KIND, or NULL if it is not present.
References a, AT_string(), get_AT(), and NULL.
Referenced by add_enumerator_pubname(), checksum_die_context(), compute_comp_unit_symbol(), gen_ctf_base_type(), gen_ctf_enumeration_type(), gen_ctf_function_type(), gen_ctf_sou_type(), gen_ctf_type(), gen_ctf_typedef(), gen_ctf_variable(), generate_type_signature(), output_file_names(), and output_index_string_offset().
unsigned get_AT_unsigned | ( | dw_die_ref | die, |
enum dwarf_attribute | attr_kind ) |
Return the value of the unsigned attribute designated by ATTR_KIND, or 0 if it is not present.
References a, AT_unsigned(), and get_AT().
Referenced by add_bound_info(), break_out_comdat_types(), ctf_get_AT_data_member_location(), ctf_get_die_loc_col(), ctf_get_die_loc_line(), gen_ctf_base_type(), gen_ctf_enumeration_type(), gen_ctf_subrange_type(), is_ada(), is_c(), is_cxx(), is_dlang(), is_fortran(), is_rust(), modified_type_die(), and move_marked_base_types().
|
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().
|
inlinestatic |
Returns the DIE for a context.
References DECL_IS_UNDECLARED_BUILTIN, DECL_ORIGINAL_TYPE, is_cxx(), is_redundant_typedef(), is_tagged_type(), NULL_TREE, TREE_TYPE, TYPE_NAME, and TYPE_STUB_DECL.
Referenced by declare_in_namespace(), dwarf2out_imported_module_or_decl(), and function_to_dwarf_procedure().
|
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.
|
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().
|
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(), popcount_hwi(), TYPE_MAIN_VARIANT, TYPE_NEXT_VARIANT, and TYPE_QUALS.
Referenced by modified_type_die().
|
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().
|
static |
Set label to debug_info_section_label + die_offset of a DIE reference.
References debug_info_section_label, and die_struct::die_offset.
Referenced by output_loc_operands().
|
inlinestatic |
Compute hash of the whole location list LIST_HEAD.
References HOST_BITS_PER_CHAR, and HOST_BITS_PER_WIDE_INT.
|
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().
|
inlinestatic |
Iteratively hash the whole DWARF location expression LOC into HSTATE.
References inchash::hash::add(), inchash::hash::add_object(), dw_vec_const::array, dw_val_class_const, dw_val_class_const_double, dw_val_class_vec, dw_val_class_wide_int, dw_vec_const::elt_size, get_full_len(), dw_wide_int::get_val(), double_int::high, dw_vec_const::length, double_int::low, dw_val_node::v, dw_val_node::dw_val_struct_union::val_double, dw_val_node::dw_val_struct_union::val_int, dw_val_node::dw_val_struct_union::val_vec, and dw_val_node::dw_val_struct_union::val_wide.
|
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.
|
static |
Helper function for loc_descriptor. Return DW_OP_implicit_pointer for DEBUG_IMPLICIT_PTR RTL.
References DEBUG_IMPLICIT_PTR_DECL, dw_val_node::dw_val_struct_union::dw_val_die_union::die, dw_loc_descr_node::dw_loc_oprnd1, dw_loc_descr_node::dw_loc_oprnd2, dw_val_class_const, dw_val_class_decl_ref, dw_val_class_die_ref, dwarf_OP(), dw_val_node::dw_val_struct_union::dw_val_die_union::external, gcc_assert, lookup_decl_die(), new_loc_descr(), NULL, TREE_CODE, dw_val_node::v, dw_val_node::val_class, dw_val_node::dw_val_struct_union::val_decl_ref, dw_val_node::dw_val_struct_union::val_die_ref, and VAR_P.
Referenced by loc_descriptor().
|
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, is_declaration_die(), NULL, pubname_table, and table.
Referenced by output_pubnames(), and size_of_pubnames().
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, addr_table_entry::index, NO_INDEX_ASSIGNED, and addr_table_entry::refcount.
|
static |
Recursively assign each location list a unique index into the debug_addr section.
References loc_list_has_views(), and NULL.
|
static |
Assign .debug_rnglists indexes and unique indexes into the debug_addr section when needed.
References add_addr_table_entry(), ate_kind_label, BLOCK_BEGIN_LABEL, BLOCK_END_LABEL, DW_RANGES_IDX_SKELETON, FOR_EACH_VEC_SAFE_ELT, have_multiple_function_sections, i, MAX_ARTIFICIAL_LABEL_BYTES, r, ranges_table, rnglist_idx, and use_distinct_base_address_for_range().
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.
References asm_out_file, comp_unit_die(), NULL, and remap_debug_filename().
void init_addr_table_entry | ( | addr_table_entry * | e, |
enum ate_kind | kind, | ||
void * | addr ) |
Initialize an addr_table_entry.
References addr_table_entry::addr, ate_kind_label, ate_kind_rtx, ate_kind_rtx_dtprel, addr_table_entry::index, addr_table_entry::kind, addr_table_entry::addr_table_entry_struct_union::label, NO_INDEX_ASSIGNED, addr_table_entry::refcount, and addr_table_entry::addr_table_entry_struct_union::rtl.
Referenced by add_addr_table_entry().
|
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).
References asm_out_file, DEBUG_MACRO_SECTION_LABEL, macinfo_label_base, NULL, SECTION_EXCLUDE, and SECTION_LINKONCE.
|
static |
Writes floating point values to dw_vec_const array.
References as_a(), CONST_DOUBLE_REAL_VALUE, gcc_assert, GET_MODE, GET_MODE_SIZE(), i, insert_int(), and real_to_target().
Referenced by add_const_value_attribute(), loc_descriptor(), and mem_loc_descriptor().
|
static |
Writes integer values to dw_vec_const array.
|
static |
Referenced by insert_float(), and insert_wide_int().
|
static |
Writes wide_int values to dw_vec_const array.
References generic_wide_int< storage >::elt(), gcc_assert, HOST_BITS_PER_WIDE_INT, i, and insert_int().
Referenced by add_const_value_attribute(), and loc_descriptor().
|
static |
Return a location descriptor that designates constant POLY_I.
References add_loc_descr(), clz_hwi(), poly_int< N, C >::coeffs, ctz_hwi(), DWARF2_ADDR_SIZE, exact_log2(), gcc_assert, HOST_BITS_PER_WIDE_INT, i, int_loc_descriptor(), int_shift_loc_descriptor(), poly_int< N, C >::is_constant(), loc_descr_plus_const(), new_loc_descr(), new_reg_loc_descr(), NULL, NUM_POLY_INT_COEFFS, size_of_int_loc_descriptor(), size_of_sleb128(), size_of_uleb128(), and targetm.
Referenced by add_data_member_location_attribute(), address_of_int_loc_descriptor(), build_cfa_aligned_loc(), build_span_loc(), compare_loc_descriptor(), int_loc_descriptor(), int_shift_loc_descriptor(), loc_descr_plus_const(), loc_list_from_tree_1(), mem_loc_descriptor(), minmax_loc_descriptor(), scompare_loc_descriptor_narrow(), ucompare_loc_descriptor(), and uint_loc_descriptor().
|
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(), i, int_loc_descriptor(), new_loc_descr(), and shift.
Referenced by int_loc_descriptor().
|
inlinestatic |
Return TRUE if the language is Ada.
References comp_unit_die(), and get_AT_unsigned().
Referenced by add_subscript_info(), and output_pubname().
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, is_cxx_auto(), and TREE_CODE.
Referenced by modified_type_die().
Return true if this RTL expression describes a base+offset calculation.
References CONST_INT_P, GET_CODE, REG_P, REGNO, and XEXP.
Referenced by mem_loc_descriptor().
|
inlinestatic |
Return TRUE if the language is C.
References comp_unit_die(), and get_AT_unsigned().
|
inlinestatic |
Returns true iff C is a compile-unit DIE.
References die_struct::die_tag.
Referenced by add_pubname(), add_pubtype(), and reset_dies().
|
static |
Return TRUE if DECL was created by the C++ frontend.
References get_ultimate_context(), is_cxx(), startswith(), and TRANSLATION_UNIT_LANGUAGE.
|
inlinestatic |
Return TRUE if the language is C++.
References comp_unit_die(), and get_AT_unsigned().
Referenced by add_data_member_location_attribute(), add_pubtype(), generate_type_signature(), get_context_die(), is_cxx(), is_cxx_auto(), and output_pubname().
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 gen_block_die(), and is_base_type().
|
static |
Return true if this DIE is a declaration.
References a, die_struct::die_attr, and FOR_EACH_VEC_SAFE_ELT.
Referenced by clone_as_declaration(), contains_subprogram_definition(), copy_decls_walk(), generate_skeleton_bottom_up(), include_pubname_in_output(), and should_move_die_to_comdat().
|
inlinestatic |
Return TRUE if the language is D.
References comp_unit_die(), and get_AT_unsigned().
Referenced by gen_namespace_die().
|
inlinestatic |
References get_ultimate_context(), is_fortran(), and TRANSLATION_UNIT_LANGUAGE.
|
inlinestatic |
Return TRUE if the language is Fortran.
References comp_unit_die(), and get_AT_unsigned().
Referenced by fortran_common(), gen_namespace_die(), is_fortran(), and maybe_create_die_with_external_ref().
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, int_size_in_bytes(), INTEGRAL_TYPE_P, and TREE_CODE.
Referenced by function_to_dwarf_procedure(), and loc_list_from_tree_1().
|
inlinestatic |
Returns true iff C is a namespace DIE.
References die_struct::die_tag.
Referenced by add_pubname(), and add_pubtype().
|
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.
References BLOCK_SUBBLOCKS, gen_block_die(), and NULL.
Referenced by strip_naming_typedef().
|
static |
Return true if this DIE is nested inside a subprogram.
References get_AT_ref(), local_scope_p(), and NULL.
Referenced by should_move_die_to_comdat().
Forward declarations for functions defined in this file.
Test if rtl node points to a pseudo register.
References GET_CODE, REG_P, REGNO, and SUBREG_REG.
Referenced by rtl_for_decl_location().
|
static |
Is this a typedef we can avoid emitting?
References BLOCK_NONLOCALIZED_VAR, BLOCK_NUM_NONLOCALIZED_VARS, BLOCK_VARS, current_function_decl, DECL_CHAIN, DINFO_LEVEL_TERSE, early_dwarf, i, NULL, NULL_TREE, process_scope_var(), and TREE_CODE.
Referenced by get_context_die().
|
inlinestatic |
Return TRUE if the language is Rust. Note, returns FALSE for dwarf_version < 5 && dwarf_strict.
References comp_unit_die(), and get_AT_unsigned().
Referenced by base_type_die().
|
inlinestatic |
Return true if the given type node represents a tagged type.
References TREE_CODE.
Referenced by get_context_die().
|
inlinestatic |
Return true if this DIE represents a template instantiation.
References die_struct::die_tag, FOR_EACH_CHILD, is_template_parameter(), and is_type_die().
Referenced by die_checksum_ordered(), generate_skeleton(), and generate_skeleton_bottom_up().
|
inlinestatic |
Return true if this DIE is a template parameter.
References die_struct::die_tag.
Referenced by is_template_instantiation().
Return whether EXPR is an expression with the following pattern: INDIRECT_REF (NOP_EXPR (INTEGER_CST)).
Referenced by dwarf2out_imported_module_or_decl_1().
|
static |
Returns true if DIE represents a type, in the sense of TYPE_P.
References die_struct::die_tag.
Referenced by build_abbrev_table(), die_checksum_ordered(), generate_skeleton(), is_template_instantiation(), and optimize_external_refs_1().
|
inlinestatic |
Returns true iff C is a unit DIE of some sort.
References die_struct::die_tag.
Referenced by copy_ancestor_tree(), copy_declaration_context(), and copy_decls_walk().
Return whether DECL is a FIELD_DECL that represents the variant part of a structure.
|
inlinestatic |
Calculate the checksum of a location expression.
References CHECKSUM, dw_loc_descr_node::dtprel, dw_loc_descr_node::dw_loc_opc, inchash::hash::end(), and hash_loc_operands().
Referenced by attr_checksum().
|
inlinestatic |
Calculate the checksum of a location expression.
References CHECKSUM, CHECKSUM_SLEB128, CHECKSUM_ULEB128, dw_loc_descr_node::dtprel, dw_loc_descr_node::dw_loc_next, dw_loc_descr_node::dw_loc_opc, dw_loc_descr_node::dw_loc_oprnd1, inchash::hash::end(), hash_loc_operands(), NULL, dw_val_node::v, and dw_val_node::dw_val_struct_union::val_unsigned.
Referenced by attr_checksum_ordered().
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().
|
static |
Compare two location atoms for exact equality.
References a, b, and dw_val_equal_p().
Referenced by loc_descr_equal_p().
|
static |
Add a constant POLY_OFFSET to a location expression.
References add_loc_descr(), dw_loc_descr_node::dw_loc_next, dw_loc_descr_node::dw_loc_opc, dw_loc_descr_node::dw_loc_oprnd1, dw_loc_descr_node::dw_loc_oprnd2, gcc_assert, int_loc_descriptor(), INTTYPE_MAXIMUM, INTTYPE_MINIMUM, poly_int< N, C >::is_constant(), known_eq, new_loc_descr(), NULL, uint_loc_descriptor(), dw_val_node::v, and dw_val_node::dw_val_struct_union::val_int.
Referenced by based_loc_descr(), build_cfa_aligned_loc(), build_cfa_loc(), int_loc_descriptor(), loc_list_plus_const(), mem_loc_descriptor(), new_reg_loc_descr(), and tls_mem_loc_descriptor().
|
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 hash_set< KeyId, Lazy, Traits >::add(), dw_loc_descr_node::dw_loc_next, dw_loc_descr_node::dw_loc_opc, and NULL.
Referenced by loc_descr_without_nops().
|
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(), loc_descr_to_next_no_nop(), NULL, and hash_set< KeyId, Lazy, Traits >::traverse().
Referenced by function_to_dwarf_procedure(), and loc_list_from_tree().
|
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(), dw_vec_const::array, as_a(), 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_loc_descr_node::dw_loc_oprnd2, dw_val_class_const_double, dw_val_class_vec, dw_val_class_wide_int, DWARF2_ADDR_SIZE, dw_vec_const::elt_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_vec_alloc(), i, implicit_ptr_descriptor(), initialized, insert_float(), insert_wide_int(), INTVAL, is_a(), dw_vec_const::length, 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, dw_val_node::v, dw_val_node::val_class, dw_val_node::dw_val_struct_union::val_double, dw_val_node::dw_val_struct_union::val_vec, dw_val_node::dw_val_struct_union::val_wide, 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().
|
static |
Same as above but return only single location expression.
References dw_loc_list_struct::dw_loc_next, expansion_failed(), dw_loc_list_struct::expr, 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().
|
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(), 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, STRIP_NOPS, TREE_OPERAND, and TREE_TYPE.
Referenced by loc_list_from_tree_1().
|
static |
Likewise, but strip useless DW_OP_nop operations in the resulting expressions.
References loc_descr_without_nops(), loc_list_from_tree_1(), and NULL.
Referenced by add_location_or_const_value_attribute(), field_byte_offset(), loc_descriptor_from_tree(), loc_list_for_address_of_addr_expr_of_indirect_ref(), loc_list_from_tree_1(), and typed_binop_from_tree().
|
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_next, dw_loc_descr_node::dw_loc_oprnd1, 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, dw_loc_descr_node::frame_offset_rel, function_to_dwarf_procedure(), gcc_assert, gcc_unreachable, get_address_mode(), get_callee_fndecl(), GET_CODE, get_inner_reference(), GET_MODE, GET_MODE_BITSIZE(), GET_MODE_MASK, GET_MODE_SIZE(), ggc_free(), HOST_WIDE_INT_1U, i, constructor_elt::index, int_byte_position(), int_loc_descriptor(), int_size_in_bytes(), integer_type_node, integer_zerop(), INTEGRAL_TYPE_P, INTTYPE_MINIMUM, INTVAL, is_a(), 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, 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_OVERFLOW_WRAPS, 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_decl_ref, dw_val_node::dw_val_struct_union::val_die_ref, dw_val_node::dw_val_struct_union::val_loc, constructor_elt::value, VAR_INIT_STATUS_INITIALIZED, VAR_P, and XEXP.
Referenced by loc_list_from_tree(), and loc_list_from_tree_1().
|
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().
|
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 NULL, and ZERO_VIEW_P.
Referenced by gen_llsym(), index_location_lists(), and maybe_gen_llsym().
|
static |
Add a constant OFFSET to a location list.
References dw_loc_list_struct::dw_loc_next, dw_loc_list_struct::expr, loc_descr_plus_const(), and NULL.
Referenced by loc_list_for_address_of_addr_expr_of_indirect_ref(), and loc_list_from_tree_1().
Return true if DECL is a local static.
Referenced by dwarf2out_type_decl().
|
inlinestatic |
Returns true if CONTEXT_DIE is internal to a function.
References NULL_TREE.
Referenced by gen_namespace_die(), and is_nested_in_subprogram().
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(), 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().
|
inlinestatic |
Return the DIE associated with BLOCK.
References BLOCK_DIE, and maybe_create_die_with_external_ref().
Referenced by dwarf2out_die_ref_for_decl(), gen_subprogram_die(), and maybe_create_die_with_external_ref().
|
inlinestatic |
Looks up the DIE for a context.
dw_die_ref lookup_decl_die | ( | tree | decl | ) |
Return the DIE associated with a given declaration.
References decl_die_table, DECL_UID, maybe_create_die_with_external_ref(), and NULL.
Referenced by btf_add_const_void(), btf_add_func_datasec_entries(), btf_add_func_records(), btf_emit_variable_p(), decls_for_scope(), dwarf2out_decl(), dwarf2out_die_ref_for_decl(), dwarf2out_type_decl(), force_decl_die(), function_to_dwarf_procedure(), gen_generic_params_dies(), gen_subprogram_die(), implicit_ptr_descriptor(), loc_list_from_tree_1(), maybe_create_die_with_external_ref(), optimize_one_addr_into_implicit_ptr(), parameter_ref_descriptor(), and prune_unused_types_walk_attribs().
|
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().
|
static |
Return a pointer to the external_ref for references to DIE.
References map, and external_ref::type.
Referenced by build_abbrev_table(), and optimize_external_refs_1().
|
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.
References BLOCK_VARS, i, TREE_CODE, and TYPE_DECL_IS_STUB.
Referenced by add_linkage_name(), and output_index_string_offset().
dw_die_ref lookup_type_die | ( | tree | type | ) |
Return the DIE associated with the given type specifier.
References NULL, die_struct::removed, TREE_ASM_WRITTEN, and TYPE_SYMTAB_DIE.
Referenced by add_gnat_descriptive_type_attribute(), add_src_coords_attributes(), base_type_for_mode(), ctf_lookup_tree_type(), declare_in_namespace(), force_decl_die(), gen_generic_params_dies(), gen_tagged_type_die(), gen_type_die(), lookup_type_die_strip_naming_typedef(), and modified_type_die().
|
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().
|
static |
Return the default for DW_AT_lower_bound, or -1 if there is not any default.
References dwarf_procedure_info::args_count, dw_loc_list_struct::expr, dwarf_procedure_info::fndecl, NULL_TREE, and resolve_args_picking().
Referenced by add_subscript_info().
Mangle referenced decls.
References assign_assembler_name_if_needed(), CONSTANT_CLASS_P, EXPR_P, NULL_TREE, and VAR_OR_FUNCTION_DECL_P.
Referenced by tree_add_const_value_attribute().
|
static |
Stripped-down variant of resolve_addr, mark DW_TAG_base_type nodes referenced from typed stack ops and count how often they are used.
References dw_val_node::dw_val_struct_union::dw_val_die_union::die, dw_loc_descr_node::dw_loc_oprnd1, dw_loc_descr_node::dw_loc_oprnd2, dw_val_class_unsigned_const, mark_base_types(), dw_val_node::v, dw_val_node::val_class, dw_val_node::dw_val_struct_union::val_die_ref, and dw_val_node::dw_val_struct_union::val_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.
References DWARF_TYPE_SIGNATURE_SIZE.
Referenced by mark_base_types().
|
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().
|
static |
Mark the ranges of non-debug subsections in the std text sections.
References dw_fde_node::dw_fde_begin, dw_fde_node::dw_fde_end, dw_fde_node::dw_fde_second_begin, dw_fde_node::dw_fde_second_end, dw_fde_node::ignored_debug, dw_fde_node::in_std_section, in_text_section_p, last_cold_label, last_text_label, dw_fde_node::second_in_std_section, switch_cold_ranges, switch_text_ranges, vec_alloc(), vec_safe_length(), and vec_safe_push().
Referenced by dwarf2out_end_epilogue(), and dwarf2out_switch_text_section().
|
static |
Mark DIE and its children as removed.
References prune_unused_types_walk().
|
static |
Match the base name of a file to the base name of a compilation unit.
References base_of_path(), NULL, and path.
Referenced by should_emit_struct_debug().
|
static |
If we have a registered external DIE for DECL return a new DIE for the concrete instance with an appropriate abstract origin.
References add_AT_external_die_ref(), add_desc_attribute(), BLOCK_SUPERCONTEXT, comp_unit_die(), DECL_CONTEXT, DINFO_LEVEL_TERSE, equate_block_to_die(), equate_decl_number_to_die(), external_die_map, gcc_assert, gcc_unreachable, INCREMENTAL_LINK_LTO, is_fortran(), lookup_block_die(), lookup_decl_die(), new_die(), NULL, sym_off_pair::off, sym_off_pair::sym, TREE_CODE, TYPE_CONTEXT, and TYPE_P.
Referenced by lookup_block_die(), and lookup_decl_die().
|
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().
|
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().
|
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, JUMP_TABLE_DATA_P, RESET_NEXT_VIEW, RESETTING_VIEW_P, table, and targetm.
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(), ALL, alloc_dw_wide_int(), arg_pointer_rtx, dw_vec_const::array, as_a(), 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(), dw_vec_const::elt_size, 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_vec_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_a(), is_based_loc(), known_eq, dw_vec_const::length, 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, dw_val_node::dw_val_struct_union::val_double, dw_val_node::dw_val_struct_union::val_loc, dw_val_node::dw_val_struct_union::val_vec, dw_val_node::dw_val_struct_union::val_wide, 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().
|
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.
|
static |
Return location descriptor for {U,S}{MIN,MAX}.
References add_loc_descr(), as_a(), base_type_for_mode(), convert_descriptor_to_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, dw_val_class_loc, DWARF2_ADDR_SIZE, dwarf_OP(), dw_val_node::dw_val_struct_union::dw_val_die_union::external, GET_CODE, GET_MODE_MASK, GET_MODE_SIZE(), int_loc_descriptor(), is_a(), mem_loc_descriptor(), new_loc_descr(), NULL, shift, dw_val_node::v, dw_val_node::val_class, dw_val_node::dw_val_struct_union::val_die_ref, dw_val_node::dw_val_struct_union::val_loc, VAR_INIT_STATUS_INITIALIZED, and XEXP.
Referenced by mem_loc_descriptor().
|
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_NAMELESS, DECL_ORIGINAL_TYPE, decl_ultimate_origin(), die_struct::die_child, die_struct::die_parent, die_struct::die_sib, die_struct::die_tag, dwarf_qual_info, dwarf_qual_info_size, 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, 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(), 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().
|
static |
Move all children from OLD_PARENT to NEW_PARENT.
References die_struct::die_child, die_struct::die_parent, FOR_EACH_CHILD, and NULL.
Referenced by generate_skeleton_bottom_up().
|
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.
References comdat_type_list, comp_unit_die(), limbo_die_list, and prune_unmark_dies().
|
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 die_struct::die_mark, get_AT_unsigned(), and y.
|
static |
Given an RTL of a register, return a location descriptor that designates a value that spans more than one register.
References add_loc_descr(), add_loc_descr_op_piece(), crtl, debugger_reg_number(), DEBUGGER_REGNO, gcc_assert, GET_CODE, GET_MODE, GET_MODE_SIZE(), i, initialized, new_loc_descr(), NULL, NULL_RTX, one_reg_loc_descriptor(), REG_NREGS, REGNO, VAR_INIT_STATUS_INITIALIZED, VAR_INIT_STATUS_UNINITIALIZED, XVECEXP, and XVECLEN.
Referenced by reg_loc_descriptor().
Return true if DW_AT_endianity should be emitted according to REVERSE.
Referenced by base_type_die(), and modified_type_die().
|
inlinestatic |
Return a pointer to a newly allocated address location description. If dwarf_split_debug_info is true, then record the address with the appropriate relocation.
References add_addr_table_entry(), ate_kind_rtx, ate_kind_rtx_dtprel, dw_loc_descr_node::dtprel, dw_addr_op(), dw_loc_descr_node::dw_loc_oprnd1, dw_val_class_addr, new_loc_descr(), 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 add_const_value_attribute(), loc_descriptor(), loc_list_from_tree_1(), and mem_loc_descriptor().
|
inlinestatic |
Create and return a new die with a parent of PARENT_DIE. If PARENT_DIE is NULL, the new DIE is placed in limbo and an associated tree T must be supplied to determine parenthood later.
References add_child_die(), limbo_die_struct::created_for, debug_generic_stmt(), decl_function_context(), limbo_die_struct::die, early_dwarf, gcc_unreachable, ggc_cleared_alloc(), limbo_die_list, new_die_raw(), limbo_die_struct::next, NULL, RECORD_OR_UNION_TYPE_P, TREE_CODE, and TYPE_CONTEXT.
Referenced by base_type_die(), break_out_comdat_types(), change_AT_die_ref(), dwarf2_build_local_stub(), dwarf2out_decl(), gen_block_die(), gen_formal_types_die(), gen_subprogram_die(), gen_type_die(), generic_parameter_die(), maybe_create_die_with_external_ref(), modified_type_die(), new_dwarf_proc_die(), record_type_tag(), subrange_type_die(), and template_parameter_pack_die().
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_cleared_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().
|
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(), new_die(), and NULL.
Referenced by function_to_dwarf_procedure().
|
static |
Create a new line number table.
References BLOCK_NUMBER.
|
inlinestatic |
Return a pointer to a newly allocated location description. Location descriptions are simple expression terms that can be strung together to form more complicated location (address) descriptions.
References dw_loc_descr_node::dw_loc_opc, dw_loc_descr_node::dw_loc_oprnd1, dw_loc_descr_node::dw_loc_oprnd2, dw_val_class_unsigned_const, ggc_cleared_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_unsigned.
Referenced by add_const_value_attribute(), add_data_member_location_attribute(), add_loc_descr_op_piece(), add_src_coords_attributes(), 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(), implicit_ptr_descriptor(), int_loc_descriptor(), int_shift_loc_descriptor(), loc_descr_plus_const(), loc_descriptor(), loc_list_for_address_of_addr_expr_of_indirect_ref(), loc_list_from_tree_1(), mem_loc_descriptor(), minmax_loc_descriptor(), multiple_reg_loc_descriptor(), new_addr_loc_descr(), new_loc_descr_op_bit_piece(), new_reg_loc_descr(), one_reg_loc_descriptor(), parameter_ref_descriptor(), popcount_loc_descriptor(), reg_loc_descriptor(), rotate_loc_descriptor(), scompare_loc_descriptor_narrow(), scompare_loc_descriptor_wide(), typed_binop(), typed_binop_from_tree(), ucompare_loc_descriptor(), uint_comparison_loc_list(), and uint_loc_descriptor().
|
static |
Create a DW_OP_piece or DW_OP_bit_piece for bitsize, or return NULL if it is not possible.
References new_loc_descr(), and NULL.
Referenced by dw_sra_loc_expr().
|
inlinestatic |
Return a new location list, given the begin and end range, and the expression.
References begin(), dw_loc_list_struct::begin, dw_loc_list_struct::begin_entry, dw_loc_list_struct::end, end(), dw_loc_list_struct::end_entry, dw_loc_list_struct::expr, ggc_cleared_alloc(), NULL, dw_loc_list_struct::section, dw_loc_list_struct::vbegin, and dw_loc_list_struct::vend.
Referenced by convert_cfa_to_fb_loc_list(), dw_loc_list(), loc_list_from_tree_1(), and resolve_addr().
|
inlinestatic |
Return a pointer to a newly allocated location description for REG and OFFSET.
References poly_int< N, C >::is_constant(), loc_descr_plus_const(), new_loc_descr(), and new_reg_loc_descr().
Referenced by based_loc_descr(), build_cfa_aligned_loc(), build_cfa_loc(), int_loc_descriptor(), and new_reg_loc_descr().
|
static |
Return NULL if l is a DWARF expression, or first op that is not valid DWARF expression.
|
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(), and ranges_table.
Referenced by add_ranges_by_labels().
|
static |
Walk the tree DIE and note DIEs with DW_OP_GNU_variable_value still with dw_val_class_decl_ref operand.
References dw_val_node::dw_val_struct_union::dw_val_die_union::die, dw_loc_descr_node::dw_loc_oprnd1, dw_val_class_die_ref, dw_val_node::dw_val_struct_union::dw_val_die_union::external, dw_val_node::v, dw_val_node::val_class, and dw_val_node::dw_val_struct_union::val_die_ref.
|
static |
Helper function for note_variable_value, handle one location expression.
References a, AT_loc(), dw_val_class_loc_list, and resolve_variable_value_in_expr().
Referenced by dwarf2out_early_finish().
|
inlinestatic |
Similarly, but return an offset_int instead of UHWI.
References BITS_PER_WORD, NULL_TREE, wi::to_offset(), TREE_CODE, TYPE_ALIGN, and TYPE_SIZE.
Referenced by field_byte_offset().
|
static |
Return a location descriptor that designates a machine register for a given hard register number.
References add_loc_descr(), 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().
|
static |
Attempt to optimize abbreviation table from abbrev_opt_start abbreviation above.
References a, abbrev_die_table, abbrev_opt_base_type_end, abbrev_opt_start, abbrev_usage_count, AT_class(), die_struct::die_abbrev, die_abbrev_cmp(), die_struct::die_attr, dw_attr_struct::dw_attr_val, dw_val_class_const, dw_val_class_file, dw_val_class_unsigned_const, dw_val_equal_p(), FOR_EACH_VEC_ELT, FOR_EACH_VEC_SAFE_ELT, gcc_assert, i, optimize_implicit_const(), sorted_abbrev_dies, and vec_safe_length().
Referenced by output_comp_unit().
|
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().
|
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(), 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().
|
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, i, size_of_sleb128(), and sorted_abbrev_dies.
Referenced by optimize_abbrev_table().
|
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.
|
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_loc_list_struct::dw_loc_next, dw_val_class_loc_list, FOR_EACH_VEC_SAFE_ELT, and NULL.
|
static |
Recursively optimize location lists referenced from DIE children and share them whenever possible.
|
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.
References debug_str_section, and HOST_WIDE_INT_PRINT_UNSIGNED.
|
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.
References comp_unit_die(), dw_val_class_vec, GET_CODE, lookup_decl_die(), MEM_P, NULL_RTX, NULL_TREE, SYMBOL_REF_DECL, TREE_STRING_POINTER, and used_rtx_array.
|
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.
References NULL.
|
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, NULL, and output_die_abbrevs().
|
static |
Produce the .debug_addr section.
References addr_table_entry::addr, asm_out_file, ate_kind_label, ate_kind_rtx, ate_kind_rtx_dtprel, dw2_asm_output_addr(), dw2_asm_output_addr_rtx(), DWARF2_ADDR_SIZE, fputc(), gcc_assert, gcc_unreachable, addr_table_entry::index, addr_table_entry::addr_table_entry_struct_union::label, addr_table_entry::addr_table_entry_struct_union::rtl, and targetm.
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.
References count_index_strings(), debug_str_hash, debug_str_offsets_section, and DWARF_INITIAL_LENGTH_SIZE.
|
static |
Output the information that goes into the .debug_aranges table. Namely, define the beginning and ending address range of the text section generated for this compilation unit.
References cold_end_label, cold_text_section_label, debug_info_section, debug_info_section_label, debug_skeleton_info_section, debug_skeleton_info_section_label, dw2_asm_output_addr(), dw2_asm_output_data(), dw2_asm_output_delta(), dw2_asm_output_offset(), dw_fde_node::dw_fde_begin, dw_fde_node::dw_fde_end, dw_fde_node::dw_fde_second_begin, dw_fde_node::dw_fde_second_end, DWARF2_ADDR_SIZE, DWARF_ARANGES_PAD_SIZE, DWARF_INITIAL_LENGTH_SIZE, fde_vec, FOR_EACH_VEC_ELT, have_multiple_function_sections, i, dw_fde_node::ignored_debug, dw_fde_node::in_std_section, NULL, dw_fde_node::second_in_std_section, size_of_aranges(), switch_cold_ranges, switch_text_ranges, text_end_label, text_section_label, and XCOFF_DEBUGGING_INFO.
|
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.
Referenced by asm_outputs_debug_line_str(), variable_value_hasher::equal(), and generic_type_p().
|
static |
Output an attribute's index or value appropriately.
References a, AT_addr(), AT_class(), AT_index(), AT_lbl(), dw2_asm_output_addr(), dw2_asm_output_addr_rtx(), dw2_asm_output_data_uleb128(), dw_val_class_addr, dw_val_class_high_pc, dw_val_class_lbl_id, DWARF2_ADDR_SIZE, dwarf_attr_name(), gcc_unreachable, and NOT_INDEXED.
Referenced by output_die().
|
static |
Forward declarations for functions defined in this file.
Output the call frame information used to record information that relates to calculating the frame pointer, and records the location of saved registers.
References app_disable(), app_enable(), asm_out_file, ASM_OUTPUT_LABEL, ASM_PREFERRED_EH_DATA_FORMAT, assemble_external_libcall(), CIE_AFTER_SIZE_LABEL, cie_cfi_vec, CIE_END_LABEL, current_unit_personality, dw_fde_node::decl, dw2_asm_output_data(), dw2_asm_output_data_sleb128(), dw2_asm_output_data_uleb128(), dw2_asm_output_delta(), dw2_asm_output_encoded_addr_rtx(), dw2_asm_output_nstring(), dw_fde_node::dw_fde_second_begin, DWARF2_ADDR_SIZE, DWARF2_FRAME_REG_OUT, dwarf2out_do_cfi_asm(), DWARF_CIE_DATA_ALIGNMENT, DWARF_CIE_ID, DWARF_FRAME_RETURN_COLUMN, DWARF_INITIAL_LENGTH_SIZE, eh_data_format_name(), fde_needed_for_eh_p(), fde_vec, floor_log2(), FOR_EACH_VEC_ELT, FRAME_BEGIN_LABEL, gcc_assert, i, MAX_ARTIFICIAL_LABEL_BYTES, NULL, output_cfi(), output_fde(), PTR_SIZE, size_of_encoded_value(), size_of_sleb128(), size_of_uleb128(), switch_to_frame_table_section(), TARGET_USES_WEAK_UNWIND_INFO, targetm, dw_fde_node::uses_eh_lsda, and XCOFF_DEBUGGING_INFO.
Referenced by dwarf2out_frame_finish().
|
static |
Output a comdat type unit DIE and its children.
References build_abbrev_table(), calc_die_sizes(), DEBUG_DWO_INFO_SECTION, DEBUG_INFO_SECTION, DEBUG_LTO_DWO_INFO_SECTION, DEBUG_LTO_INFO_SECTION, die_struct::die_offset, dw2_asm_output_data(), DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE, DWARF_TYPE_SIGNATURE_SIZE, get_identifier(), get_section(), i, mark_dies(), next_die_offset, NULL, optimize_external_refs(), output_compilation_unit_header(), output_die(), output_signature(), comdat_type_node::root_die, SECTION_DEBUG, SECTION_LINKONCE, comdat_type_node::signature, switch_to_section(), targetm, comdat_type_node::type_die, and unmark_dies().
|
static |
Output the compilation unit DIE and its children.
References abbrev_die_table, abbrev_opt_start, asm_out_file, ASM_OUTPUT_LABEL, build_abbrev_table(), build_decl(), calc_die_sizes(), char_type_node, die_struct::comdat_type_p, comp_unit_die(), debug_info_section, debug_info_section_label, DECL_ARTIFICIAL, DECL_VISIBILITY, DECL_VISIBILITY_SPECIFIED, die_struct::die_child, die_struct::die_id, die_struct::die_symbol_or_type_node::die_symbol, dw2_asm_output_data(), DWARF_COMPILE_UNIT_HEADER_SIZE, DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE, get_identifier(), get_section(), i, info_section_emitted, mark_dies(), next_die_offset, NULL, optimize_abbrev_table(), optimize_external_refs(), output_compilation_unit_header(), output_die(), SECTION_DEBUG, switch_to_section(), targetm, TREE_PUBLIC, TREE_STATIC, UNKNOWN_LOCATION, unmark_dies(), vec_safe_length(), and VISIBILITY_HIDDEN.
|
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, next_die_offset, output_dwarf_version(), and XCOFF_DEBUGGING_INFO.
Referenced by output_comdat_type_unit(), and output_comp_unit().
|
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(), 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(), comdat_type_node::signature, 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().
|
static |
Given a die and id, produce the appropriate abbreviations.
References AT_class(), die_struct::die_attr, die_struct::die_child, die_struct::die_tag, dw2_asm_output_data(), dw2_asm_output_data_sleb128(), dw2_asm_output_data_uleb128(), dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, dw_val_class_file_implicit, dwarf_attr_name(), dwarf_tag_name(), dwarf_file_data::filename, maybe_emit_file(), NULL, output_value_format(), dw_val_node::v, dw_val_node::dw_val_struct_union::val_file, dw_val_node::dw_val_struct_union::val_int, value_format(), and vec_safe_iterate().
Referenced by output_abbrev_section(), and output_skeleton_debug_sections().
|
inlinestatic |
Output a discriminant value.
References dw2_asm_output_data_sleb128(), dw2_asm_output_data_uleb128(), dw_discr_value::pos, dw_discr_value::sval, dw_discr_value::uval, and dw_discr_value::v.
Referenced by output_die().
|
static |
Output the dwarf version number.
References dw2_asm_output_data(), and warning().
Referenced by output_compilation_unit_header(), output_line_info(), output_rnglists(), and output_skeleton_debug_sections().
|
static |
Output one FDE.
References asm_out_file, ASM_OUTPUT_LABEL, begin(), debug_frame_section, dw_fde_node::decl, dw2_asm_output_addr(), dw2_asm_output_data(), dw2_asm_output_data_uleb128(), dw2_asm_output_delta(), dw2_asm_output_encoded_addr_rtx(), dw2_asm_output_offset(), dw_fde_node::dw_fde_begin, dw_fde_node::dw_fde_cfi, dw_fde_node::dw_fde_current_label, 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, DWARF2_ADDR_SIZE, DWARF_INITIAL_LENGTH_SIZE, end(), FDE_AFTER_SIZE_LABEL, FDE_END_LABEL, FDE_LABEL, floor_log2(), dw_fde_node::funcdef_number, function_section(), gcc_assert, i, MAX_ARTIFICIAL_LABEL_BYTES, NULL, output_cfi(), PTR_SIZE, size_of_encoded_value(), size_of_uleb128(), switch_to_frame_table_section(), switch_to_section(), SYMBOL_FLAG_LOCAL, SYMBOL_REF_FLAGS, targetm, dw_fde_node::uses_eh_lsda, vec_safe_length(), and XCOFF_DEBUGGING_INFO.
Referenced by output_call_frame_info().
|
static |
Output the directory table and the file name table. We try to minimize the total amount of memory needed. A heuristic is used to avoid large slowdowns with many input files.
References comp_dir_string(), comp_unit_die(), count, dir_info::count, dir_info::dir_idx, file_info::dir_idx, dw2_asm_output_data(), dw2_asm_output_data_uleb128(), dw2_asm_output_nstring(), DWARF2_DIR_SHOULD_END_WITH_SEPARATOR, DWARF5_USE_DEBUG_LINE_STR, file_info_cmp(), file_name_acquire(), file_table, file_name_acquire_data::files, file_info::fname, gcc_assert, get_AT_string(), ggc_alloc_string(), HOST_WIDE_INT_UC, i, last_emitted_file, dir_info::length, file_name_acquire_data::max_files, NULL, output_line_string(), dir_info::path, file_info::path, path, dir_info::prefix, qsort, size_of_uleb128(), and file_name_acquire_data::used_files.
Referenced by output_line_info().
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, indirect_string_node::index, NO_INDEX_ASSIGNED, and indirect_string_node::refcount.
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(), DINFO_LEVEL_TERSE, dwarf_debuginfo_p(), get_AT_string(), last_emitted_file, lookup_filename(), maybe_emit_file(), and NULL.
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.
Referenced by resolve_variable_value_in_expr().
|
static |
Output the indexed string table.
|
static |
Output the source line number correspondence information. This information goes into the .debug_line section.
References asm_out_file, ASM_OUTPUT_LABEL, cold_text_section_line_info, dw2_asm_output_data(), dw2_asm_output_delta(), DWARF2_ADDR_SIZE, DWARF_INITIAL_LENGTH_SIZE, DWARF_LINE_BASE, DWARF_LINE_DEFAULT_IS_STMT_START, DWARF_LINE_DEFAULT_MAX_OPS_PER_INSN, DWARF_LINE_OPCODE_BASE, DWARF_LINE_RANGE, FOR_EACH_VEC_ELT, i, LINE_NUMBER_BEGIN_LABEL, LINE_NUMBER_END_LABEL, LN_PROLOG_AS_LABEL, LN_PROLOG_END_LABEL, MAX_ARTIFICIAL_LABEL_BYTES, output_dwarf_version(), output_file_names(), output_line_info_generation, output_one_line_info_table(), separate_line_info, table, text_section_line_info, and XCOFF_DEBUGGING_INFO.
|
static |
Helper function for output_file_names. Emit a FORM encoded string STR, with assembly comment start ENTRY_KIND and index IDX
References hash_table< Descriptor, Lazy, Allocator >::create_ggc(), debug_line_str_hash, debug_line_str_section, dw2_asm_output_nstring(), dw2_asm_output_offset(), find_AT_string_in_table(), indirect_string_node::form, gcc_unreachable, indirect_string_node::label, set_indirect_string(), and indirect_string_node::str.
Referenced by output_file_names().
|
static |
Output the location list given to us.
References asm_out_file, ASM_OUTPUT_LABEL, dw_loc_list_struct::begin, dw2_asm_output_addr(), dw2_asm_output_data(), dw2_asm_output_data_uleb128(), dw2_asm_output_delta(), dw2_asm_output_delta_uleb128(), dw2_asm_output_symname_uleb128(), dw_loc_list_struct::dw_loc_next, DWARF2_ADDR_SIZE, dwarf2out_locviews_in_attribute(), dwarf2out_maybe_output_loclist_view_pair(), dw_loc_list_struct::end, dw_loc_list_struct::force, gcc_assert, have_multiple_function_sections, MAX_ARTIFICIAL_LABEL_BYTES, NULL, output_loc_sequence(), dw_loc_list_struct::section, skip_loc_list_entry(), and ZERO_VIEW_P.
Referenced by output_location_lists().
|
static |
Output the offset into the debug_loc section.
References a, AT_loc_list(), debug_loc_section, dw2_asm_output_data_uleb128(), dw2_asm_output_delta(), dw2_asm_output_offset(), dwarf_attr_name(), gcc_assert, dw_loc_list_struct::ll_symbol, and loc_section_label.
Referenced by output_die().
|
static |
Output location description stack opcode's operands (if any). 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 dw_vec_const::array, asm_out_file, debug_info_section, dw_val_node::dw_val_struct_union::dw_val_die_union::die, dw_loc_descr_node::dtprel, dw2_asm_output_addr_rtx(), dw2_asm_output_data(), dw2_asm_output_data_sleb128(), dw2_asm_output_data_uleb128(), dw2_asm_output_offset(), dw_loc_descr_node::dw_loc_addr, dw_loc_descr_node::dw_loc_opc, dw_loc_descr_node::dw_loc_oprnd1, dw_loc_descr_node::dw_loc_oprnd2, dw_val_class_addr, dw_val_class_const, dw_val_class_const_double, dw_val_class_die_ref, dw_val_class_loc, dw_val_class_unsigned_const, dw_val_class_vec, dw_val_class_wide_int, DWARF2_ADDR_SIZE, DWARF2_FRAME_REG_OUT, DWARF_REF_SIZE, dw_wide_int::elt(), dw_vec_const::elt_size, extract_int(), fputc(), gcc_assert, gcc_unreachable, get_base_type_offset(), get_full_len(), get_ref_die_offset(), get_ref_die_offset_label(), double_int::high, HOST_BITS_PER_CHAR, HOST_BITS_PER_WIDE_INT, i, addr_table_entry::index, dw_vec_const::length, double_int::low, MAX_ARTIFICIAL_LABEL_BYTES, NO_INDEX_ASSIGNED, NULL, output_loc_sequence(), r, size_of_locs(), size_of_uleb128(), targetm, dw_val_node::v, dw_val_node::dw_val_struct_union::val_addr, dw_val_node::val_class, dw_val_node::dw_val_struct_union::val_die_ref, dw_val_node::dw_val_struct_union::val_double, dw_val_node::val_entry, dw_val_node::dw_val_struct_union::val_int, dw_val_node::dw_val_struct_union::val_loc, dw_val_node::dw_val_struct_union::val_unsigned, dw_val_node::dw_val_struct_union::val_vec, and dw_val_node::dw_val_struct_union::val_wide.
Referenced by output_loc_sequence().
|
static |
Output location description stack opcode's operands (if any). The output is single bytes on a line, suitable for .cfi_escape.
References asm_out_file, dw2_asm_output_data_raw(), dw2_asm_output_data_sleb128_raw(), dw2_asm_output_data_uleb128_raw(), dw_loc_descr_node::dw_loc_addr, dw_loc_descr_node::dw_loc_opc, dw_loc_descr_node::dw_loc_oprnd1, dw_loc_descr_node::dw_loc_oprnd2, dw_val_class_loc, DWARF2_FRAME_REG_OUT, fputc(), gcc_assert, gcc_unreachable, HOST_BITS_PER_WIDE_INT, r, size_of_uleb128(), dw_val_node::v, dw_val_node::val_class, dw_val_node::dw_val_struct_union::val_int, dw_val_node::dw_val_struct_union::val_loc, and dw_val_node::dw_val_struct_union::val_unsigned.
Referenced by output_loc_sequence_raw().
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, NULL, output_loc_operands(), and r.
Referenced by output_cfa_loc(), output_die(), output_loc_list(), and output_loc_operands().
void output_loc_sequence_raw | ( | dw_loc_descr_ref | loc | ) |
References asm_out_file, dw_loc_descr_node::dw_loc_next, dw_loc_descr_node::dw_loc_opc, DWARF2_FRAME_REG_OUT, fputc(), gcc_assert, output_loc_operands_raw(), and r.
Referenced by output_cfa_loc_raw().
|
static |
Output all location lists for the DIE and its children.
References a, AT_class(), AT_loc_list(), die_struct::die_attr, dw_val_class_loc_list, FOR_EACH_CHILD, FOR_EACH_VEC_SAFE_ELT, output_loc_list(), and output_location_lists().
Referenced by output_location_lists().
|
static |
Output all location list offsets for the DIE and its children.
References a, AT_class(), AT_loc_list(), die_struct::die_attr, dw2_asm_output_delta(), dw_val_class_loc_list, FOR_EACH_CHILD, FOR_EACH_VEC_SAFE_ELT, gcc_assert, dw_loc_list_struct::hash, dw_loc_list_struct::ll_symbol, loc_list_idx, loc_section_label, NULL, dw_loc_list_struct::offset_emitted, and output_loclists_offsets().
Referenced by output_loclists_offsets().
|
static |
Output macinfo section(s).
References macinfo_struct::code, debug_str_section, DWARF2_INDIRECT_STRING_SUPPORT_MISSING_ON_TARGET, find_AT_string(), i, macinfo_struct::info, macinfo_table, SECTION_MERGE, and set_indirect_string().
|
static |
Output a single .debug_macinfo entry.
References macinfo_struct::code, macinfo_struct::info, macinfo_struct::lineno, macinfo_table, NULL, and vec_safe_push().
|
static |
Output one line number table into the .debug_line section.
References dw2_asm_output_addr(), dw2_asm_output_data(), dw2_asm_output_data_sleb128(), dw2_asm_output_data_uleb128(), dw2_asm_output_delta(), DWARF2_ADDR_SIZE, DWARF_LINE_BASE, DWARF_LINE_DEFAULT_IS_STMT_START, DWARF_LINE_OPCODE_BASE, DWARF_LINE_RANGE, FOR_EACH_VEC_SAFE_ELT, i, LI_adv_address, LI_negate_stmt, LI_set_address, LI_set_column, LI_set_discriminator, LI_set_epilogue_begin, LI_set_file, LI_set_line, LI_set_prologue_end, LINE_CODE_LABEL, MAX_ARTIFICIAL_LABEL_BYTES, NULL, dw_line_info_struct::opcode, size_of_uleb128(), table, and dw_line_info_struct::val.
Referenced by output_line_info().
|
static |
Output a single entry in the pubnames table.
References pubname_struct::die, die_struct::die_tag, dw2_asm_output_data(), dw2_asm_output_nstring(), get_AT_flag(), is_ada(), is_cxx(), and pubname_struct::name.
Referenced by output_pubnames().
|
static |
Output the public names table used to speed up access to externally visible names; or the public types table used to find type definitions.
References die_struct::comdat_type_p, comp_unit_die(), debug_info_section, debug_info_section_label, debug_skeleton_info_section, debug_skeleton_info_section_label, pubname_struct::die, die_struct::die_id, die_struct::die_mark, die_struct::die_offset, die_struct::die_tag, die_struct::die_symbol_or_type_node::die_type_node, dw2_asm_output_data(), dw2_asm_output_offset(), DWARF_INITIAL_LENGTH_SIZE, FOR_EACH_VEC_ELT, gcc_assert, i, include_pubname_in_output(), names, next_die_offset, NULL, output_pubname(), pubname_table, pubtype_table, size_of_pubnames(), comdat_type_node::skeleton_die, and XCOFF_DEBUGGING_INFO.
Referenced by output_pubtables().
|
static |
Output public names and types tables if necessary.
References debug_pubnames_section, debug_pubtypes_section, info_section_emitted, output_pubnames(), pubname_table, pubtype_table, switch_to_section(), and want_pubnames().
|
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, HOST_WIDE_INT_PRINT_HEX, r, ranges_section_label, RELOCATED_OFFSET, and rnglist_idx.
Referenced by output_die().
|
static |
Emit .debug_ranges section.
References asm_out_file, ASM_OUTPUT_LABEL, begin(), BLOCK_BEGIN_LABEL, BLOCK_END_LABEL, debug_ranges_section, dw2_asm_output_addr(), dw2_asm_output_data(), dw2_asm_output_delta(), DWARF2_ADDR_SIZE, end(), FOR_EACH_VEC_SAFE_ELT, gcc_unreachable, have_multiple_function_sections, i, MAX_ARTIFICIAL_LABEL_BYTES, NULL, r, ranges_by_label, ranges_section_label, ranges_table, switch_to_section(), and text_section_label.
Emit .debug_rnglists or (when DWO is true) .debug_rnglists.dwo section.
References asm_out_file, ASM_OUTPUT_LABEL, BLOCK_BEGIN_LABEL, BLOCK_END_LABEL, debug_ranges_dwo_section, debug_ranges_section, DEBUG_RANGES_SECTION_LABEL, dw2_asm_output_addr(), dw2_asm_output_data(), dw2_asm_output_data_uleb128(), dw2_asm_output_delta(), dw2_asm_output_delta_uleb128(), DW_RANGES_IDX_SKELETON, DWARF2_ADDR_SIZE, DWARF_INITIAL_LENGTH_SIZE, FOR_EACH_VEC_SAFE_ELT, gcc_unreachable, have_multiple_function_sections, i, MAX_ARTIFICIAL_LABEL_BYTES, NULL, output_dwarf_version(), r, ranges_base_label, ranges_section_label, ranges_table, rnglist_idx, switch_to_section(), text_section_label, and use_distinct_base_address_for_range().
|
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().
|
static |
Output skeleton debug sections that point to the dwo file.
References asm_out_file, ASM_OUTPUT_LABEL, debug_skeleton_abbrev_section, debug_skeleton_abbrev_section_label, debug_skeleton_info_section, debug_skeleton_info_section_label, die_struct::die_abbrev, dw2_asm_output_data(), dw2_asm_output_offset(), DWARF2_ADDR_SIZE, DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE, DWARF_INITIAL_LENGTH_SIZE, i, NULL, output_die(), output_die_abbrevs(), output_dwarf_version(), remove_AT(), size_of_die(), SKELETON_COMP_DIE_ABBREV, and switch_to_section().
|
static |
Output the encoding of an attribute value.
References a, dw2_asm_output_data_uleb128(), dwarf_form_name(), and value_format().
Referenced by output_die_abbrevs().
|
static |
Output the offset into the debug_loc section.
References a, AT_loc_list_ptr(), debug_loc_section, dw2_asm_output_delta(), dw2_asm_output_offset(), dwarf_attr_name(), gcc_assert, and loc_section_label.
Referenced by output_die().
|
static |
Return true iff DECL overrides (presumably completes) the type of OLD_DIE within CONTEXT_DIE.
|
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_node::dw_val_struct_union::dw_val_die_union::die, dw_loc_descr_node::dw_loc_oprnd1, dw_val_class_decl_ref, dw_val_class_die_ref, dw_val_node::dw_val_struct_union::dw_val_die_union::external, gcc_assert, lookup_decl_die(), new_loc_descr(), NULL, TREE_CODE, dw_val_node::v, dw_val_node::val_class, dw_val_node::dw_val_struct_union::val_decl_ref, and dw_val_node::dw_val_struct_union::val_die_ref.
Referenced by mem_loc_descriptor().
|
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_loc_descr_node::dw_loc_oprnd1, dw_val_class_loc, GET_CODE, GET_MODE, 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 |
Mark all members of types_used_by_vars_entry as perennial.
References gcc_assert, NULL, and types_used_by_vars_entry::type.
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(), and cgraph_function_possibly_inlined_p().
|
static |
Mark all members of used_types_hash as perennial.
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.
References cgraph_function_possibly_inlined_p(), DECL_DECLARED_INLINE_P, get_AT(), and NULL.
|
static |
Mark all variables used by the symtab as perennial.
References NULL.
|
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().
|
static |
|
static |
Print the information associated with a given DIE, and its children. This routine is a debugging aid only.
References a, die_struct::comdat_type_p, die_struct::die_abbrev, die_struct::die_attr, die_struct::die_child, die_struct::die_id, die_struct::die_mark, die_struct::die_offset, die_struct::die_tag, die_struct::die_symbol_or_type_node::die_type_node, dwarf_attr_name(), dwarf_tag_name(), FOR_EACH_CHILD, FOR_EACH_VEC_SAFE_ELT, NULL, print_attribute(), print_die(), print_indent, print_signature(), print_spaces(), and comdat_type_node::signature.
Referenced by debug(), debug_dwarf(), debug_dwarf_die(), and print_die().
|
inlinestatic |
References HOST_WIDE_INT_PRINT_DEC, HOST_WIDE_INT_PRINT_UNSIGNED, dw_discr_value::pos, dw_discr_value::sval, dw_discr_value::uval, and dw_discr_value::v.
Referenced by print_dw_val().
|
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(), 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().
|
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(), NULL, print_dw_val(), and print_spaces().
Referenced by debug_dwarf_loc_descr(), and print_dw_val().
|
inlinestatic |
Print a type signature in hex.
References DWARF_TYPE_SIGNATURE_SIZE, and i.
Referenced by print_die(), and print_dw_val().
|
inlinestatic |
Indent the line the number of spaces given by print_indent.
References print_indent.
Referenced by print_die(), and print_loc_descr().
|
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 DINFO_LEVEL_TERSE.
Referenced by is_redundant_typedef().
|
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, and DWARF_INITIAL_LENGTH_SIZE.
Referenced by move_linkage_attr().
|
static |
Remove dies representing declarations that we never use.
References NULL.
|
static |
Mark DIE as being used. If DOKIDS is true, then walk down to DIE's children.
References a, AT_ref(), and dw_val_class_str.
|
static |
Mark the generic parameters and arguments children DIEs of DIE.
References a, AT_loc(), AT_loc_list(), dw_val_class_die_ref, dw_val_class_loc, dw_val_class_loc_list, dw_val_class_view_list, NULL, and prune_unused_types_walk_loc_descr().
|
static |
Remove from the tree DIE any dies that aren't marked.
References a, AT_class(), debug_str_hash, DEBUG_STR_SECTION_FLAGS, die_struct::die_attr, dw_val_class_str, FOR_EACH_VEC_SAFE_ELT, indirect_string_node::form, gcc_assert, NULL, indirect_string_node::refcount, SECTION_MERGE, and indirect_string_node::str.
|
static |
Increment the string counts on strings referred to from DIE's attributes.
References die_struct::die_parent, die_struct::die_tag, and get_AT().
|
static |
Walk the tree DIE and mark types that we actually use.
References prune_unused_types_walk().
Referenced by mark_removed(), and prune_unused_types_walk().
|
static |
Given DIE that we're marking as used, find any other dies it references as attributes and mark them as used.
References dw_val_node::dw_val_struct_union::dw_val_die_union::die, dw_loc_descr_node::dw_loc_oprnd1, dw_val_class_die_ref, dw_val_node::dw_val_struct_union::dw_val_die_union::external, lookup_decl_die(), NULL, dw_val_node::v, dw_val_node::val_class, dw_val_node::dw_val_struct_union::val_decl_ref, and dw_val_node::dw_val_struct_union::val_die_ref.
|
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.
References DWARF2_ADDR_SIZE.
Referenced by prune_unused_types_mark_generic_parms_dies().
|
static |
For local classes, look if any static member functions were emitted and if so, mark them.
References class_scope_p(), and get_AT_flag().
|
static |
Add OPCODE+VAL as an entry at the end of the opcode array in TABLE.
|
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(), i, NULL, qualified_die_p(), and vec_safe_length().
Referenced by modified_type_die(), and qualified_die_p().
|
static |
Determine what tag to use for a record type.
References add_abstract_origin_attribute(), add_AT_lbl_id(), add_name_and_src_coords_attributes(), add_type_attribute(), DECL_ABSTRACT_P, decl_ultimate_origin(), equate_decl_number_to_die(), new_die(), NULL, TREE_TYPE, and TYPE_UNQUALIFIED.
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(), NULL_TREE, symtab, TREE_ASM_WRITTEN, TREE_CODE, TREE_PUBLIC, TREE_USED, and VAR_P.
Referenced by rtl_for_decl_init().
|
static |
Return a location descriptor that designates a machine register or zero if there is none.
References add_loc_descr(), arg_pointer_rtx, debugger_reg_number(), eliminate_regs(), frame_pointer_rtx, GET_MODE, IGNORED_DWARF_REGNUM, initialized, ira_use_lra_p, lra_eliminate_regs(), mem_loc_descriptor(), multiple_reg_loc_descriptor(), new_loc_descr(), NULL, NULL_RTX, one_reg_loc_descriptor(), REG_NREGS, REGNO, and targetm.
Referenced by gen_const_die(), and loc_descriptor().
|
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, addr_table_entry::index, NO_INDEX_ASSIGNED, and addr_table_entry::refcount.
Referenced by remove_loc_list_addr_table_entries().
|
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, and FOR_EACH_VEC_SAFE_ELT.
Referenced by add_data_member_location_attribute(), copy_declaration_context(), generate_skeleton_bottom_up(), and output_skeleton_debug_sections().
|
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(), die_struct::comdat_type_p, copy_declaration_context(), die_struct::die_id, die_struct::die_symbol_or_type_node::die_type_node, generate_skeleton(), NULL, remove_child_with_prev(), and replace_child().
Referenced by break_out_comdat_types().
|
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().
|
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().
|
static |
Given a location list, remove all addresses it refers to from the address_table.
References dw_loc_descr_node::dw_loc_next, dw_loc_descr_node::dw_loc_oprnd1, gcc_assert, addr_table_entry::index, NO_INDEX_ASSIGNED, NULL, remove_addr_table_entry(), and dw_val_node::val_entry.
Referenced by dw_sra_loc_expr().
|
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, die_struct::die_sib, and remove_child_with_prev().
Referenced by splice_child_die().
|
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, and NULL.
Referenced by generate_skeleton_bottom_up(), and remove_child_or_replace_with_skeleton().
|
static |
Reset DIEs so we can output them again.
References add_child_die(), comp_unit_die(), die_struct::die_parent, get_AT_ref(), is_cu_die(), and seen_error().
Referenced by dwarf2out_finish().
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(), indirect_string_node::index, indirect_string_node::label, and NULL.
|
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(), new_loc_list(), NULL, dw_loc_list_struct::section, dw_loc_list_struct::vbegin, and dw_loc_list_struct::vend.
|
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, GET_CODE, size_int, string_cst_pool_decl(), TREE_TYPE, and XSTR.
|
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 resolve_args_picking_1().
Referenced by function_to_dwarf_procedure(), and lower_bound_default().
|
static |
Helper for resolve_args_picking: do the same but stop when coming across visited nodes. For each node we visit, register in FRAME_OFFSETS the frame offset *before* evaluating the corresponding operation.
References dwarf_procedure_info::args_count, dw_val_node::dw_val_struct_union::dw_val_die_union::die, dw_loc_descr_node::dw_loc_next, dw_loc_descr_node::dw_loc_opc, dw_loc_descr_node::dw_loc_oprnd1, dwarf_proc_stack_usage_map, dw_loc_descr_node::frame_offset_rel, gcc_assert, gcc_unreachable, hash_map< KeyId, Value, Traits >::get_or_insert(), NULL, resolve_args_picking_1(), dw_val_node::v, dw_val_node::dw_val_struct_union::val_die_ref, dw_val_node::dw_val_struct_union::val_loc, and dw_val_node::dw_val_struct_union::val_unsigned.
Referenced by resolve_args_picking(), and resolve_args_picking_1().
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.
References base_type_cmp(), base_types, and NULL.
Referenced by add_const_value_attribute(), and mem_loc_descriptor().
|
static |
Attempt to resolve DW_OP_GNU_variable_value using loc_list_from_tree.
|
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.
References debug_line_str_hash, debug_line_str_section, debug_str_hash, output_indirect_string(), and skeleton_debug_str_hash.
Referenced by note_variable_value_in_expr().
|
static |
Attempt to optimize DW_OP_GNU_variable_value refering to temporaries in the current function.
|
static |
Walk through the list of incomplete types again, trying once more to emit full debugging info for them.
References get_AT(), TREE_CODE, TYPE_REVERSE_STORAGE_ORDER, and TYPE_UNQUALIFIED.
|
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(), 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().
|
inlinestatic |
Return the result of rounding T up to ALIGN.
References wi::udiv_trunc().
Referenced by field_byte_offset().
Generate an RTL constant from a decl initializer INIT with decl type TYPE, for use in a later add_const_value_attribute call.
References AGGREGATE_TYPE_P, build_vector_from_ctor(), compare_tree_int(), CONSTANT_CLASS_P, CONSTRUCTOR_ELTS, expand_expr(), EXPAND_INITIALIZER, FOR_EACH_CONSTRUCTOR_VALUE, gcc_assert, GEN_INT, gen_rtx_MEM(), GET_MODE_SIZE(), ggc_strdup, initializer_constant_valid_p(), integer_zerop(), is_int_mode(), MEM_P, MEM_READONLY_P, NULL, NULL_RTX, reference_to_unused(), STRIP_NOPS, TREE_CODE, TREE_CONSTANT, tree_fits_shwi_p(), TREE_OPERAND, TREE_STRING_LENGTH, TREE_STRING_POINTER, tree_to_shwi(), TREE_TYPE, TYPE_DOMAIN, TYPE_MAX_VALUE, TYPE_MIN_VALUE, TYPE_MODE, VECTOR_MODE_P, and walk_tree.
Referenced by rtl_for_decl_location(), and tree_add_const_value_attribute().
Generate RTL for the variable DECL to represent its location.
References adjust_address_nv, avoid_constant_pool_reference(), byte_lowpart_offset(), const0_rtx, CONSTANT_P, DECL_ARG_TYPE, DECL_EXTERNAL, DECL_HARD_REGISTER, DECL_INCOMING_RTL, DECL_INITIAL, DECL_MODE, DECL_NAME, DECL_RTL_IF_SET, early_dwarf, gen_rtx_MEM(), get_address_mode(), GET_CODE, GET_MODE, GET_MODE_SIZE(), HARD_FRAME_POINTER_IS_ARG_POINTER, HARD_FRAME_POINTER_REGNUM, is_pseudo_reg(), known_le, known_lt, make_decl_rtl_for_debug(), MEM_P, NULL_RTX, plus_constant(), REG_P, REGNO, reload_completed, rtl_for_decl_init(), SCALAR_INT_MODE_P, SYMBOL_REF_DECL, targetm, TREE_CODE, TREE_STATIC, TREE_TYPE, TYPE_MODE, VAR_P, and XEXP.
Referenced by add_location_or_const_value_attribute(), and loc_list_from_tree_1().
|
static |
Do the attributes look the same?
References dw_attr_struct::dw_attr, dw_attr_struct::dw_attr_val, and same_dw_val_p().
Referenced by same_die_p().
|
static |
Do the dies look the same?
References die_struct::die_attr, die_struct::die_child, die_struct::die_mark, die_struct::die_sib, die_struct::die_tag, FOR_EACH_VEC_SAFE_ELT, same_attr_p(), same_die_p(), and vec_safe_length().
Referenced by same_die_p(), and same_dw_val_p().
|
static |
Do the values look the same?
References dw_vec_const::array, dw_val_node::dw_val_struct_union::dw_val_die_union::die, 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, GET_CODE, double_int::high, dw_vec_const::length, double_int::low, rtx_equal_p(), same_die_p(), same_loc_p(), indirect_string_node::str, dw_val_node::v, dw_val_node::dw_val_struct_union::val_addr, 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_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_loc, dw_val_node::dw_val_struct_union::val_offset, 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_vec, and dw_val_node::dw_val_struct_union::val_wide.
Referenced by same_attr_p(), and same_loc_p().
|
inlinestatic |
Do the location expressions look same?
References dw_loc_descr_node::dw_loc_opc, dw_loc_descr_node::dw_loc_oprnd1, dw_loc_descr_node::dw_loc_oprnd2, and same_dw_val_p().
Referenced by same_dw_val_p().
|
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.
References count, i, macinfo_table, and NULL.
|
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.
|
static |
Return location descriptor for signed comparison OP RTL.
References compare_loc_descriptor(), DWARF2_ADDR_SIZE, GET_MODE, GET_MODE_SIZE(), is_a(), mem_loc_descriptor(), NULL, scompare_loc_descriptor_narrow(), scompare_loc_descriptor_wide(), VAR_INIT_STATUS_INITIALIZED, and XEXP.
Referenced by mem_loc_descriptor().
|
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, dw_loc_descr_node::dw_loc_next, dw_loc_descr_node::dw_loc_opc, dw_loc_descr_node::dw_loc_oprnd1, DWARF2_ADDR_SIZE, GET_MODE_BITSIZE(), GET_MODE_MASK, GET_MODE_SIZE(), HOST_BITS_PER_WIDE_INT, int_loc_descriptor(), INTVAL, new_loc_descr(), NULL, shift, size_of_int_loc_descriptor(), UINTVAL, dw_val_node::v, dw_val_node::dw_val_struct_union::val_int, and XEXP.
Referenced by scompare_loc_descriptor().
|
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_node::dw_val_struct_union::dw_val_die_union::die, dw_loc_descr_node::dw_loc_oprnd1, dw_val_class_die_ref, dwarf_OP(), dw_val_node::dw_val_struct_union::dw_val_die_union::external, 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 scompare_loc_descriptor().
|
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().
|
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, section::common, crtl, current_function_decl, current_function_section(), DECL_EXTERNAL, DECL_SECTION_NAME, section_common::flags, in_cold_section_p, named_section::name, section::named, 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().
|
inlinestatic |
References a, AT_class(), dw_val_class_die_ref, gcc_assert, and i.
Referenced by build_abbrev_table().
|
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.
References DECL_NAME, NULL_TREE, TREE_CODE, and TREE_TYPE.
Referenced by dwarf2out_abstract_function().
|
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().
|
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, NULL_TREE, set_decl_origin_self(), and TREE_CODE.
Referenced by set_decl_origin_self().
|
static |
Call this function directly to bypass AT_string_form's logic to put the string inline in the die.
References dw2_string_counter, dwarf_FORM(), indirect_string_node::form, gcc_assert, indirect_string_node::index, indirect_string_node::label, MAX_ARTIFICIAL_LABEL_BYTES, NO_INDEX_ASSIGNED, and NOT_INDEXED.
Referenced by add_filepath_AT_string(), find_string_form(), output_line_string(), and output_macinfo().
|
static |
Force out any required namespaces to be able to output DECL, and return the new context_die for it, if it's changed.
|
static |
References DECL_IN_SYSTEM_HEADER, DECL_SOURCE_FILE, DINFO_LEVEL_TERSE, DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_NONE, DINFO_STRUCT_FILE_SYS, DUMP_GSTRUCT, lang_hooks_for_types::generic_p, matches_main_base(), NULL, TYPE_MAIN_VARIANT, TYPE_STUB_DECL, lang_hooks::types, and usage().
Referenced by gen_enumeration_type_die(), and gen_namelist_decl().
|
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(), is_declaration_die(), is_nested_in_subprogram(), and NULL.
Referenced by break_out_comdat_types().
|
inlinestatic |
References BITS_PER_WORD, DECL_ALIGN, and TREE_CODE.
Referenced by field_byte_offset().
|
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, TREE_CODE, and TYPE_ALIGN.
Referenced by field_byte_offset().
|
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, 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().
|
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().
|
static |
Return the size of the information in the .debug_aranges section.
References dw_fde_node::dw_fde_second_begin, DWARF2_ADDR_SIZE, DWARF_ARANGES_HEADER_SIZE, fde_vec, FOR_EACH_VEC_ELT, have_multiple_function_sections, dw_fde_node::ignored_debug, dw_fde_node::in_std_section, dw_fde_node::second_in_std_section, switch_cold_ranges, switch_text_ranges, and vec_safe_length().
Referenced by output_aranges().
|
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(), 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().
|
static |
Return the size of the value in a DW_AT_discr_list attribute.
References NULL, and size_of_discr_value().
Referenced by output_die(), size_of_die(), and value_format().
|
static |
Return the size of the value in a DW_AT_discr_value attribute.
References dw_discr_value::pos, size_of_sleb128(), size_of_uleb128(), dw_discr_value::sval, dw_discr_value::uval, and dw_discr_value::v.
Referenced by size_of_die(), and size_of_discr_list().
|
static |
Return size_of_locs (int_loc_descriptor (i)) without actually allocating it.
References clz_hwi(), ctz_hwi(), DWARF2_ADDR_SIZE, HOST_BITS_PER_WIDE_INT, i, r, size_of_int_loc_descriptor(), size_of_int_shift_loc_descriptor(), size_of_sleb128(), and size_of_uleb128().
Referenced by address_of_int_loc_descriptor(), int_loc_descriptor(), mem_loc_descriptor(), scompare_loc_descriptor_narrow(), size_of_int_loc_descriptor(), and size_of_int_shift_loc_descriptor().
|
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().
|
static |
Return the size of a location descriptor.
References dw_val_node::dw_val_struct_union::dw_val_die_union::die, 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_unsigned_const, dw_val_class_vec, dw_val_class_wide_int, DWARF2_ADDR_SIZE, DWARF_REF_SIZE, dw_vec_const::elt_size, gcc_assert, gcc_unreachable, get_base_type_offset(), get_full_len(), HOST_BITS_PER_DOUBLE_INT, HOST_BITS_PER_WIDE_INT, addr_table_entry::index, dw_vec_const::length, NO_INDEX_ASSIGNED, size_of_locs(), size_of_sleb128(), size_of_uleb128(), dw_val_node::v, dw_val_node::val_class, dw_val_node::dw_val_struct_union::val_die_ref, dw_val_node::val_entry, dw_val_node::dw_val_struct_union::val_int, dw_val_node::dw_val_struct_union::val_loc, dw_val_node::dw_val_struct_union::val_unsigned, dw_val_node::dw_val_struct_union::val_vec, and dw_val_node::dw_val_struct_union::val_wide.
Referenced by loc_list_from_tree_1(), and size_of_locs().
unsigned long size_of_locs | ( | dw_loc_descr_ref | loc | ) |
Return the size of a series of location descriptors.
References dw_loc_descr_node::dw_loc_addr, dw_loc_descr_node::dw_loc_next, dw_loc_descr_node::dw_loc_opc, NULL, and size_of_loc_descr().
Referenced by output_cfa_loc(), output_cfa_loc_raw(), output_die(), output_loc_operands(), size_of_die(), size_of_loc_descr(), skip_loc_list_entry(), and value_format().
|
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, i, include_pubname_in_output(), pubname_struct::name, and names.
Referenced by output_pubnames().
|
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 dw_loc_list_struct::begin, dw_loc_list_struct::end, dw_loc_list_struct::expr, dw_loc_list_struct::force, NULL, size_of_locs(), dw_loc_list_struct::vbegin, and dw_loc_list_struct::vend.
Referenced by flush_limbo_die_list(), and output_loc_list().
|
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(), and reparent_child().
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.
References GET_CODE, MEM_P, SYMBOL_REF_DECL, TREE_ASM_WRITTEN, and used_rtx_array.
Referenced by resolve_addr_in_expr().
|
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(), is_naming_typedef_decl(), TREE_CODE, and TYPE_NAME.
Referenced by force_decl_die(), and lookup_type_die_strip_naming_typedef().
|
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, int_size_in_bytes(), new_die(), NULL, size_in_bytes(), and TREE_TYPE.
Referenced by modified_type_die().
|
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(), IDENTIFIER_POINTER, NULL, PTR_SIZE, readonly_data_section, SECTION_WRITE, switch_to_section(), and targetm.
Referenced by switch_to_frame_table_section().
|
static |
Switch [BACK] to the eh or debug frame table section, depending on FOR_EH.
References DEBUG_FRAME_SECTION, debug_frame_section, get_section(), NULL, SECTION_DEBUG, switch_to_eh_frame_section(), and switch_to_section().
Referenced by output_call_frame_info(), and output_fde().
|
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(), new_die(), TREE_VEC_ELT, and TREE_VEC_LENGTH.
Referenced by gen_generic_params_dies().
|
static |
Try to handle TLS MEMs, for which mem_loc_descriptor on XEXP (mem, 0) failed.
References DECL_THREAD_LOCAL_P, get_base_address(), 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().
|
static |
Attach a DW_AT_const_value attribute to DIE. The value of the attribute is the const value T.
References add_AT_int(), add_AT_unsigned(), add_AT_vec(), add_const_value_attribute(), AGGREGATE_TYPE_P, CHAR_BIT, DECL_P, early_dwarf, error_mark_node, gcc_assert, ggc_cleared_vec_alloc(), ggc_free(), initializer_constant_valid_p(), int_size_in_bytes(), mangle_referenced_decls(), native_encode_initializer(), NULL, rtl_for_decl_init(), STRIP_NOPS, TREE_CODE, tree_fits_shwi_p(), tree_fits_uhwi_p(), TREE_OPERAND, tree_to_shwi(), tree_to_uhwi(), TREE_TYPE, TYPE_MODE, and walk_tree.
Referenced by gen_scheduled_generic_parms_dies(), and tree_add_const_value_attribute_for_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(), 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().
Return a reference to a type, with its const and volatile qualifiers removed.
References TREE_CODE, and TYPE_MAIN_VARIANT.
Referenced by modified_type_die().
|
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().
|
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_node::dw_val_struct_union::dw_val_die_union::die, dw_loc_descr_node::dw_loc_oprnd1, dw_val_class_die_ref, dwarf_OP(), dw_val_node::dw_val_struct_union::dw_val_die_union::external, mem_loc_descriptor(), new_loc_descr(), NULL, dw_val_node::v, dw_val_node::val_class, dw_val_node::dw_val_struct_union::val_die_ref, VAR_INIT_STATUS_INITIALIZED, and XEXP.
Referenced by mem_loc_descriptor().
|
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_node::dw_val_struct_union::dw_val_die_union::die, dw_loc_descr_node::dw_loc_oprnd1, dw_val_class_die_ref, dwarf_OP(), dw_val_node::dw_val_struct_union::dw_val_die_union::external, loc_list_from_tree(), new_loc_descr(), NULL, TREE_OPERAND, dw_val_node::v, dw_val_node::val_class, and dw_val_node::dw_val_struct_union::val_die_ref.
Referenced by loc_list_from_tree_1().
|
static |
Return location descriptor for unsigned comparison OP RTL.
References add_loc_descr(), compare_loc_descriptor(), CONST_INT_P, dw_loc_descr_node::dw_loc_next, dw_loc_descr_node::dw_loc_opc, dw_loc_descr_node::dw_loc_oprnd1, DWARF2_ADDR_SIZE, GET_MODE, GET_MODE_MASK, GET_MODE_SIZE(), int_loc_descriptor(), INTVAL, is_a(), mem_loc_descriptor(), new_loc_descr(), NULL, dw_val_node::v, dw_val_node::dw_val_struct_union::val_int, VAR_INIT_STATUS_INITIALIZED, and XEXP.
Referenced by mem_loc_descriptor().
|
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_loc_descr_node::dw_loc_oprnd1, dw_val_class_loc, gcc_unreachable, new_loc_descr(), dw_val_node::v, dw_val_node::val_class, and dw_val_node::dw_val_struct_union::val_loc.
Referenced by loc_list_from_uint_comparison().
|
static |
Likewise, for unsigned constants.
References DWARF2_ADDR_SIZE, HOST_BITS_PER_WIDE_INT, i, int_loc_descriptor(), INTTYPE_MAXIMUM, and new_loc_descr().
Referenced by loc_descr_plus_const(), and loc_list_from_tree_1().
|
static |
Clear the marks for a die, its children and referred dies.
References a, AT_class(), AT_ref(), die_struct::die_attr, die_struct::die_mark, dw_val_class_die_ref, FOR_EACH_CHILD, FOR_EACH_VEC_SAFE_ELT, and unmark_all_dies().
Referenced by compute_comp_unit_symbol(), generate_type_signature(), and unmark_all_dies().
|
static |
Clear the marks for a die and its children.
References die_struct::die_mark, FOR_EACH_CHILD, gcc_assert, unmark_dies(), and use_debug_types.
Referenced by copy_decls_for_unworthy_types(), output_comdat_type_unit(), output_comp_unit(), and unmark_dies().
|
static |
Return true if it is beneficial to use DW_RLE_base_address{,x}. I is index of the following range.
References i, dw_ranges::label, dw_ranges::maybe_new_sec, NULL, dw_ranges::num, ranges_table, and vec_safe_length().
Referenced by index_rnglists(), and output_rnglists().
If TYPE involves a function-local type (including a local typedef to a non-local type), returns that type; otherwise returns NULL_TREE.
References comp_unit_die(), current_function_funcdef_no, and PROLOGUE_END_LABEL.
Referenced by class_scope_p().
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.
|
static |
Select the encoding of an attribute value.
References a, AT_class(), AT_discr_list(), AT_index(), AT_loc(), AT_loc_list(), AT_ref(), AT_ref_external(), AT_string_form(), AT_unsigned(), constant_size(), DW_FORM_data, DW_FORM_ref, 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(), gcc_assert, gcc_unreachable, get_full_len(), HOST_BITS_PER_WIDE_INT, maybe_emit_file(), NOT_INDEXED, RELOCATED_OFFSET, rnglist_idx, size_of_discr_list(), size_of_locs(), and symview_upper_bound.
Referenced by build_abbrev_table(), output_die_abbrevs(), output_value_format(), and size_of_die().
|
static |
Note in all location lists that text section has changed.
References asm_out_file, BLOCK_INLINE_ENTRY_LABEL, and cur_line_info_table.
Referenced by dwarf2out_switch_text_section().
int var_location_switch_text_section_1 | ( | var_loc_list ** | slot, |
void * | ) |
Note in one location list that text section has changed.
References inline_entry_data_table.
DEBUG_FUNCTION void verify_die | ( | dw_die_ref | die | ) |
Verify the DIE tree structure.
References DEBUG_FUNCTION, die_struct::die_child, die_struct::die_mark, die_struct::die_parent, die_struct::die_sib, gcc_assert, NULL, and verify_die().
Referenced by verify_die().
|
inlinestatic |
Return the location attribute value associated with a view list attribute value.
References AT_class(), dw_attr_struct::dw_attr_val, dw_val_class_loc_list, dw_val_class_view_list, gcc_assert, gcc_checking_assert, get_AT(), NULL, dw_val_node::v, dw_val_node::val_class, and dw_val_node::dw_val_struct_union::val_view_list.
Referenced by print_dw_val().
|
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, and targetm.
Referenced by add_AT_pubnames(), add_pubname(), add_pubtype(), and output_pubtables().
|
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(), dwarf2out_assembly_start(), optimize_abbrev_table(), output_abbrev_section(), and output_comp_unit().
|
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().
|
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().
|
static |
Referenced by output_compilation_unit_header().
|
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().
|
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().
|
static |
The DIE for C++14 'auto' in a function return type.
Referenced by gen_block_die().
|
static |
Referenced by calc_base_type_die_sizes(), and resolve_one_addr().
|
static |
Table of cached location lists.
Referenced by add_location_or_const_value_attribute(), and dwarf2out_assembly_start().
|
static |
Referenced by dwarf2out_end_epilogue().
|
static |
|
static |
Head and tail of call_arg_loc chain.
Referenced by gen_field_die().
|
static |
Number of call sites in the current function.
Referenced by find_empty_loc_ranges_at_text_label().
|
static |
Referenced by output_aranges().
|
static |
The default cold text section.
Referenced by dwarf2out_begin_prologue(), dwarf2out_switch_text_section(), and find_empty_loc_ranges_at_text_label().
|
static |
Referenced by find_empty_loc_ranges_at_text_label(), and output_aranges().
|
static |
Referenced by output_line_info().
|
static |
A list of type DIEs that have been separated into comdat sections.
Referenced by break_out_comdat_types(), and move_linkage_attr().
|
static |
A hash table of references to DIE's that describe COMMON blocks. The key is DECL_UID() ^ die_parent.
|
static |
A list of CU DIEs that have been separated.
|
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 dwarf2out_size_function(), find_empty_loc_ranges_at_text_label(), and var_location_switch_text_section().
|
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().
|
static |
Referenced by output_compilation_unit_header().
|
static |
|
static |
Referenced by add_top_level_skeleton_die_attrs().
|
static |
|
static |
Referenced by output_die(), output_fde(), and switch_to_frame_table_section().
|
static |
Pointers to various DWARF2 sections.
Referenced by output_aranges(), output_comp_unit(), output_die(), output_loc_operands(), and output_pubnames().
|
static |
Referenced by get_ref_die_offset_label(), output_aranges(), output_comp_unit(), and output_pubnames().
|
static |
Referenced by output_die().
|
static |
Referenced by dwarf2out_cc_finalize(), and variable_value_hasher::equal().
|
static |
Referenced by add_filepath_AT_string(), output_line_string(), and resolve_variable_value_in_expr().
|
static |
Referenced by output_die(), output_line_string(), and resolve_variable_value_in_expr().
|
static |
Referenced by output_die(), output_loc_list_offset(), and output_view_list_offset().
|
static |
Referenced by dwarf2out_cc_finalize(), and output_die().
|
static |
|
static |
Referenced by output_pubtables().
|
static |
Referenced by output_pubtables().
|
static |
Referenced by output_rnglists().
|
static |
Referenced by output_range_list_offset(), output_ranges(), and output_rnglists().
|
static |
Referenced by output_skeleton_debug_sections().
|
static |
Referenced by output_skeleton_debug_sections().
|
static |
Referenced by output_aranges(), output_pubnames(), and output_skeleton_debug_sections().
|
static |
Referenced by output_aranges(), output_pubnames(), and output_skeleton_debug_sections().
|
static |
Referenced by variable_value_hasher::equal().
|
static |
Referenced by variable_value_hasher::equal().
|
static |
|
static |
Referenced by find_AT_string(), output_addr_table_entry(), prune_unused_types_prune(), and resolve_variable_value_in_expr().
|
static |
Referenced by output_addr_table_entry().
|
static |
Referenced by find_string_form(), optimize_macinfo_range(), output_die(), and output_macinfo().
|
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 dwarf2out_assembly_start(), equate_decl_number_to_die(), and lookup_decl_die().
|
static |
Table of decl location linked lists.
Referenced by add_var_loc_to_decl(), dwarf2out_assembly_start(), and lookup_decl_loc().
|
static |
The DIE for C++14 'decltype(auto)' in a function return type.
Referenced by gen_block_die().
|
static |
A list of DIEs for which we may have to generate DW_AT_{,MIPS_}linkage_name once their DECL_ASSEMBLER_NAMEs are set.
|
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().
Whether an eh_frame section is required.
Referenced by dwarf2out_begin_prologue(), and dwarf2out_frame_finish().
|
static |
Referenced by set_indirect_string().
const struct gcc_debug_hooks dwarf2_debug_hooks |
The debug hooks structure.
Referenced by process_options().
const struct gcc_debug_hooks dwarf2_lineno_debug_hooks |
Referenced by process_options().
|
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 dwarf2out_assembly_start(), function_to_dwarf_procedure(), and resolve_args_picking_1().
|
static |
Referenced by modified_type_die(), and qualified_die_p().
|
static |
Referenced by modified_type_die(), and qualified_die_p().
|
static |
Set to TRUE while dwarf2out_early_global_decl is running.
Referenced by add_call_src_coords_attributes(), add_location_or_const_value_attribute(), dwarf2out_set_name(), is_redundant_typedef(), loc_list_from_tree_1(), new_die(), rtl_for_decl_location(), set_early_dwarf::set_early_dwarf(), tree_add_const_value_attribute(), and set_early_dwarf::~set_early_dwarf().
|
static |
Referenced by set_early_dwarf::set_early_dwarf().
|
static |
|
static |
Referenced by dwarf2out_alloc_current_fde(), output_aranges(), output_call_frame_info(), and size_of_aranges().
|
static |
Filenames referenced by this compilation unit.
Referenced by maybe_emit_file(), and output_file_names().
|
static |
One above highest N where .LVLN label might be equal to .Ltext0 label.
Referenced by dwarf2out_register_main_translation_unit().
|
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().
|
static |
Referenced by based_loc_descr(), and compute_frame_pointer_to_fb_displacement().
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.
|
static |
Whether we have location lists that need outputting
Referenced by add_AT_loc_list(), and add_AT_view_list().
True if the compilation unit places functions in more than one section.
Referenced by dwarf2out_register_main_translation_unit(), dwarf2out_switch_text_section(), find_empty_loc_ranges_at_text_label(), index_rnglists(), output_aranges(), output_loc_list(), output_ranges(), output_rnglists(), and size_of_aranges().
True if before or during processing of the first function being emitted.
True if currently in text section.
Referenced by dwarf2out_begin_prologue(), dwarf2out_switch_text_section(), and mark_ignored_debug_section().
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.
Referenced by dwarf2out_assembly_start(), gen_enumeration_type_die(), and gen_typedef_die().
|
static |
A flag to tell pubnames/types export if there is an info section to refer to.
Referenced by variable_value_hasher::equal(), output_comp_unit(), and output_pubtables().
|
static |
As init_sections_and_labels may get called multiple times, have a generation count for labels.
|
static |
Inlined entry points pending DIE creation in this compilation unit.
Referenced by var_location_switch_text_section_1().
|
static |
Number of internal labels generated by gen_internal_sym().
Referenced by dwarf2out_set_ignored_loc(), gen_internal_sym(), gen_label_rtx(), gen_llsym(), init_emit(), max_label_num(), and maybe_set_max_label_num().
|
static |
Referenced by mark_ignored_debug_section().
|
static |
The last file entry emitted by maybe_emit_file().
Referenced by generic_type_p(), output_file_names(), and output_index_string_offset().
|
static |
Last debug-on location in corresponding section.
Referenced by mark_ignored_debug_section().
|
static |
Referenced by dwarf2out_end_epilogue().
|
static |
A list of DIEs with a NULL parent waiting to be relocated.
Referenced by comdat_type_hasher::equal(), move_linkage_attr(), and new_die().
|
static |
A global counter for generating labels for line number data.
|
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().
|
static |
Referenced by output_loc_list_offset(), output_loclists_offsets(), and output_view_list_offset().
|
static |
Unique label counter.
|
static |
Referenced by init_sections_and_labels().
|
static |
Referenced by dwarf2out_cc_finalize().
|
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_assembly_start(), dwarf2out_cc_finalize(), dwarf2out_define(), dwarf2out_undef(), macinfo_entry_hasher::hash(), output_macinfo(), output_macinfo_op(), and save_macinfo_strings().
Temporary holder for dwarf2out_register_main_translation_unit. Used to let front-ends register a translation unit even before dwarf2out_init is called.
Referenced by dwarf2out_assembly_start().
True if loc_note during dwarf2out_var_location call might still be before first real instruction at address equal to .Ltext0.
|
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().
|
static |
Referenced by output_line_info().
|
static |
Unique label counter for point-of-call tables.
|
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().
|
static |
|
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(), dwarf2out_assembly_start(), include_pubname_in_output(), output_pubnames(), and output_pubtables().
|
static |
A pointer to the base of a table that contains a list of publicly accessible types.
Referenced by add_pubtype(), dwarf2out_assembly_start(), output_pubnames(), and output_pubtables().
|
static |
Referenced by output_rnglists().
|
static |
Vector of pairs of labels referenced in ranges_table.
Referenced by add_ranges_by_labels(), and output_ranges().
|
static |
Referenced by output_range_list_offset(), output_ranges(), and output_rnglists().
Vector of dies for which we should generate .debug_ranges info.
Referenced by add_ranges_num(), gen_lexical_block_die(), index_rnglists(), note_rnglist_head(), output_ranges(), output_rnglists(), and use_distinct_base_address_for_range().
|
static |
.debug_rnglists next index.
Referenced by index_rnglists(), output_range_list_offset(), output_rnglists(), size_of_die(), and value_format().
|
static |
The set of all non-default tables of line number info.
Referenced by output_line_info().
|
static |
Record the root of the DIE's built for the current compilation unit.
Referenced by comp_unit_die().
|
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(), and resolve_variable_value_in_expr().
|
static |
Vector of all DIEs added with die_abbrev >= abbrev_opt_start.
Referenced by build_abbrev_table(), optimize_abbrev_table(), and optimize_implicit_const().
Referenced by mark_ignored_debug_section(), output_aranges(), and size_of_aranges().
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().
|
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().
|
static |
Number of tail call sites in the current function.
Referenced by find_empty_loc_ranges_at_text_label().
|
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().
|
static |
Referenced by output_aranges(), output_ranges(), output_rnglists(), and secname_for_decl().
|
static |
The two default tables of line number info.
Referenced by output_line_info().
|
static |
Array of RTXes referenced by the debugging information, which therefore must be kept around forever.
Referenced by add_const_value_attribute(), AT_discr_list(), dwarf2out_assembly_start(), loc_descriptor(), mem_loc_descriptor(), optimize_one_addr_into_implicit_ptr(), and string_cst_pool_decl().
|
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.
|
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.