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