Skip to content
MachoCacheInit

MachoCacheInit

Description

Initialise an empty Mach-O symbol cache.

Parameters

Name Direction Description
out out Cache to initialise.
alloc in Allocator used for the entries vector and for every Mach-O / DWARF table the cache grows lazily.

Success

Returns true. out is a usable empty cache.

Failure

Returns false on allocator OOM. out is left zeroed.

Usage example (Cross-references)

Usage examples (Cross-references)
    
        MachoCache cache;
        MachoCacheInit(&cache, base);
    
        // slide chosen so runtime_ip - slide = 0x100000110 (10 bytes past
    
        MachoCache cache;
        MachoCacheInit(&cache, base);
    
        const u64 slide      = 0;
    
        MachoCache cache;
        MachoCacheInit(&cache, base);
    
        Zstr name = NULL;
    #    if FEATURE_PARSER_MACHO
        MachoCache cache;
        bool       cache_ok = alloc && MachoCacheInit(&cache, alloc);
    #    else
        (void)alloc;
Last updated on