Lines Matching defs:die

2738 	  dw_die_ref die;
3749 #define FOR_EACH_CHILD(die, c, expr) do { \
3750 c = die->die_child; \
3754 } while (c != die->die_child); \
3761 dw_die_ref die;
3771 /* The limbo die list structure. */
3774 dw_die_ref die;
4891 add_dwarf_attr (dw_die_ref die, dw_attr_ref attr)
4894 if (die == NULL)
4897 if (die->die_attr == NULL)
4898 die->die_attr = VEC_alloc (dw_attr_node, gc, 1);
4899 VEC_safe_push (dw_attr_node, gc, die->die_attr, attr);
4911 add_AT_flag (dw_die_ref die, enum dwarf_attribute attr_kind, unsigned int flag)
4918 add_dwarf_attr (die, &attr);
4931 add_AT_int (dw_die_ref die, enum dwarf_attribute attr_kind, HOST_WIDE_INT int_val)
4938 add_dwarf_attr (die, &attr);
4951 add_AT_unsigned (dw_die_ref die, enum dwarf_attribute attr_kind,
4959 add_dwarf_attr (die, &attr);
4972 add_AT_long_long (dw_die_ref die, enum dwarf_attribute attr_kind,
4981 add_dwarf_attr (die, &attr);
4987 add_AT_vec (dw_die_ref die, enum dwarf_attribute attr_kind,
4997 add_dwarf_attr (die, &attr);
5018 add_AT_string (dw_die_ref die, enum dwarf_attribute attr_kind, const char *str)
5039 add_dwarf_attr (die, &attr);
5089 add_AT_die_ref (dw_die_ref die, enum dwarf_attribute attr_kind, dw_die_ref targ_die)
5095 attr.dw_attr_val.v.val_die_ref.die = targ_die;
5097 add_dwarf_attr (die, &attr);
5104 add_AT_specification (dw_die_ref die, dw_die_ref targ_die)
5106 add_AT_die_ref (die, DW_AT_specification, targ_die);
5108 targ_die->die_definition = die;
5115 return a->dw_attr_val.v.val_die_ref.die;
5137 add_AT_fde_ref (dw_die_ref die, enum dwarf_attribute attr_kind, unsigned int targ_fde)
5144 add_dwarf_attr (die, &attr);
5150 add_AT_loc (dw_die_ref die, enum dwarf_attribute attr_kind, dw_loc_descr_ref loc)
5157 add_dwarf_attr (die, &attr);
5168 add_AT_loc_list (dw_die_ref die, enum dwarf_attribute attr_kind, dw_loc_list_ref loc_list)
5175 add_dwarf_attr (die, &attr);
5189 add_AT_addr (dw_die_ref die, enum dwarf_attribute attr_kind, rtx addr)
5196 add_dwarf_attr (die, &attr);
5211 add_AT_file (dw_die_ref die, enum dwarf_attribute attr_kind,
5219 add_dwarf_attr (die, &attr);
5234 add_AT_lbl_id (dw_die_ref die, enum dwarf_attribute attr_kind, const char *lbl_id)
5241 add_dwarf_attr (die, &attr);
5248 add_AT_lineptr (dw_die_ref die, enum dwarf_attribute attr_kind,
5256 add_dwarf_attr (die, &attr);
5263 add_AT_macptr (dw_die_ref die, enum dwarf_attribute attr_kind,
5271 add_dwarf_attr (die, &attr);
5277 add_AT_offset (dw_die_ref die, enum dwarf_attribute attr_kind,
5285 add_dwarf_attr (die, &attr);
5291 add_AT_range_list (dw_die_ref die, enum dwarf_attribute attr_kind,
5299 add_dwarf_attr (die, &attr);
5314 get_AT (dw_die_ref die, enum dwarf_attribute attr_kind)
5320 if (! die)
5323 for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++)
5341 get_AT_low_pc (dw_die_ref die)
5343 dw_attr_ref a = get_AT (die, DW_AT_low_pc);
5353 get_AT_hi_pc (dw_die_ref die)
5355 dw_attr_ref a = get_AT (die, DW_AT_high_pc);
5364 get_AT_string (dw_die_ref die, enum dwarf_attribute attr_kind)
5366 dw_attr_ref a = get_AT (die, attr_kind);
5375 get_AT_flag (dw_die_ref die, enum dwarf_attribute attr_kind)
5377 dw_attr_ref a = get_AT (die, attr_kind);
5386 get_AT_unsigned (dw_die_ref die, enum dwarf_attribute attr_kind)
5388 dw_attr_ref a = get_AT (die, attr_kind);
5394 get_AT_ref (dw_die_ref die, enum dwarf_attribute attr_kind)
5396 dw_attr_ref a = get_AT (die, attr_kind);
5402 get_AT_file (dw_die_ref die, enum dwarf_attribute attr_kind)
5404 dw_attr_ref a = get_AT (die, attr_kind);
5466 remove_AT (dw_die_ref die, enum dwarf_attribute attr_kind)
5471 if (! die)
5474 for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++)
5483 VEC_ordered_remove (dw_attr_node, die->die_attr, ix);
5511 remove_child_TAG (dw_die_ref die, enum dwarf_tag tag)
5515 c = die->die_child;
5527 } while (c != die->die_child);
5533 add_child_die (dw_die_ref die, dw_die_ref child_die)
5536 if (! die || ! child_die)
5538 gcc_assert (die != child_die);
5540 child_die->die_parent = die;
5541 if (die->die_child)
5543 child_die->die_sib = die->die_child->die_sib;
5544 die->die_child->die_sib = child_die;
5548 die->die_child = child_die;
5589 dw_die_ref die = ggc_alloc_cleared (sizeof (die_node));
5591 die->die_tag = tag_value;
5594 add_child_die (parent_die, die);
5600 limbo_node->die = die;
5606 return die;
5744 print_die (dw_die_ref die, FILE *outfile)
5752 die->die_offset, dwarf_tag_name (die->die_tag));
5754 fprintf (outfile, " abbrev id: %lu", die->die_abbrev);
5755 fprintf (outfile, " offset: %lu\n", die->die_offset);
5757 for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++)
5801 fprintf (outfile, "die -> label: %s", AT_ref (a)->die_symbol);
5803 fprintf (outfile, "die -> %lu", AT_ref (a)->die_offset);
5806 fprintf (outfile, "die -> <null>");
5830 if (die->die_child != NULL)
5833 FOR_EACH_CHILD (die, c, print_die (c, outfile));
5864 debug_dwarf_die (dw_die_ref die)
5866 print_die (die, stderr);
5993 die_checksum (dw_die_ref die, struct md5_ctx *ctx, int *mark)
6000 if (die->die_mark)
6002 CHECKSUM (die->die_mark);
6005 die->die_mark = ++(*mark);
6007 CHECKSUM (die->die_tag);
6009 for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++)
6012 FOR_EACH_CHILD (die, c, die_checksum (c, ctx, mark));
6079 return same_die_p (v1->v.val_die_ref.die, v2->v.val_die_ref.die, mark);
6223 is_type_die (dw_die_ref die)
6225 switch (die->die_tag)
6304 assign_symbol_names (dw_die_ref die)
6308 if (is_symbol_die (die))
6316 die->die_symbol = xstrdup (p);
6319 die->die_symbol = gen_internal_sym ("LDIE");
6322 FOR_EACH_CHILD (die, c, assign_symbol_names (c));
6418 break_out_includes (dw_die_ref die)
6425 c = die->die_child;
6444 if (c == die->die_child)
6447 } while (c != die->die_child);
6455 assign_symbol_names (die);
6463 compute_section_prefix (node->die);
6464 is_dupl = check_duplicate_cu (node->die, cu_hash_table,
6466 assign_symbol_names (node->die);
6472 record_comdat_symbol_number (node->die, cu_hash_table,
6484 add_sibling_attributes (dw_die_ref die)
6488 if (! die->die_child)
6491 if (die->die_parent && die != die->die_parent->die_child)
6492 add_AT_die_ref (die, DW_AT_sibling, die->die_sib);
6494 FOR_EACH_CHILD (die, c, add_sibling_attributes (c));
6500 output_location_lists (dw_die_ref die)
6506 for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++)
6510 FOR_EACH_CHILD (die, c, output_location_lists (c));
6516 die are visited recursively. */
6519 build_abbrev_table (dw_die_ref die)
6529 for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++)
6545 if (abbrev->die_tag != die->die_tag)
6547 if ((abbrev->die_child != NULL) != (die->die_child != NULL))
6551 != VEC_length (dw_attr_node, die->die_attr))
6554 for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, die_a); ix++)
6582 abbrev_die_table[abbrev_id] = die;
6585 die->die_abbrev = abbrev_id;
6586 FOR_EACH_CHILD (die, c, build_abbrev_table (c));
6612 size_of_die (dw_die_ref die)
6618 size += size_of_uleb128 (die->die_abbrev);
6619 for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++)
6699 calc_die_sizes (dw_die_ref die)
6703 die->die_offset = next_die_offset;
6704 next_die_offset += size_of_die (die);
6706 FOR_EACH_CHILD (die, c, calc_die_sizes (c));
6708 if (die->die_child != NULL)
6713 /* Set the marks for a die and its children. We do this so
6719 mark_dies (dw_die_ref die)
6723 gcc_assert (!die->die_mark);
6725 die->die_mark = 1;
6726 FOR_EACH_CHILD (die, c, mark_dies (c));
6729 /* Clear the marks for a die and its children. */
6732 unmark_dies (dw_die_ref die)
6736 gcc_assert (die->die_mark);
6738 die->die_mark = 0;
6739 FOR_EACH_CHILD (die, c, unmark_dies (c));
6742 /* Clear the marks for a die, its children and referred dies. */
6745 unmark_all_dies (dw_die_ref die)
6751 if (!die->die_mark)
6753 die->die_mark = 0;
6755 FOR_EACH_CHILD (die, c, unmark_all_dies (c));
6757 for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++)
6938 output_die_symbol (dw_die_ref die)
6940 char *sym = die->die_symbol;
7063 output_die (dw_die_ref die)
7072 if (die->die_symbol)
7073 output_die_symbol (die);
7075 dw2_asm_output_data_uleb128 (die->die_abbrev, "(DIE (0x%lx) %s)",
7076 die->die_offset, dwarf_tag_name (die->die_tag));
7078 for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++)
7253 FOR_EACH_CHILD (die, c, output_die (c));
7256 if (die->die_child != NULL)
7258 die->die_offset);
7283 output_comp_unit (dw_die_ref die, int output_if_empty)
7289 if (!output_if_empty && die->die_child == NULL)
7297 mark_dies (die);
7299 build_abbrev_table (die);
7303 calc_die_sizes (die);
7305 oldsym = die->die_symbol;
7312 die->die_symbol = NULL;
7320 output_die (die);
7326 unmark_dies (die);
7327 die->die_symbol = oldsym;
7342 add_pubname (tree decl, dw_die_ref die)
7360 p->die = die;
7391 gcc_assert (pub->die->die_mark);
7393 dw2_asm_output_data (DWARF_OFFSET_SIZE, pub->die->die_offset,
7405 add_arange (tree decl, dw_die_ref die)
7420 arange_table[arange_table_in_use++] = die;
7469 dw_die_ref die = arange_table[i];
7472 gcc_assert (die->die_mark);
7474 if (die->die_tag == DW_TAG_subprogram)
7476 dw2_asm_output_addr (DWARF2_ADDR_SIZE, get_AT_low_pc (die),
7478 dw2_asm_output_delta (DWARF2_ADDR_SIZE, get_AT_hi_pc (die),
7479 get_AT_low_pc (die), "Length");
7486 dw_attr_ref a = get_AT (die, DW_AT_location);
7497 get_AT_unsigned (die, DW_AT_byte_size),
9705 add_AT_location_description (dw_die_ref die, enum dwarf_attribute attr_kind,
9709 add_AT_loc (die, attr_kind, descr);
9732 add_data_member_location_attribute (dw_die_ref die, tree decl)
9804 add_AT_loc (die, DW_AT_data_member_location, loc_descr);
9864 add_const_value_attribute (dw_die_ref die, rtx rtl)
9873 add_AT_int (die, DW_AT_const_value, val);
9875 add_AT_unsigned (die, DW_AT_const_value, (unsigned HOST_WIDE_INT) val);
9893 add_AT_vec (die, DW_AT_const_value, length / 4, 4, array);
9900 add_AT_long_long (die, DW_AT_const_value,
9970 add_AT_vec (die, DW_AT_const_value, length, elt_size, array);
9975 add_AT_string (die, DW_AT_const_value, XSTR (rtl, 0));
9981 add_AT_addr (die, DW_AT_const_value, rtl);
10371 add_location_or_const_value_attribute (dw_die_ref die, tree decl,
10444 add_AT_loc_list (die, attr, list);
10454 add_const_value_attribute (die, rtl);
10467 add_AT_location_description (die, attr, descr);
10477 add_AT_location_description (die, attr, descr);
10482 tree_add_const_value_attribute (die, decl);
10624 add_name_attribute (dw_die_ref die, const char *name_string)
10631 add_AT_string (die, DW_AT_name, name_string);
10638 add_comp_dir_attribute (dw_die_ref die)
10642 add_AT_string (die, DW_AT_comp_dir, wd);
10800 add_byte_size_attribute (dw_die_ref die, tree tree_node)
10830 add_AT_unsigned (die, DW_AT_byte_size, (size != (unsigned)-1 ? size : 0));
10850 add_bit_offset_attribute (dw_die_ref die, tree decl)
10890 add_AT_unsigned (die, DW_AT_bit_offset, bit_offset);
10897 add_bit_size_attribute (dw_die_ref die, tree decl)
10904 add_AT_unsigned (die, DW_AT_bit_size, tree_low_cst (DECL_SIZE (decl), 1));
10911 add_prototyped_attribute (dw_die_ref die, tree func_type)
10915 add_AT_flag (die, DW_AT_prototyped, 1);
10923 add_abstract_origin_attribute (dw_die_ref die, tree origin)
10954 than die, we'll just produce deficient debug info now, in that we will
10960 add_AT_die_ref (die, DW_AT_abstract_origin, origin_die);
10966 add_pure_or_virtual_attribute (dw_die_ref die, tree func_decl)
10970 add_AT_unsigned (die, DW_AT_virtuality, DW_VIRTUALITY_virtual);
10973 add_AT_loc (die, DW_AT_vtable_elem_location,
10980 add_AT_die_ref (die, DW_AT_containing_type,
10989 add_src_coords_attributes (dw_die_ref die, tree decl)
10993 add_AT_file (die, DW_AT_decl_file, lookup_filename (s.file));
10994 add_AT_unsigned (die, DW_AT_decl_line, s.line);
11001 add_name_and_src_coords_attributes (dw_die_ref die, tree decl)
11008 add_name_attribute (die, dwarf2_name (decl, 0));
11010 add_src_coords_attributes (die, decl);
11017 add_AT_string (die, DW_AT_MIPS_linkage_name,
11026 add_AT_addr (die, DW_AT_VMS_rtnbeg_pd_address,
11136 routine locates the proper "type descriptor" die for the type given
11137 by 'type', and adds a DW_AT_type attribute below the given die. */
11149 an Ada subrange type. Correct solution is emit a subrange type die. */
11170 /* Given an object die, add the calling convention attribute for the
11575 die for MEMBER, which has been defined; we will need to refer back
11670 dw_die_ref die;
11673 die = lookup_type_die (type);
11674 if (die != NULL)
11675 die->die_perennial_p = 1;
11770 declaration die was forced using force_decl_die(). In such
11771 cases die that forced declaration die (e.g. TAG_imported_module)
11822 Note that force_decl_die() forces function declaration die. It is
11866 { /* Do nothing for now; maybe need to duplicate die, one for
12162 add_call_src_coords_attributes (tree stmt, dw_die_ref die)
12166 add_AT_file (die, DW_AT_call_file, lookup_filename (s.file));
12167 add_AT_unsigned (die, DW_AT_call_line, s.line);
12174 add_high_low_attributes (tree stmt, dw_die_ref die)
12182 add_AT_range_list (die, DW_AT_ranges, add_ranges (stmt));
12197 add_AT_lbl_id (die, DW_AT_low_pc, label);
12200 add_AT_lbl_id (die, DW_AT_high_pc, label);
12227 a die whose origin die hasn't been emitted, and crashing. */
12253 when generating dies for the real variables, we'd die (pun
12292 /* Equate decl number to die, so that we can look up this decl later on. */
12350 dw_die_ref die;
12355 die = new_die (DW_TAG_compile_unit, NULL, NULL);
12359 add_name_attribute (die, filename);
12362 add_comp_dir_attribute (die);
12378 add_AT_string (die, DW_AT_producer, producer);
12399 add_AT_unsigned (die, DW_AT_language, language);
12400 return die;
12408 dw_die_ref die = new_die (DW_TAG_inheritance, context_die, binfo);
12410 add_type_attribute (die, BINFO_TYPE (binfo), 0, 0, context_die);
12411 add_data_member_location_attribute (die, binfo);
12414 add_AT_unsigned (die, DW_AT_virtuality, DW_VIRTUALITY_virtual);
12417 add_AT_unsigned (die, DW_AT_accessibility, DW_ACCESS_public);
12419 add_AT_unsigned (die, DW_AT_accessibility, DW_ACCESS_protected);
12933 dw_die_ref die;
12936 die = lookup_decl_die (decl);
12938 die = lookup_type_die (TREE_TYPE (decl));
12940 die = NULL;
12942 if (die != NULL && die->die_parent == NULL)
12943 add_child_die (context_die, die);
13000 /* Find die that represents this context. */
13018 declaration die. */
13026 /* Set external flag to force declaration die. Restore it after
13207 /* dwarf2out_abstract_function won't emit a die if this is just
13209 that case, because that works only if we have a die. */
13368 We need decl DIE for reference and scope die. First, get DIE for the decl
13371 /* Get the scope die for decl context. Use comp_unit_die for global module
13372 or decl. If die is not found for non globals, force new die. */
13413 /* OK, now we have DIEs for decl as well as scope. Emit imported die. */
13489 /* For local statics lookup proper context die. */
14019 verify_marks_clear (dw_die_ref die)
14023 gcc_assert (! die->die_mark);
14024 FOR_EACH_CHILD (die, c, verify_marks_clear (c));
14028 /* Clear the marks for a die and its children.
14032 prune_unmark_dies (dw_die_ref die)
14036 if (die->die_mark)
14037 die->die_mark = 0;
14038 FOR_EACH_CHILD (die, c, prune_unmark_dies (c));
14045 prune_unused_types_walk_attribs (dw_die_ref die)
14050 for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++)
14056 prune_unused_types_mark (a->dw_attr_val.v.val_die_ref.die, 1);
14070 prune_unused_types_mark (dw_die_ref die, int dokids)
14074 if (die->die_mark == 0)
14077 die->die_mark = 1;
14081 if (die->die_parent)
14082 prune_unused_types_mark (die->die_parent, 0);
14085 prune_unused_types_walk_attribs (die);
14089 if (get_AT_flag (die, DW_AT_declaration) && die->die_definition)
14090 prune_unused_types_mark (die->die_definition, 1);
14093 if (dokids && die->die_mark != 2)
14097 die->die_mark = 2;
14101 if (die->die_tag == DW_TAG_array_type)
14102 FOR_EACH_CHILD (die, c, prune_unused_types_mark (c, 1));
14104 FOR_EACH_CHILD (die, c, prune_unused_types_walk (c));
14112 prune_unused_types_walk (dw_die_ref die)
14117 if (die->die_mark)
14120 switch (die->die_tag) {
14140 if (die->die_perennial_p)
14151 die->die_mark = 1;
14154 prune_unused_types_walk_attribs (die);
14157 FOR_EACH_CHILD (die, c, prune_unused_types_walk (c));
14164 prune_unused_types_update_strings (dw_die_ref die)
14169 for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++)
14192 prune_unused_types_prune (dw_die_ref die)
14196 gcc_assert (die->die_mark);
14197 prune_unused_types_update_strings (die);
14199 if (! die->die_child)
14202 c = die->die_child;
14206 if (c == die->die_child)
14211 die->die_child = NULL;
14215 die->die_child = prev;
14223 } while (c != die->die_child);
14239 verify_marks_clear (node->die);
14245 prune_unused_types_walk (node->die);
14250 prune_unused_types_mark (pubname_table[i].die, 1);
14259 prune_unused_types_prune (node->die);
14264 prune_unmark_dies (node->die);
14289 dw_die_ref die = 0;
14304 /* Traverse the limbo die list, and add parent/child links. The only
14307 For concrete instances, we can get the parent die from the abstract
14312 die = node->die;
14314 if (die->die_parent == NULL)
14316 dw_die_ref origin = get_AT_ref (die, DW_AT_abstract_origin);
14319 add_child_die (origin->die_parent, die);
14320 else if (die == comp_unit_die)
14324 add_child_die (comp_unit_die, die);
14329 in the nested function die being orphaned. Likewise
14352 add_child_die (origin, die);
14354 add_child_die (comp_unit_die, die);
14377 add_sibling_attributes (node->die);
14409 output_location_lists (die);
14422 output_comp_unit (node->die, 0);