MachoCacheInit
Description
Initialise an empty Mach-O symbol cache. The allocator argument is optional inside a Scope block (defaults to MisraScope) and backs both the entries Vec and every Mach-O / DWARF table the cache grows lazily.
Success
Yields a MachoCache whose entries Vec is empty and ready for use.
Failure
Cannot fail at construction; first allocator OOM surfaces from later entries growth.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Backtrace.c:389:
# if FEATURE_PARSER_MACHO
bool cache_ok = (alloc != NULL);
MachoCache cache = cache_ok ? MachoCacheInit(alloc) : (MachoCache) {0};
# else
(void)alloc;- In
MachoCache.c:189:
}
MachoCache cache = MachoCacheInit(base);
// slide chosen so runtime_ip - slide = 0x100000110 (10 bytes past
- In
MachoCache.c:228:
}
MachoCache cache = MachoCacheInit(base);
const u64 slide = 0;- In
MachoCache.c:266:
write_file(dsym_path, dsym_buf, dsym_size);
MachoCache cache = MachoCacheInit(base);
Zstr name = NULL;- In
MachoCache.c:621:
size baseline = DebugAllocatorLiveCount(&dbg);
MachoCache cache = MachoCacheInit(base);
Zstr name = NULL;
u32 offset = 0;- In
MachoCache.c:658:
size baseline = DebugAllocatorLiveCount(&dbg);
MachoCache cache = MachoCacheInit(base);
Zstr name = NULL;- In
MachoCache.c:717:
size baseline = DebugAllocatorLiveCount(&dbg);
MachoCache cache = MachoCacheInit(base);
Zstr name = NULL;
u32 offset = 0;- In
MachoCache.c:758:
size baseline = DebugAllocatorLiveCount(&dbg);
MachoCache cache = MachoCacheInit(base);
Zstr name = NULL;
// Resolve must fail: stripped main + UUID-mismatched dSYM.
- In
MachoCache.c:800:
size baseline = DebugAllocatorLiveCount(&dbg);
MachoCache cache = MachoCacheInit(base);
Zstr name = NULL;
u32 offset = 0;- In
MachoCache.c:833:
bool ok = mc_write_file(bin_path, mc_bin_buf, bin_size);
MachoCache cache = MachoCacheInit(base);
Zstr name = NULL;
u32 off = 0;- In
MachoCache.c:865:
bool ok = mc_write_file(bin_path, mc_bin_buf, bin_size);
MachoCache cache = MachoCacheInit(base);
Str mod = StrInit(base); ok = ok && bl_write_file(dsym_path, bl_dsym_buf, dsym_size);
MachoCache cache = MachoCacheInit(base);
Zstr name = NULL;
u32 offset = 0; ok = ok && bl_write_file(dsym_path, bl_dsym_buf, dsym_size);
MachoCache cache = MachoCacheInit(base);
Zstr name1 = NULL; size baseline = DebugAllocatorLiveCount(&dbg);
MachoCache cache = MachoCacheInit(base);
Zstr name = NULL;
u32 offset = 0;
Last updated on