Home | History | Annotate | Download | only in libdw

Lines Matching refs:attr

43 attr_ok (Dwarf_Attribute *attr)
45 if (attr == NULL)
49 switch (attr->code)
116 dwarf_getlocation_implicit_value (Dwarf_Attribute *attr, const Dwarf_Op *op,
119 if (attr == NULL)
123 struct loc_block_s **found = tfind (&fake, &attr->cu->locs, loc_compare);
138 check_constant_offset (Dwarf_Attribute *attr,
141 if (attr->code != DW_AT_data_member_location)
144 switch (attr->form)
160 struct loc_s fake = { .addr = attr->valp };
161 struct loc_s **found = tfind (&fake, &attr->cu->locs, loc_compare);
166 if (INTUSE(dwarf_formudata) (attr, &offset) != 0)
169 Dwarf_Op *result = libdw_alloc (attr->cu->dbg,
178 struct loc_s *newp = libdw_alloc (attr->cu->dbg,
181 newp->addr = attr->valp;
185 found = tsearch (newp, &attr->cu->locs, loc_compare);
610 dwarf_getlocation (Dwarf_Attribute *attr, Dwarf_Op **llbuf, size_t *listlen)
612 if (! attr_ok (attr))
615 int result = check_constant_offset (attr, llbuf, listlen);
621 if (INTUSE(dwarf_formblock) (attr, &block) != 0)
624 return getlocation (attr->cu, &block, llbuf, listlen, cu_sec_idx (attr->cu));
628 attr_base_address (Dwarf_Attribute *attr, Dwarf_Addr *basep)
631 Dwarf_Die cudie = CUDIE (attr->cu);
657 attr, ptrdiff_t *offset,
660 if (attr_base_address (attr, basep) != 0)
664 if (__libdw_formptr (attr, IDX_debug_loc,
674 getlocations_addr (Dwarf_Attribute *attr, ptrdiff_t offset,
683 if (readendp - readp < attr->cu->address_size * 2)
693 switch (__libdw_read_begin_end_pair_inc (attr->cu->dbg, IDX_debug_loc,
694 &readp, attr->cu->address_size,
712 block.length = read_2ubyte_unaligned_inc (attr->cu->dbg, readp);
725 if (getlocation (attr->cu, &block, expr, exprlen, IDX_debug_loc) != 0)
732 dwarf_getlocation_addr (Dwarf_Attribute *attr, Dwarf_Addr address,
735 if (! attr_ok (attr))
743 if (INTUSE(dwarf_formblock) (attr, &block) == 0)
748 getlocation (attr->cu, &block, &llbufs[0], &listlens[0],
749 cu_sec_idx (attr->cu)) != 0)
761 int result = check_constant_offset (attr, &llbufs[0], &listlens[0]);
772 if (initial_offset_base (attr, &off, &base) != 0)
775 const Elf_Data *d = attr->cu->dbg->sectiondata[IDX_debug_loc];
783 && (off = getlocations_addr (attr, off, &base, &start, &end,
803 dwarf_getlocations (Dwarf_Attribute *attr, ptrdiff_t offset, Dwarf_Addr *basep,
807 if (! attr_ok (attr))
818 if (INTUSE(dwarf_formblock) (attr, &block) == 0)
820 if (getlocation (attr->cu, &block, expr, exprlen,
821 cu_sec_idx (attr->cu)) != 0)
837 int result = check_constant_offset (attr, expr, exprlen);
852 if (initial_offset_base (attr, &offset, basep) != 0)
856 const Elf_Data *d = attr->cu->dbg->sectiondata[IDX_debug_loc];
863 return getlocations_addr (attr, offset, basep, startp, endp,