Skip to content
MachoCacheDeinit

MachoCacheDeinit

Description

Release every cached Mach-O / DWARF table and the entries vector. Safe on a partially-initialised cache.

Success

Returns to the caller. self is zeroed.

Failure

Function cannot fail.

Usage example (Cross-references)

Usage examples (Cross-references)
        ok                   = ok && name && ZstrCompare(name, "real_main_proc") == 0 && offset == 0x10;
    
        MachoCacheDeinit(&cache);
        DefaultAllocatorDeinit(&alloc);
        FileRemove(bin_path);
        ok                   = ok && name && ZstrCompare(name, "dsym_only_fn") == 0 && offset == 0x8;
    
        MachoCacheDeinit(&cache);
        DefaultAllocatorDeinit(&alloc);
        bool ok   = !MachoCacheResolve(&cache, bin_path, 0, 0x100000208ull, &name, NULL);
    
        MachoCacheDeinit(&cache);
        DefaultAllocatorDeinit(&alloc);
    }
    
    void MachoCacheDeinit(MachoCache *self) {
        if (!self)
            return;
    #    if FEATURE_PARSER_MACHO
        if (cache_ok)
            MachoCacheDeinit(&cache);
    #    endif
    }
Last updated on