Lines Matching defs:attr
42 attr_ok (Dwarf_Attribute *attr)
44 if (attr == NULL)
48 if (dwarf_whatform (attr) == DW_FORM_exprloc)
51 if (attr->cu->version >= 4)
54 switch (dwarf_whatform (attr))
71 switch (attr->code)
163 dwarf_getlocation_implicit_value (Dwarf_Attribute *attr, const Dwarf_Op *op,
166 if (attr == NULL)
170 struct loc_block_s **found = tfind (&fake, &attr->cu->locs, loc_compare);
188 is_constant_offset (Dwarf_Attribute *attr,
191 if (attr->code != DW_AT_data_member_location)
194 switch (attr->form)
213 struct loc_s fake = { .addr = attr->valp };
214 struct loc_s **found = tfind (&fake, &attr->cu->locs, loc_compare);
219 if (INTUSE(dwarf_formudata) (attr, &offset) != 0)
222 Dwarf_Op *result = libdw_alloc (attr->cu->dbg,
231 struct loc_s *newp = libdw_alloc (attr->cu->dbg,
234 newp->addr = attr->valp;
238 found = tsearch (newp, &attr->cu->locs, loc_compare);
685 dwarf_getlocation (Dwarf_Attribute *attr, Dwarf_Op **llbuf, size_t *listlen)
687 if (! attr_ok (attr))
690 int result = is_constant_offset (attr, llbuf, listlen);
696 if (attr->form == DW_FORM_data16)
702 if (INTUSE(dwarf_formblock) (attr, &block) != 0)
705 return getlocation (attr->cu, &block, llbuf, listlen, cu_sec_idx (attr->cu));
742 initial_offset (Dwarf_Attribute *attr, ptrdiff_t *offset)
744 size_t secidx = (attr->cu->version < 5
748 if (attr->form == DW_FORM_loclistx)
751 Dwarf_CU *cu = attr->cu;
752 const unsigned char *datap = attr->valp;
808 if (__libdw_formptr (attr, secidx,
821 getlocations_addr (Dwarf_Attribute *attr, ptrdiff_t offset,
826 Dwarf_CU *cu = attr->cu;
889 dwarf_getlocation_addr (Dwarf_Attribute *attr, Dwarf_Addr address,
892 if (! attr_ok (attr))
901 if (attr->form != DW_FORM_data16
902 && INTUSE(dwarf_formblock) (attr, &block) == 0)
907 getlocation (attr->cu, &block, &llbufs[0], &listlens[0],
908 cu_sec_idx (attr->cu)) != 0)
913 if (attr->form != DW_FORM_data16)
924 int result = is_constant_offset (attr, llbufs, listlens);
935 base = __libdw_cu_base_address (attr->cu);
939 if (initial_offset (attr, &off) != 0)
942 size_t secidx = attr->cu->version < 5 ? IDX_debug_loc : IDX_debug_loclists;
943 const Elf_Data *d = attr->cu->dbg->sectiondata[secidx];
946 && (off = getlocations_addr (attr, off, &base, &start, &end,
966 dwarf_getlocations (Dwarf_Attribute *attr, ptrdiff_t offset, Dwarf_Addr *basep,
970 if (! attr_ok (attr))
982 if (attr->form != DW_FORM_data16
983 && INTUSE(dwarf_formblock) (attr, &block) == 0)
985 if (getlocation (attr->cu, &block, expr, exprlen,
986 cu_sec_idx (attr->cu)) != 0)
995 if (attr->form != DW_FORM_data16)
1005 int result = is_constant_offset (attr, expr, exprlen);
1020 *basep = __libdw_cu_base_address (attr->cu);
1024 if (initial_offset (attr, &offset) != 0)
1028 size_t secidx = attr->cu->version < 5 ? IDX_debug_loc : IDX_debug_loclists;
1029 const Elf_Data *d = attr->cu->dbg->sectiondata[secidx];
1031 return getlocations_addr (attr, offset, basep, startp, endp,