Lines Matching refs:mod
62 __libdwfl_module_free (Dwfl_Module *mod)
64 if (mod->lazy_cu_root != NULL)
65 tdestroy (mod->lazy_cu_root, nofree);
67 if (mod->aranges != NULL)
68 free (mod->aranges);
70 if (mod->cu != NULL)
72 for (size_t i = 0; i < mod->ncu; ++i)
73 free_cu (mod->cu[i]);
74 free (mod->cu);
79 if (mod->eh_cfi != NULL)
81 if (mod->eh_cfi->ebl != NULL && mod->eh_cfi->ebl == mod->ebl)
82 mod->eh_cfi->ebl = NULL;
83 dwarf_cfi_end (mod->eh_cfi);
86 if (mod->dwarf_cfi != NULL)
88 if (mod->dwarf_cfi->ebl != NULL && mod->dwarf_cfi->ebl == mod->ebl)
89 mod->dwarf_cfi->ebl = NULL;
94 if (mod->dw != NULL)
96 INTUSE(dwarf_end) (mod->dw);
97 if (mod->alt != NULL)
99 INTUSE(dwarf_end) (mod->alt);
100 if (mod->alt_elf != NULL)
101 elf_end (mod->alt_elf);
102 if (mod->alt_fd != -1)
103 close (mod->alt_fd);
107 if (mod->ebl != NULL)
108 ebl_closebackend (mod->ebl);
110 if (mod->debug.elf != mod->main.elf)
111 free_file (&mod->debug);
112 free_file (&mod->main);
113 free_file (&mod->aux_sym);
115 if (mod->build_id_bits != NULL)
116 free (mod->build_id_bits);
118 if (mod->reloc_info != NULL)
119 free (mod->reloc_info);
121 free (mod->name);
122 free (mod->elfdir);
123 free (mod);
148 use (Dwfl_Module *mod, Dwfl_Module **tailp, Dwfl *dwfl)
150 mod->next = *tailp;
151 *tailp = mod;
159 return mod;
187 Dwfl_Module *mod = calloc (1, sizeof *mod);
188 if (mod == NULL)
191 mod->name = strdup (name);
192 if (mod->name == NULL)
194 free (mod);
200 mod->low_addr = start;
201 mod->high_addr = end;
202 mod->dwfl = dwfl;
204 return use (mod, tailp, dwfl);