/* Frees all memory that was not previously freed by dwarf_dealloc. Aside from certain categories. This is only applicable when dwarf_init() or dwarf_elf_init() was used to init 'dbg'. */ int dwarf_finish(Dwarf_Debug dbg, Dwarf_Error * error) { dwarf_elf_object_access_finish(dbg->de_obj_file); return dwarf_object_finish(dbg, error); }
int dwarf_pe_finish(Dwarf_Debug dbg, Dwarf_Error *error) { pe_access_object_t *pe_obj = (pe_access_object_t *)dbg->de_obj_file->object; UnmapViewOfFile(pe_obj->lpFileBase); CloseHandle(pe_obj->hFileMapping); CloseHandle(pe_obj->hFile); free(pe_obj); free(dbg->de_obj_file); return dwarf_object_finish(dbg, error); }