Lines Matching refs:result

68 check_section (Dwarf *result, GElf_Ehdr *ehdr, Elf_Scn *scn, bool inscngrp)  in check_section()  argument
84 return result; in check_section()
93 return result; in check_section()
98 const char *scnname = elf_strptr (result->elf, ehdr->e_shstrndx, in check_section()
105 Dwarf_Sig8_Hash_free (&result->sig8_hash); in check_section()
107 free (result); in check_section()
126 return result; in check_section()
128 if (unlikely (result->sectiondata[cnt] != NULL)) in check_section()
130 return result; in check_section()
147 Dwarf_Sig8_Hash_free (&result->sig8_hash); in check_section()
149 free (result); in check_section()
152 return result; in check_section()
163 return result; in check_section()
166 result->sectiondata[cnt] = data; in check_section()
168 return result; in check_section()
174 valid_p (Dwarf *result) in valid_p() argument
182 if (likely (result != NULL) in valid_p()
183 && unlikely (result->sectiondata[IDX_debug_info] == NULL)) in valid_p()
185 Dwarf_Sig8_Hash_free (&result->sig8_hash); in valid_p()
187 free (result); in valid_p()
188 result = NULL; in valid_p()
191 if (result != NULL && result->sectiondata[IDX_debug_loc] != NULL) in valid_p()
193 result->fake_loc_cu = (Dwarf_CU *) calloc (1, sizeof (Dwarf_CU)); in valid_p()
194 if (unlikely (result->fake_loc_cu == NULL)) in valid_p()
196 Dwarf_Sig8_Hash_free (&result->sig8_hash); in valid_p()
198 free (result); in valid_p()
199 result = NULL; in valid_p()
203 result->fake_loc_cu->dbg = result; in valid_p()
204 result->fake_loc_cu->startp in valid_p()
205 = result->sectiondata[IDX_debug_loc]->d_buf; in valid_p()
206 result->fake_loc_cu->endp in valid_p()
207 = (result->sectiondata[IDX_debug_loc]->d_buf in valid_p()
208 + result->sectiondata[IDX_debug_loc]->d_size); in valid_p()
212 return result; in valid_p()
217 global_read (Dwarf *result, Elf *elf, GElf_Ehdr *ehdr) in global_read() argument
221 while (result != NULL && (scn = elf_nextscn (elf, scn)) != NULL) in global_read()
222 result = check_section (result, ehdr, scn, false); in global_read()
224 return valid_p (result); in global_read()
229 scngrp_read (Dwarf *result, Elf *elf, GElf_Ehdr *ehdr, Elf_Scn *scngrp) in scngrp_read() argument
235 Dwarf_Sig8_Hash_free (&result->sig8_hash); in scngrp_read()
237 free (result); in scngrp_read()
244 Dwarf_Sig8_Hash_free (&result->sig8_hash); in scngrp_read()
246 free (result); in scngrp_read()
256 Dwarf_Sig8_Hash_free (&result->sig8_hash); in scngrp_read()
257 free (result); in scngrp_read()
272 Dwarf_Sig8_Hash_free (&result->sig8_hash); in scngrp_read()
274 free (result); in scngrp_read()
278 result = check_section (result, ehdr, scn, true); in scngrp_read()
279 if (result == NULL) in scngrp_read()
283 return valid_p (result); in scngrp_read()
312 Dwarf *result = (Dwarf *) calloc (1, sizeof (Dwarf) + mem_default_size); in dwarf_begin_elf() local
313 if (unlikely (result == NULL) in dwarf_begin_elf()
314 || unlikely (Dwarf_Sig8_Hash_init (&result->sig8_hash, 11) < 0)) in dwarf_begin_elf()
316 free (result); in dwarf_begin_elf()
324 result->other_byte_order = true; in dwarf_begin_elf()
326 result->elf = elf; in dwarf_begin_elf()
329 result->mem_default_size = mem_default_size; in dwarf_begin_elf()
330 result->oom_handler = __libdw_oom; in dwarf_begin_elf()
331 result->mem_tail = (struct libdw_memblock *) (result + 1); in dwarf_begin_elf()
332 result->mem_tail->size = (result->mem_default_size in dwarf_begin_elf()
334 result->mem_tail->remaining = result->mem_tail->size; in dwarf_begin_elf()
335 result->mem_tail->prev = NULL; in dwarf_begin_elf()
345 return global_read (result, elf, ehdr); in dwarf_begin_elf()
347 return scngrp_read (result, elf, ehdr, scngrp); in dwarf_begin_elf()
351 Dwarf_Sig8_Hash_free (&result->sig8_hash); in dwarf_begin_elf()
353 free (result); in dwarf_begin_elf()
357 Dwarf_Sig8_Hash_free (&result->sig8_hash); in dwarf_begin_elf()
359 free (result); in dwarf_begin_elf()