Lines Matching refs:mod
59 __libdwfl_module_free (Dwfl_Module *mod) in __libdwfl_module_free() argument
61 if (mod->lazy_cu_root != NULL) in __libdwfl_module_free()
62 tdestroy (mod->lazy_cu_root, nofree); in __libdwfl_module_free()
64 if (mod->aranges != NULL) in __libdwfl_module_free()
65 free (mod->aranges); in __libdwfl_module_free()
67 if (mod->cu != NULL) in __libdwfl_module_free()
69 for (size_t i = 0; i < mod->ncu; ++i) in __libdwfl_module_free()
70 free_cu (mod->cu[i]); in __libdwfl_module_free()
71 free (mod->cu); in __libdwfl_module_free()
76 if (mod->eh_cfi != NULL) in __libdwfl_module_free()
78 if (mod->eh_cfi->ebl != NULL && mod->eh_cfi->ebl == mod->ebl) in __libdwfl_module_free()
79 mod->eh_cfi->ebl = NULL; in __libdwfl_module_free()
80 dwarf_cfi_end (mod->eh_cfi); in __libdwfl_module_free()
83 if (mod->dwarf_cfi != NULL) in __libdwfl_module_free()
85 if (mod->dwarf_cfi->ebl != NULL && mod->dwarf_cfi->ebl == mod->ebl) in __libdwfl_module_free()
86 mod->dwarf_cfi->ebl = NULL; in __libdwfl_module_free()
91 if (mod->dw != NULL) in __libdwfl_module_free()
93 INTUSE(dwarf_end) (mod->dw); in __libdwfl_module_free()
94 if (mod->alt != NULL) in __libdwfl_module_free()
96 INTUSE(dwarf_end) (mod->alt); in __libdwfl_module_free()
97 if (mod->alt_elf != NULL) in __libdwfl_module_free()
98 elf_end (mod->alt_elf); in __libdwfl_module_free()
99 if (mod->alt_fd != -1) in __libdwfl_module_free()
100 close (mod->alt_fd); in __libdwfl_module_free()
104 if (mod->ebl != NULL) in __libdwfl_module_free()
105 ebl_closebackend (mod->ebl); in __libdwfl_module_free()
107 if (mod->debug.elf != mod->main.elf) in __libdwfl_module_free()
108 free_file (&mod->debug); in __libdwfl_module_free()
109 free_file (&mod->main); in __libdwfl_module_free()
110 free_file (&mod->aux_sym); in __libdwfl_module_free()
112 if (mod->build_id_bits != NULL) in __libdwfl_module_free()
113 free (mod->build_id_bits); in __libdwfl_module_free()
115 if (mod->reloc_info != NULL) in __libdwfl_module_free()
116 free (mod->reloc_info); in __libdwfl_module_free()
118 free (mod->name); in __libdwfl_module_free()
119 free (mod); in __libdwfl_module_free()
144 use (Dwfl_Module *mod, Dwfl_Module **tailp, Dwfl *dwfl) in INTDEF()
146 mod->next = *tailp; in INTDEF()
147 *tailp = mod; in INTDEF()
155 return mod; in INTDEF()
183 Dwfl_Module *mod = calloc (1, sizeof *mod); in dwfl_report_module() local
184 if (mod == NULL) in dwfl_report_module()
187 mod->name = strdup (name); in dwfl_report_module()
188 if (mod->name == NULL) in dwfl_report_module()
190 free (mod); in dwfl_report_module()
196 mod->low_addr = start; in dwfl_report_module()
197 mod->high_addr = end; in dwfl_report_module()
198 mod->dwfl = dwfl; in dwfl_report_module()
200 return use (mod, tailp, dwfl); in dwfl_report_module()