Lines Matching refs:mod
58 __libdwfl_module_free (Dwfl_Module *mod)
60 if (mod->lazy_cu_root != NULL)
61 tdestroy (mod->lazy_cu_root, nofree);
63 if (mod->aranges != NULL)
64 free (mod->aranges);
66 if (mod->cu != NULL)
68 for (size_t i = 0; i < mod->ncu; ++i)
69 free_cu (mod->cu[i]);
70 free (mod->cu);
73 if (mod->dw != NULL)
75 INTUSE(dwarf_end) (mod->dw);
76 if (mod->alt != NULL)
78 INTUSE(dwarf_end) (mod->alt);
79 if (mod->alt_elf != NULL)
80 elf_end (mod->alt_elf);
81 if (mod->alt_fd != -1)
82 close (mod->alt_fd);
86 if (mod->ebl != NULL)
87 ebl_closebackend (mod->ebl);
89 if (mod->debug.elf != mod->main.elf)
90 free_file (&mod->debug);
91 free_file (&mod->main);
92 free_file (&mod->aux_sym);
94 if (mod->build_id_bits != NULL)
95 free (mod->build_id_bits);
97 if (mod->reloc_info != NULL)
98 free (mod->reloc_info);
100 if (mod->eh_cfi != NULL)
101 dwarf_cfi_end (mod->eh_cfi);
103 free (mod->name);
104 free (mod);
137 inline Dwfl_Module *use (Dwfl_Module *mod)
139 mod->next = *tailp;
140 *tailp = mod;
148 return mod;
167 Dwfl_Module *mod = calloc (1, sizeof *mod);
168 if (mod == NULL)
171 mod->name = strdup (name);
172 if (mod->name == NULL)
174 free (mod);
180 mod->low_addr = start;
181 mod->high_addr = end;
182 mod->dwfl = dwfl;
184 return use (mod);