Lines Matching refs:cu

650 				    struct dwarf2_cu *cu,
655 struct dwarf2_cu *cu,
660 struct dwarf2_cu *cu,
666 struct dwarf2_cu *cu);
674 static void dwarf2_read_abbrevs (bfd *abfd, struct dwarf2_cu *cu);
728 static int die_is_declaration (struct die_info *, struct dwarf2_cu *cu);
737 bfd *abfd, struct dwarf2_cu *cu));
775 static void read_subrange_type (struct die_info *die, struct dwarf2_cu *cu);
807 static char *determine_class_name (struct die_info *die, struct dwarf2_cu *cu);
930 struct dwarf2_cu *cu);
1210 struct dwarf2_cu cu;
1213 cu.objfile = objfile;
1214 info_ptr = read_comp_unit_head (&cu.header, info_ptr, abfd);
1216 if (cu.header.version != 2)
1218 error ("Dwarf Error: wrong version in compilation unit header (is %d, should be %d) [in module %s]", cu.header.version, 2, bfd_get_filename (abfd));
1221 if (cu.header.abbrev_offset >= dwarf_abbrev_size)
1224 (long) cu.header.abbrev_offset,
1229 if (beg_of_comp_unit + cu.header.length + cu.header.initial_length_size
1233 (long) cu.header.length,
1239 cu.header.offset = beg_of_comp_unit - dwarf_info_buffer;
1240 cu.header.first_die_ptr = info_ptr;
1241 cu.header.cu_head_ptr = beg_of_comp_unit;
1243 cu.list_in_scope = &file_symbols;
1246 dwarf2_read_abbrevs (abfd, &cu);
1247 make_cleanup (dwarf2_empty_abbrev_table, cu.header.dwarf2_abbrevs);
1251 &cu);
1254 set_cu_language (comp_unit_die.language, &cu);
1293 &cu, NULL);
1322 info_ptr = beg_of_comp_unit + cu.header.length
1323 + cu.header.initial_length_size;
1337 CORE_ADDR *highpc, struct dwarf2_cu *cu,
1340 struct objfile *objfile = cu->objfile;
1354 info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu);
1378 add_partial_symbol (&pdi, cu, namespace);
1387 add_partial_symbol (&pdi, cu, namespace);
1394 info_ptr = add_partial_structure (&pdi, info_ptr, cu,
1402 info_ptr = add_partial_enumeration (&pdi, info_ptr, cu,
1411 add_partial_symbol (&pdi, cu, namespace);
1420 cu, namespace);
1440 info_ptr = locate_pdi_sibling (&pdi, info_ptr, abfd, cu);
1448 struct dwarf2_cu *cu, const char *namespace)
1450 struct objfile *objfile = cu->objfile;
1480 cu->language, objfile);
1490 cu->language, objfile);
1510 addr = decode_locdesc (pdi->locdesc, cu);
1516 cu->language, objfile);
1523 addr = decode_locdesc (pdi->locdesc, cu);
1530 cu->language, objfile);
1539 0, (CORE_ADDR) 0, cu->language, objfile);
1553 cu->language == language_cplus
1556 0, (CORE_ADDR) 0, cu->language, objfile);
1558 if (cu->language == language_cplus)
1564 0, (CORE_ADDR) 0, cu->language, objfile);
1570 cu->language == language_cplus
1573 0, (CORE_ADDR) 0, cu->language, objfile);
1585 if (cu->language == language_cplus
1624 struct dwarf2_cu *cu, const char *namespace)
1626 struct objfile *objfile = cu->objfile;
1648 0, 0, cu->language, objfile);
1653 info_ptr = scan_partial_symbols (info_ptr, lowpc, highpc, cu, full_name);
1662 struct dwarf2_cu *cu,
1665 bfd *abfd = cu->objfile->obfd;
1668 if (cu->language == language_cplus
1706 cu);
1719 abfd, cu);
1724 add_partial_symbol (struct_pdi, cu, namespace);
1727 return locate_pdi_sibling (struct_pdi, info_ptr, abfd, cu);
1734 struct dwarf2_cu *cu, const char *namespace)
1736 struct objfile *objfile = cu->objfile;
1741 add_partial_symbol (enum_pdi, cu, namespace);
1745 info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu);
1751 add_partial_symbol (&pdi, cu, namespace);
1762 bfd *abfd, struct dwarf2_cu *cu)
1782 info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu);
1787 info_ptr = locate_pdi_sibling (&pdi, info_ptr, abfd, cu);
1825 struct dwarf2_cu cu;
1863 cu.objfile = objfile;
1866 info_ptr = read_comp_unit_head (&cu.header, info_ptr, abfd);
1869 dwarf2_read_abbrevs (abfd, &cu);
1870 make_cleanup (dwarf2_empty_abbrev_table, cu.header.dwarf2_abbrevs);
1872 cu.header.offset = offset;
1874 cu.list_in_scope = &file_symbols;
1876 dies = read_comp_unit (info_ptr, abfd, &cu);
1886 cu.header.base_known = 0;
1887 cu.header.base_address = 0;
1889 attr = dwarf2_attr (dies, DW_AT_entry_pc, &cu);
1892 cu.header.base_address = DW_ADDR (attr);
1893 cu.header.base_known = 1;
1897 attr = dwarf2_attr (dies, DW_AT_low_pc, &cu);
1900 cu.header.base_address = DW_ADDR (attr);
1901 cu.header.base_known = 1;
1906 process_die (dies, &cu);
1911 get_scope_pc_bounds (dies, &lowpc, &highpc, &cu);
1919 && !(cu.language == language_c && symtab->language != language_c))
1921 symtab->language = cu.language;
1932 process_die (struct die_info *die, struct dwarf2_cu *cu)
1939 read_file_scope (die, cu);
1942 read_subroutine_type (die, cu);
1943 read_func_scope (die, cu);
1953 read_lexical_block_scope (die, cu);
1958 read_structure_type (die, cu);
1959 process_structure_scope (die, cu);
1962 read_enumeration_type (die, cu);
1963 process_enumeration_scope (die, cu);
1970 read_subroutine_type (die, cu);
1973 read_array_type (die, cu);
1976 read_tag_pointer_type (die, cu);
1979 read_tag_ptr_to_member_type (die, cu);
1983 read_tag_reference_type (die, cu);
1986 read_tag_string_type (die, cu);
1991 read_base_type (die, cu);
1994 new_symbol (die, die->type, cu);
1997 read_subrange_type (die, cu);
2000 new_symbol (die, die->type, cu);
2003 read_common_block (die, cu);
2009 read_namespace (die, cu);
2023 new_symbol (die, NULL, cu);
2029 initialize_cu_func_list (struct dwarf2_cu *cu)
2031 cu->first_fn = cu->last_fn = cu->cached_fn = NULL;
2035 read_file_scope (struct die_info *die, struct dwarf2_cu *cu)
2037 struct objfile *objfile = cu->objfile;
2038 struct comp_unit_head *cu_header = &cu->header;
2052 get_scope_pc_bounds (die, &lowpc, &highpc, cu);
2061 attr = dwarf2_attr (die, DW_AT_name, cu);
2066 attr = dwarf2_attr (die, DW_AT_comp_dir, cu);
2088 attr = dwarf2_attr (die, DW_AT_language, cu);
2091 set_cu_language (DW_UNSND (attr), cu);
2106 memset (cu->ftypes, 0, FT_NUM_MEMBERS * sizeof (struct type *));
2111 initialize_cu_func_list (cu);
2119 process_die (child_die, cu);
2125 attr = dwarf2_attr (die, DW_AT_stmt_list, cu);
2129 line_header = dwarf_decode_line_header (line_offset, abfd, cu);
2134 dwarf_decode_lines (line_header, comp_dir, abfd, cu);
2142 attr = dwarf2_attr (die, DW_AT_macro_info, cu);
2147 comp_dir, abfd, cu);
2154 struct dwarf2_cu *cu)
2166 if (cu->last_fn == NULL)
2167 cu->first_fn = thisfn;
2169 cu->last_fn->next = thisfn;
2171 cu->last_fn = thisfn;
2175 read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
2177 struct objfile *objfile = cu->objfile;
2190 name = dwarf2_linkage_name (die, cu);
2194 if (name == NULL || !dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu))
2197 if (cu->language == language_cplus)
2199 struct die_info *spec_die = die_specification (die, cu);
2225 char *specification_prefix = determine_prefix (spec_die, cu);
2235 add_to_cu_func_list (name, lowpc, highpc, cu);
2245 new->name = new_symbol (die, die->type, cu);
2249 attr = dwarf2_attr (die, DW_AT_frame_base, cu);
2260 dwarf2_symbol_mark_computed (attr, new->name, cu);
2262 cu->list_in_scope = &local_symbols;
2269 process_die (child_die, cu);
2289 cu->list_in_scope = &file_symbols;
2300 read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu)
2302 struct objfile *objfile = cu->objfile;
2315 if (!dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu))
2326 process_die (child_die, cu);
2345 CORE_ADDR *highpc, struct dwarf2_cu *cu)
2347 struct objfile *objfile = cu->objfile;
2348 struct comp_unit_head *cu_header = &cu->header;
2355 attr = dwarf2_attr (die, DW_AT_high_pc, cu);
2359 attr = dwarf2_attr (die, DW_AT_low_pc, cu);
2371 attr = dwarf2_attr (die, DW_AT_ranges, cu);
2400 marker = read_address (obfd, buffer, cu, &dummy);
2405 base = read_address (obfd, buffer + addr_size, cu, &dummy);
2417 range_beginning = read_address (obfd, buffer, cu, &dummy);
2419 range_end = read_address (obfd, buffer, cu, &dummy);
2435 base = read_address (obfd, buffer + addr_size, cu, &dummy);
2506 struct dwarf2_cu *cu)
2512 if (dwarf2_get_pc_bounds (die, &current_low, &current_high, cu))
2525 if (dwarf2_get_pc_bounds (child, &current_low, &current_high, cu))
2540 get_scope_pc_bounds (child, &current_low, &current_high, cu);
2565 struct dwarf2_cu *cu)
2567 struct objfile *objfile = cu->objfile;
2590 attr = dwarf2_attr (die, DW_AT_accessibility, cu);
2595 attr = dwarf2_attr (die, DW_AT_virtuality, cu);
2601 if (die->tag == DW_TAG_member && ! die_is_declaration (die, cu))
2606 fp->type = die_type (die, cu);
2611 attr = dwarf2_attr (die, DW_AT_bit_size, cu);
2622 attr = dwarf2_attr (die, DW_AT_data_member_location, cu);
2626 decode_locdesc (DW_BLOCK (attr), cu) * bits_per_byte;
2630 attr = dwarf2_attr (die, DW_AT_bit_offset, cu);
2653 attr = dwarf2_attr (die, DW_AT_byte_size, cu);
2675 attr = dwarf2_attr (die, DW_AT_name, cu);
2683 if (dwarf2_attr (die, DW_AT_artificial, cu))
2701 attr = dwarf2_attr (die, DW_AT_name, cu);
2708 physname = dwarf2_linkage_name (die, cu);
2712 FIELD_TYPE (*fp) = die_type (die, cu);
2719 attr = dwarf2_attr (die, DW_AT_data_member_location, cu);
2721 FIELD_BITPOS (*fp) = (decode_locdesc (DW_BLOCK (attr), cu)
2725 FIELD_TYPE (*fp) = die_type (die, cu);
2735 struct dwarf2_cu *cu)
2822 struct type *type, struct dwarf2_cu *cu)
2824 struct objfile *objfile = cu->objfile;
2834 attr = dwarf2_attr (die, DW_AT_name, cu);
2841 physname = dwarf2_linkage_name (die, cu);
2911 if (dwarf2_attr (die, DW_AT_containing_type, cu) != NULL)
2912 fnp->fcontext = die_containing_type (die, cu);
2918 attr = dwarf2_attr (die, DW_AT_accessibility, cu);
2933 attr = dwarf2_attr (die, DW_AT_artificial, cu);
2938 attr = dwarf2_attr (die, DW_AT_vtable_elem_location, cu);
2944 fnp->voffset = decode_locdesc (DW_BLOCK (attr), cu) + 2;
2962 struct dwarf2_cu *cu)
3009 read_structure_type (struct die_info *die, struct dwarf2_cu *cu)
3011 struct objfile *objfile = cu->objfile;
3023 attr = dwarf2_attr (die, DW_AT_name, cu);
3026 if (cu->language == language_cplus)
3028 char *new_prefix = determine_class_name (die, cu);
3056 attr = dwarf2_attr (die, DW_AT_byte_size, cu);
3071 if (die->child != NULL && ! die_is_declaration (die, cu))
3091 dwarf2_add_field (&fi, child_die, cu);
3096 read_type_die (child_die, cu);
3097 dwarf2_add_member_fn (&fi, child_die, type, cu);
3102 dwarf2_add_field (&fi, child_die, cu);
3109 dwarf2_attach_fields_to_type (&fi, type, cu);
3112 dwarf2_attach_fn_fields_to_type (&fi, type, cu);
3118 if (dwarf2_attr (die, DW_AT_containing_type, cu) != NULL)
3120 struct type *t = die_containing_type (die, cu);
3174 process_structure_scope (struct die_info *die, struct dwarf2_cu *cu)
3176 struct objfile *objfile = cu->objfile;
3199 process_die (child_die, cu);
3204 if (die->child != NULL && ! die_is_declaration (die, cu))
3205 new_symbol (die, die->type, cu);
3214 read_enumeration_type (struct die_info *die, struct dwarf2_cu *cu)
3216 struct objfile *objfile = cu->objfile;
3226 attr = dwarf2_attr (die, DW_AT_name, cu);
3246 attr = dwarf2_attr (die, DW_AT_byte_size, cu);
3264 determine_class_name (struct die_info *die, struct dwarf2_cu *cu)
3267 struct die_info *spec_die = die_specification (die, cu);
3275 char *specification_prefix = determine_prefix (spec_die, cu);
3294 (child, cu));
3304 const char *name = dwarf2_name (die, cu);
3322 process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu)
3324 struct objfile *objfile = cu->objfile;
3341 process_die (child_die, cu);
3345 attr = dwarf2_attr (child_die, DW_AT_name, cu);
3348 sym = new_symbol (child_die, die->type, cu);
3386 new_symbol (die, die->type, cu);
3394 read_array_type (struct die_info *die, struct dwarf2_cu *cu)
3396 struct objfile *objfile = cu->objfile;
3411 element_type = die_type (die, cu);
3417 index_type = dwarf2_fundamental_type (objfile, FT_INTEGER, cu);
3429 read_subrange_type (child_die, cu);
3461 attr = dwarf2_attr (die, DW_AT_GNU_vector, cu);
3474 read_common_block (struct die_info *die, struct dwarf2_cu *cu)
3481 attr = dwarf2_attr (die, DW_AT_location, cu);
3487 base = decode_locdesc (DW_BLOCK (attr), cu);
3504 sym = new_symbol (child_die, NULL, cu);
3505 attr = dwarf2_attr (child_die, DW_AT_data_member_location, cu);
3509 base + decode_locdesc (DW_BLOCK (attr), cu);
3520 read_namespace (struct die_info *die, struct dwarf2_cu *cu)
3522 struct objfile *objfile = cu->objfile;
3528 name = namespace_name (die, &is_anonymous, cu);
3553 if (dwarf2_extension (die, cu) == NULL)
3564 new_symbol (die, type, cu);
3579 process_die (child_die, cu);
3592 namespace_name (struct die_info *die, int *is_anonymous, struct dwarf2_cu *cu)
3601 current_die = dwarf2_extension (die, cu))
3603 name = dwarf2_name (current_die, cu);
3621 read_tag_pointer_type (struct die_info *die, struct dwarf2_cu *cu)
3623 struct comp_unit_head *cu_header = &cu->header;
3634 type = lookup_pointer_type (die_type (die, cu));
3636 attr_byte_size = dwarf2_attr (die, DW_AT_byte_size, cu);
3642 attr_address_class = dwarf2_attr (die, DW_AT_address_class, cu);
3678 read_tag_ptr_to_member_type (struct die_info *die, struct dwarf2_cu *cu)
3680 struct objfile *objfile = cu->objfile;
3691 to_type = die_type (die, cu);
3692 domain = die_containing_type (die, cu);
3702 read_tag_reference_type (struct die_info *die, struct dwarf2_cu *cu)
3704 struct comp_unit_head *cu_header = &cu->header;
3713 type = lookup_reference_type (die_type (die, cu));
3714 attr = dwarf2_attr (die, DW_AT_byte_size, cu);
3727 read_tag_unspecified_type (struct die_info *die, struct dwarf2_cu *cu)
3729 struct objfile *objfile = cu->objfile;
3740 attr = dwarf2_attr (die, DW_AT_name, cu);
3748 read_tag_const_type (struct die_info *die, struct dwarf2_cu *cu)
3757 base_type = die_type (die, cu);
3763 read_tag_volatile_type (struct die_info *die, struct dwarf2_cu *cu)
3772 base_type = die_type (die, cu);
3778 read_tag_restrict_type (struct die_info *die, struct dwarf2_cu *cu)
3787 base_type = die_type (die, cu);
3798 read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
3800 struct objfile *objfile = cu->objfile;
3810 attr = dwarf2_attr (die, DW_AT_string_length, cu);
3818 attr = dwarf2_attr (die, DW_AT_byte_size, cu);
3828 index_type = dwarf2_fundamental_type (objfile, FT_INTEGER, cu);
3830 if (cu->language == language_fortran)
3838 char_type = dwarf2_fundamental_type (objfile, FT_CHAR, cu);
3856 read_subroutine_type (struct die_info *die, struct dwarf2_cu *cu)
3867 type = die_type (die, cu);
3871 attr = dwarf2_attr (die, DW_AT_prototyped, cu);
3873 || cu->language == language_cplus)
3910 attr = dwarf2_attr (child_die, DW_AT_artificial, cu);
3915 TYPE_FIELD_TYPE (ftype, iparams) = die_type (child_die, cu);
3926 read_typedef (struct die_info *die, struct dwarf2_cu *cu)
3928 struct objfile *objfile = cu->objfile;
3934 attr = dwarf2_attr (die, DW_AT_name, cu);
3940 TYPE_TARGET_TYPE (die->type) = die_type (die, cu);
3948 read_base_type (struct die_info *die, struct dwarf2_cu *cu)
3950 struct objfile *objfile = cu->objfile;
3961 attr = dwarf2_attr (die, DW_AT_encoding, cu);
3966 attr = dwarf2_attr (die, DW_AT_byte_size, cu);
3971 attr = dwarf2_attr (die, DW_AT_name, cu);
4009 cu);
4014 = dwarf2_fundamental_type (objfile, FT_EXT_PREC_FLOAT, cu);
4017 = dwarf2_fundamental_type (objfile, FT_DBL_PREC_FLOAT, cu);
4020 = dwarf2_fundamental_type (objfile, FT_FLOAT, cu);
4025 type = dwarf_base_type (encoding, size, cu);
4033 read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
4045 base_type = die_type (die, cu);
4056 if (cu->language == language_fortran)
4062 attr = dwarf2_attr (die, DW_AT_lower_bound, cu);
4066 attr = dwarf2_attr (die, DW_AT_upper_bound, cu);
4090 attr = dwarf2_attr (die, DW_AT_name, cu);
4094 attr = dwarf2_attr (die, DW_AT_byte_size, cu);
4105 read_comp_unit (char *info_ptr, bfd *abfd, struct dwarf2_cu *cu)
4111 return read_die_and_children (info_ptr, abfd, cu, &info_ptr, NULL);
4122 struct dwarf2_cu *cu,
4130 cur_ptr = read_full_die (&die, abfd, info_ptr, cu, &has_children);
4135 die->child = read_die_and_siblings (cur_ptr, abfd, cu,
4155 struct dwarf2_cu *cu,
4168 = read_die_and_children (cur_ptr, abfd, cu, &cur_ptr, parent);
4256 dwarf2_read_abbrevs (bfd *abfd, struct dwarf2_cu *cu)
4258 struct comp_unit_head *cu_header = &cu->header;
4322 if (dwarf2_lookup_abbrev (abbrev_number, cu) != NULL)
4356 dwarf2_lookup_abbrev (unsigned int number, struct dwarf2_cu *cu)
4358 struct comp_unit_head *cu_header = &cu->header;
4379 char *info_ptr, struct dwarf2_cu *cu)
4395 abbrev = dwarf2_lookup_abbrev (abbrev_number, cu);
4408 info_ptr = read_attribute (&attr, &abbrev->attrs[i], abfd, info_ptr, cu);
4471 dwarf_info_buffer + dwarf2_get_ref_die_offset (&attr, cu);
4487 + dwarf2_get_ref_die_offset (&spec_attr, cu);
4488 read_partial_die (&spec_die, abfd, spec_ptr, cu);
4522 struct dwarf2_cu *cu, int *has_children)
4542 abbrev = dwarf2_lookup_abbrev (abbrev_number, cu);
4562 abfd, info_ptr, cu);
4575 struct dwarf2_cu *cu)
4577 struct comp_unit_head *cu_header = &cu->header;
4586 DW_ADDR (attr) = read_address (abfd, info_ptr, cu, &bytes_read);
4684 info_ptr = read_attribute_value (attr, form, abfd, info_ptr, cu);
4698 bfd *abfd, char *info_ptr, struct dwarf2_cu *cu)
4701 return read_attribute_value (attr, abbrev->form, abfd, info_ptr, cu);
4749 read_address (bfd *abfd, char *buf, struct dwarf2_cu *cu, int *bytes_read)
4751 struct comp_unit_head *cu_header = &cu->header;
5024 set_cu_language (unsigned int lang, struct dwarf2_cu *cu)
5030 cu->language = language_c;
5033 cu->language = language_cplus;
5038 cu->language = language_fortran;
5041 cu->language = language_asm;
5044 cu->language = language_java;
5053 cu->language = language_minimal;
5056 cu->language_defn = language_def (cu->language);
5062 dwarf2_attr (struct die_info *die, unsigned int name, struct dwarf2_cu *cu)
5080 follow_die_ref (dwarf2_get_ref_die_offset (spec, cu));
5083 return dwarf2_attr (ref_die, name, cu);
5090 die_is_declaration (struct die_info *die, struct dwarf2_cu *cu)
5092 return (dwarf2_attr (die, DW_AT_declaration, cu)
5093 && ! dwarf2_attr (die, DW_AT_specification, cu));
5100 die_specification (struct die_info *die, struct dwarf2_cu *cu)
5102 struct attribute *spec_attr = dwarf2_attr (die, DW_AT_specification, cu);
5107 return follow_die_ref (dwarf2_get_ref_die_offset (spec_attr, cu));
5196 struct dwarf2_cu *cu)
5227 lh->total_length = read_initial_length (abfd, line_ptr, &cu->header, &bytes_read);
5237 lh->header_length = read_offset (abfd, line_ptr, &cu->header, &bytes_read);
5301 check_cu_functions (CORE_ADDR address, struct dwarf2_cu *cu)
5306 if (!cu->first_fn)
5309 if (!cu->cached_fn)
5310 cu->cached_fn = cu->first_fn;
5312 fn = cu->cached_fn;
5319 fn = cu->first_fn;
5320 while (fn && fn != cu->cached_fn)
5345 struct dwarf2_cu *cu)
5352 struct objfile *objfile = cu->objfile;
5400 check_cu_functions (address, cu));
5416 address = read_address (abfd, line_ptr, cu, &bytes_read);
5447 check_cu_functions (address, cu));
5560 struct dwarf2_cu *cu)
5562 struct objfile *objfile = cu->objfile;
5563 struct comp_unit_head *cu_header = &cu->header;
5595 read_address (objfile->obfd, DW_BLOCK (attr)->data + 1, cu, &dummy);
5610 dwarf2_symbol_mark_computed (attr, sym, cu);
5621 new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
5623 struct objfile *objfile = cu->objfile;
5633 name = dwarf2_linkage_name (die, cu);
5645 SYMBOL_LANGUAGE (sym) = cu->language;
5655 SYMBOL_TYPE (sym) = die_type (die, cu);
5656 attr = dwarf2_attr (die, DW_AT_decl_line, cu);
5664 attr = dwarf2_attr (die, DW_AT_low_pc, cu);
5675 attr2 = dwarf2_attr (die, DW_AT_external, cu);
5682 add_symbol_to_list (sym, cu->list_in_scope);
5694 attr = dwarf2_attr (die, DW_AT_const_value, cu);
5697 dwarf2_const_value (attr, sym, cu);
5698 attr2 = dwarf2_attr (die, DW_AT_external, cu);
5702 add_symbol_to_list (sym, cu->list_in_scope);
5705 attr = dwarf2_attr (die, DW_AT_location, cu);
5708 var_decode_location (attr, sym, cu);
5709 attr2 = dwarf2_attr (die, DW_AT_external, cu);
5713 add_symbol_to_list (sym, cu->list_in_scope);
5723 attr2 = dwarf2_attr (die, DW_AT_external, cu);
5725 && dwarf2_attr (die, DW_AT_type, cu) != NULL)
5733 attr = dwarf2_attr (die, DW_AT_location, cu);
5736 var_decode_location (attr, sym, cu);
5741 attr = dwarf2_attr (die, DW_AT_const_value, cu);
5744 dwarf2_const_value (attr, sym, cu);
5746 add_symbol_to_list (sym, cu->list_in_scope);
5765 if (cu->language == language_cplus)
5792 list_to_add = (cu->list_in_scope == &file_symbols
5793 && cu->language == language_cplus
5794 ? &global_symbols : cu->list_in_scope);
5801 if (cu->language == language_cplus)
5828 add_symbol_to_list (sym, cu->list_in_scope);
5834 add_symbol_to_list (sym, cu->list_in_scope);
5845 attr = dwarf2_attr (die, DW_AT_const_value, cu);
5848 dwarf2_const_value (attr, sym, cu);
5856 list_to_add = (cu->list_in_scope == &file_symbols
5857 && cu->language == language_cplus
5858 ? &global_symbols : cu->list_in_scope);
5884 struct dwarf2_cu *cu)
5886 struct objfile *objfile = cu->objfile;
5887 struct comp_unit_head *cu_header = &cu->header;
5986 die_type (struct die_info *die, struct dwarf2_cu *cu)
5993 type_attr = dwarf2_attr (die, DW_AT_type, cu);
5997 return dwarf2_fundamental_type (cu->objfile, FT_VOID, cu);
6001 ref = dwarf2_get_ref_die_offset (type_attr, cu);
6006 ref, cu->objfile->name);
6010 type = tag_type_to_type (type_die, cu);
6015 cu->objfile->name);
6024 die_containing_type (struct die_info *die, struct dwarf2_cu *cu)
6031 type_attr = dwarf2_attr (die, DW_AT_containing_type, cu);
6034 ref = dwarf2_get_ref_die_offset (type_attr, cu);
6039 cu->objfile->name);
6042 type = tag_type_to_type (type_die, cu);
6049 cu->objfile->name);
6056 type_at_offset (unsigned int offset, struct dwarf2_cu *cu)
6067 type = tag_type_to_type (die, cu);
6073 tag_type_to_type (struct die_info *die, struct dwarf2_cu *cu)
6081 read_type_die (die, cu);
6086 die->tag, cu->objfile->name);
6093 read_type_die (struct die_info *die, struct dwarf2_cu *cu)
6095 char *prefix = determine_prefix (die, cu);
6105 read_structure_type (die, cu);
6108 read_enumeration_type (die, cu);
6112 read_subroutine_type (die, cu);
6115 read_array_type (die, cu);
6118 read_tag_pointer_type (die, cu);
6121 read_tag_unspecified_type (die, cu);
6124 read_tag_ptr_to_member_type (die, cu);
6128 read_tag_reference_type (die, cu);
6131 read_tag_const_type (die, cu);
6134 read_tag_volatile_type (die, cu);
6137 read_tag_restrict_type (die, cu);
6140 read_tag_string_type (die, cu);
6143 read_typedef (die, cu);
6146 read_subrange_type (die, cu);
6149 read_base_type (die, cu);
6169 determine_prefix (struct die_info *die, struct dwarf2_cu *cu)
6173 if (cu->language != language_cplus)
6196 char *parent_prefix = determine_prefix (parent, cu);
6199 cu));
6215 char *new_prefix = determine_prefix (parent, cu);
6219 retval = determine_class_name (parent, cu);
6227 return determine_prefix (parent, cu);
6254 dwarf_base_type (int encoding, int size, struct dwarf2_cu *cu)
6256 struct objfile *objfile = cu->objfile;
6264 type = dwarf2_fundamental_type (objfile, FT_VOID, cu);
6267 type = dwarf2_fundamental_type (objfile, FT_BOOLEAN, cu);
6272 type = dwarf2_fundamental_type (objfile, FT_DBL_PREC_COMPLEX, cu);
6276 type = dwarf2_fundamental_type (objfile, FT_COMPLEX, cu);
6282 type = dwarf2_fundamental_type (objfile, FT_DBL_PREC_FLOAT, cu);
6286 type = dwarf2_fundamental_type (objfile, FT_FLOAT, cu);
6293 type = dwarf2_fundamental_type (objfile, FT_SIGNED_CHAR, cu);
6296 type = dwarf2_fundamental_type (objfile, FT_SIGNED_SHORT, cu);
6300 type = dwarf2_fundamental_type (objfile, FT_SIGNED_INTEGER, cu);
6305 type = dwarf2_fundamental_type (objfile, FT_SIGNED_CHAR, cu);
6311 type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_CHAR, cu);
6314 type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_SHORT, cu);
6318 type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_INTEGER, cu);
6323 type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_CHAR, cu);
6326 type = dwarf2_fundamental_type (objfile, FT_SIGNED_INTEGER, cu);
6375 dwarf2_linkage_name (struct die_info *die, struct dwarf2_cu *cu)
6379 attr = dwarf2_attr (die, DW_AT_MIPS_linkage_name, cu);
6382 attr = dwarf2_attr (die, DW_AT_name, cu);
6391 dwarf2_name (struct die_info *die, struct dwarf2_cu *cu)
6395 attr = dwarf2_attr (die, DW_AT_name, cu);
6405 dwarf2_extension (struct die_info *die, struct dwarf2_cu *cu)
6411 attr = dwarf2_attr (die, DW_AT_extension, cu);
6415 ref = dwarf2_get_ref_die_offset (attr, cu);
7335 dwarf2_get_ref_die_offset (struct attribute *attr, struct dwarf2_cu *cu)
7349 result = cu->header.offset + DW_UNSND (attr);
7402 struct dwarf2_cu *cu)
7414 if (cu->ftypes[typeid] == NULL)
7416 cu->ftypes[typeid] = cu->language_defn->la_fund_type (objfile, typeid);
7419 return (cu->ftypes[typeid]);
7448 decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu)
7450 struct objfile *objfile = cu->objfile;
7451 struct comp_unit_head *cu_header = &cu->header;
7554 cu, &bytes_read);
7933 struct dwarf2_cu *cu)
8009 lh, cu->objfile);
8080 struct dwarf2_cu *cu)
8086 baton = obstack_alloc (&cu->objfile->objfile_obstack,
8088 baton->objfile = cu->objfile;
8094 baton->base_address = cu->header.base_address;
8095 if (cu->header.base_known == 0)
8106 baton = obstack_alloc (&cu->objfile->objfile_obstack,
8108 baton->objfile = cu->objfile;