Lines Matching refs:attr
38 __libdw_formptr (Dwarf_Attribute *attr, int sec_index, in __libdw_formptr() argument
42 if (attr == NULL) in __libdw_formptr()
45 const Elf_Data *d = attr->cu->dbg->sectiondata[sec_index]; in __libdw_formptr()
49 && attr->cu->version < 5 in __libdw_formptr()
50 && attr->cu->unit_type == DW_UT_split_compile)) in __libdw_formptr()
52 skel = __libdw_find_split_unit (attr->cu); in __libdw_formptr()
64 if (attr->form == DW_FORM_sec_offset) in __libdw_formptr()
75 Elf_Data *data = attr->cu->dbg->sectiondata[cu_sec_idx (attr->cu)]; in __libdw_formptr()
76 const unsigned char *datap = attr->valp; in __libdw_formptr()
77 size_t size = attr->cu->offset_size; in __libdw_formptr()
87 offset = read_4ubyte_unaligned (attr->cu->dbg, datap); in __libdw_formptr()
89 offset = read_8ubyte_unaligned (attr->cu->dbg, datap); in __libdw_formptr()
95 if (__libdw_read_offset (attr->cu->dbg, attr->cu->dbg, in __libdw_formptr()
96 cu_sec_idx (attr->cu), attr->valp, in __libdw_formptr()
97 attr->cu->offset_size, &offset, in __libdw_formptr()
102 else if (attr->cu->version > 3) in __libdw_formptr()
105 switch (attr->form) in __libdw_formptr()
109 if (__libdw_read_offset (attr->cu->dbg, attr->cu->dbg, in __libdw_formptr()
110 cu_sec_idx (attr->cu), in __libdw_formptr()
111 attr->valp, in __libdw_formptr()
112 attr->form == DW_FORM_data4 ? 4 : 8, in __libdw_formptr()
118 if (INTUSE(dwarf_formudata) (attr, &offset)) in __libdw_formptr()
139 dwarf_formudata (Dwarf_Attribute *attr, Dwarf_Word *return_uval) in dwarf_formudata() argument
141 if (attr == NULL) in dwarf_formudata()
144 const unsigned char *datap = attr->valp; in dwarf_formudata()
145 const unsigned char *endp = attr->cu->endp; in dwarf_formudata()
147 switch (attr->form) in dwarf_formudata()
156 *return_uval = *attr->valp; in dwarf_formudata()
162 *return_uval = read_2ubyte_unaligned (attr->cu->dbg, attr->valp); in dwarf_formudata()
172 if (attr->form == DW_FORM_sec_offset in dwarf_formudata()
173 || (attr->cu->version < 4 && attr->code != DW_AT_start_scope)) in dwarf_formudata()
175 switch (attr->code) in dwarf_formudata()
188 if (attr->cu->version < 5) in dwarf_formudata()
191 if (__libdw_formptr (attr, IDX_debug_loc, in dwarf_formudata()
199 if (__libdw_formptr (attr, IDX_debug_loclists, in dwarf_formudata()
208 if (__libdw_formptr (attr, IDX_debug_macinfo, in dwarf_formudata()
217 if (__libdw_formptr (attr, IDX_debug_macro, in dwarf_formudata()
227 if (attr->cu->version < 5) in dwarf_formudata()
230 if (__libdw_formptr (attr, IDX_debug_ranges, in dwarf_formudata()
238 if (__libdw_formptr (attr, IDX_debug_rnglists, in dwarf_formudata()
247 if (__libdw_formptr (attr, IDX_debug_line, in dwarf_formudata()
256 if (__libdw_formptr (attr, IDX_debug_addr, in dwarf_formudata()
264 if (__libdw_formptr (attr, IDX_debug_str_offsets, in dwarf_formudata()
272 if (attr->form == DW_FORM_sec_offset) in dwarf_formudata()
279 if (__libdw_read_address (attr->cu->dbg, cu_sec_idx (attr->cu), in dwarf_formudata()
280 attr->valp, in dwarf_formudata()
281 attr->form == DW_FORM_data4 ? 4 : 8, in dwarf_formudata()
290 if (__libdw_read_address (attr->cu->dbg, cu_sec_idx (attr->cu), in dwarf_formudata()
291 attr->valp, in dwarf_formudata()
292 attr->form == DW_FORM_data4 ? 4 : 8, in dwarf_formudata()
335 *return_uval = read_2ubyte_unaligned (attr->cu->dbg, datap); in dwarf_formudata()
341 *return_uval = read_3ubyte_unaligned (attr->cu->dbg, datap); in dwarf_formudata()
347 *return_uval = read_4ubyte_unaligned (attr->cu->dbg, datap); in dwarf_formudata()