Lines Matching refs:mod

36 dwar (Dwfl_Module *mod, unsigned int idx)  in dwar()  argument
38 return &mod->dw->aranges->info[mod->aranges[idx].arange]; in dwar()
43 addrarange (Dwfl_Module *mod, Dwarf_Addr addr, struct dwfl_arange **arange) in addrarange() argument
45 if (mod->aranges == NULL) in addrarange()
50 if (INTUSE(dwarf_getaranges) (mod->dw, &dwaranges, &naranges) != 0) in addrarange()
81 mod->naranges = naranges; in addrarange()
82 mod->aranges = (realloc (aranges, naranges * sizeof aranges[0]) in addrarange()
84 mod->lazycu += naranges; in addrarange()
88 addr = dwfl_deadjust_dwarf_addr (mod, addr); in addrarange()
91 size_t l = 0, u = mod->naranges; in addrarange()
95 Dwarf_Addr start = dwar (mod, idx)->addr; in addrarange()
103 if (idx + 1 < mod->naranges) in addrarange()
105 if (addr >= dwar (mod, idx + 1)->addr) in addrarange()
115 = &mod->dw->aranges->info[mod->dw->aranges->naranges - 1]; in addrarange()
121 *arange = &mod->aranges[idx]; in addrarange()
136 assert (cu->mod->lazycu == 0); in nofree()
141 less_lazy (Dwfl_Module *mod) in less_lazy() argument
143 if (--mod->lazycu > 0) in less_lazy()
147 tdestroy (mod->lazy_cu_root, nofree); in less_lazy()
148 mod->lazy_cu_root = NULL; in less_lazy()
172 intern_cu (Dwfl_Module *mod, Dwarf_Off cuoff, struct dwfl_cu **result) in intern_cu() argument
174 if (unlikely (cuoff + 4 >= mod->dw->sectiondata[IDX_debug_info]->d_size)) in intern_cu()
176 if (likely (mod->lazycu == 1)) in intern_cu()
181 less_lazy (mod); in intern_cu()
193 Dwarf_Die *die = INTUSE(dwarf_offdie) (mod->dw, cuoff, &cudie); in intern_cu()
202 struct dwfl_cu **found = tsearch (&key, &mod->lazy_cu_root, &compare_cukey); in intern_cu()
216 cu->mod = mod; in intern_cu()
221 struct dwfl_cu **newvec = realloc (mod->cu, ((mod->ncu + 1) in intern_cu()
222 * sizeof (mod->cu[0]))); in intern_cu()
228 mod->cu = newvec; in intern_cu()
230 mod->cu[mod->ncu++] = cu; in intern_cu()
232 mod->first_cu = cu; in intern_cu()
246 __libdwfl_nextcu (Dwfl_Module *mod, struct dwfl_cu *lastcu, in __libdwfl_nextcu() argument
256 nextp = &mod->first_cu; in __libdwfl_nextcu()
269 int end = INTUSE(dwarf_nextcu) (mod->dw, cuoff, &nextoff, &cuhdrsz, in __libdwfl_nextcu()
279 Dwfl_Error result = intern_cu (mod, cuoff + cuhdrsz, nextp); in __libdwfl_nextcu()
296 arangecu (Dwfl_Module *mod, struct dwfl_arange *arange, struct dwfl_cu **cu) in arangecu() argument
300 const Dwarf_Arange *dwarange = &mod->dw->aranges->info[arange->arange]; in arangecu()
301 Dwfl_Error result = intern_cu (mod, dwarange->offset, &arange->cu); in arangecu()
305 less_lazy (mod); /* Each arange with null ->cu counts once. */ in arangecu()
314 __libdwfl_addrcu (Dwfl_Module *mod, Dwarf_Addr addr, struct dwfl_cu **cu) in __libdwfl_addrcu() argument
317 return addrarange (mod, addr, &arange) ?: arangecu (mod, arange, cu); in __libdwfl_addrcu()