Skip to content

PdbCacheInit

Description

Initialize an empty cache. The allocator argument is optional inside a Scope block (defaults to MisraScope).

Success

Yields a PdbCache whose entries Vec is empty and ready for Resolve.

Failure

Cannot fail at construction; first allocator OOM surfaces from later entries growth.

Usage example (Cross-references)

Usage examples (Cross-references)
    #    if FEATURE_PARSER_PDB
        bool     pdb_cache_ok = (alloc != NULL);
        PdbCache pdb_cache    = pdb_cache_ok ? PdbCacheInit(alloc) : (PdbCache) {0};
    #    else
        (void)alloc;
        }
    
        PdbCache cache = PdbCacheInit(base);
    
        // module_base = 0x140000000 -> RVA = (ip - base). For func at
        tmp_path_join(missing, sizeof(missing), "misra_pdbcache_missing_xyz.exe");
    
        PdbCache cache = PdbCacheInit(base);
        Zstr name = NULL;
        bool ok   = !PdbCacheResolve(&cache, (Zstr)missing, 0, 0x1000, &name, NULL);
        bool result = false;
        if (wrote) {
            PdbCache cache = PdbCacheInit(base);
    
            const u64 mbase = 0x140000000ull;
        bool result = false;
        if (wrote) {
            PdbCache  cache = PdbCacheInit(base);
            const u64 mbase = 0x140000000ull;
            Zstr      name  = NULL;
            size before = DebugAllocatorLiveCount(&dbg);
    
            PdbCache  cache = PdbCacheInit(base);
            const u64 mbase = 0x140000000ull;
            Zstr      name  = NULL;
        bool result = false;
        if (wrote) {
            PdbCache  cache = PdbCacheInit(base);
            const u64 mbase = 0x140000000ull;
            Zstr      name  = NULL;
        bool result = false;
        if (wrote) {
            PdbCache  cache = PdbCacheInit(base);
            const u64 mbase = 0x140000000ull;
            u32       off   = 0;
        bool result = false;
        if (wrote) {
            PdbCache  cache = PdbCacheInit(base);
            const u64 mbase = 0x140000000ull;
            u32       off   = 0;
        bool result = false;
        if (wrote) {
            PdbCache  cache = PdbCacheInit(base);
            const u64 mbase = 0x140000000ull;
Last updated on