Skip to content

MachoDeinit

Description

Release storage owned by a Macho. Frees data through allocator (unconditional – the parser always owns its bytes) and tears down the vectors. Safe on a zeroed struct.

Usage example (Cross-references)

Usage examples (Cross-references)
        ok = ok && m.symbols.data[0].value == 0x100000010ull;
    
        MachoDeinit(&m);
        DefaultAllocatorDeinit(&alloc);
        return ok;
        ok = ok && s == NULL;
    
        MachoDeinit(&m);
        DefaultAllocatorDeinit(&alloc);
        return ok;
        ok      = ok && m.symbols.length > 0;
    
        MachoDeinit(&m);
        DefaultAllocatorDeinit(&alloc);
        return ok;
                  ZstrFindSubstring(sym->name, "test_macho_resolves_running_binary_symbol") != NULL;
    
        MachoDeinit(&m);
        DefaultAllocatorDeinit(&alloc);
        return ok;
        if (!e->dsym.has_uuid || MemCompare(e->dsym.uuid, e->main.uuid, 16) != 0) {
            LOG_ERROR("MachoCache: dSYM UUID mismatch for {}", e->module_path);
            MachoDeinit(&e->dsym);
            return false;
        }
                DwarfFunctionsDeinit(&e->fns);
            if (e->dsym_open)
                MachoDeinit(&e->dsym);
            if (e->main_open)
                MachoDeinit(&e->main);
                MachoDeinit(&e->dsym);
            if (e->main_open)
                MachoDeinit(&e->main);
            if (e->module_path && self->allocator) {
                u64 n = 0;
    
    fail:
        MachoDeinit(out);
        return false;
    }
    }
    
    void MachoDeinit(Macho *self) {
        if (!self)
            return;
Last updated on