PdbDeinit
Description
Release storage owned by a Pdb. Safe on a zeroed struct.
Success
Returns to the caller. *self is zeroed.
Failure
Function cannot fail. NULL self is a no-op.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
PdbCache.c:85:
if (pe_cv->age != pdb_inf->age || MemCompare(pe_cv->guid, pdb_inf->guid, 16) != 0) {
LOG_ERROR("PdbCache: GUID/age mismatch between PE and PDB for {}", entry->module_path);
PdbDeinit(&entry->pdb);
return false;
}- In
PdbCache.c:124:
PdbCacheEntry *e = VecPtrAt(&self->entries, i);
if (e->pdb_open)
PdbDeinit(&e->pdb);
if (e->pe_open)
PeDeinit(&e->pe);- In
Pdb.c:725:
fail:
PdbDeinit(out);
return false;
}- In
Pdb.c:757:
}
void PdbDeinit(Pdb *self) {
if (!self)
return;- In
Pdb.c:115:
ok = ok && MemCompare(pdb.info.guid, kGuid, 16) == 0;
PdbDeinit(&pdb);
DefaultAllocatorDeinit(&alloc);
return ok;- In
Pdb.c:308:
}
PdbDeinit(&pdb);
DefaultAllocatorDeinit(&alloc);
return ok;- In
Pdb.c:478:
ok = PdbResolveRva(&pdb, 0x1000) == NULL;
PdbDeinit(&pdb);
DefaultAllocatorDeinit(&alloc);
return ok;- In
Pdb.c:683:
if (n >= 1 && out_rva0)
*out_rva0 = ((const PdbFunction *)VecPtrAt(&pdb.functions, 0))->rva;
PdbDeinit(&pdb);
return n;
}- In
Pdb.c:984:
ok = ok && pdb.num_streams == 3;
ok = ok && pdb.stream_dir_size == dir_bytes;
PdbDeinit(&pdb);
}
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:1002:
if (ok) {
ok = (pdb.block_size == bs) && (pdb.num_streams == 2);
PdbDeinit(&pdb);
}
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:1059:
bool opened = PdbOpenFromMemoryCopy(&pdb, g_blob, blob_len, base);
if (opened) {
PdbDeinit(&pdb);
ok = false; // corrupted magic must NOT open
}- In
Pdb.c:1124:
// Last content page (stream 1) is the final page in the blob.
ok = pdb.num_streams == 2 && pdb.stream_sizes[1] == 28;
PdbDeinit(&pdb);
}
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:1144:
if (ok) {
ok = pdb.dir_stream_blocks_count == 1;
PdbDeinit(&pdb);
}
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:1235:
if (ok)
ok = pdb.stream_blocks[1][0] == T_DATA_PG;
PdbDeinit(&pdb);
}
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:1272:
ok = ok && pdb.stream_blocks[1] != NULL;
ok = ok && pdb.stream_blocks[2] != NULL;
PdbDeinit(&pdb);
}
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:1301:
pdb.stream_blocks[2][0] == g_mb_blockids[2];
}
PdbDeinit(&pdb);
}
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:1323:
ok = ok && pdb.stream_sizes[0] == 28;
ok = ok && pdb.stream_block_counts[0] == 1;
PdbDeinit(&pdb);
}
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:1401:
if (ok) {
ok = pdb.num_streams == 0;
PdbDeinit(&pdb);
}
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:1429:
ok = ok && pdb.stream_block_counts[1] == 0;
ok = ok && pdb.stream_blocks[1] == NULL;
PdbDeinit(&pdb);
}
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:1457:
ok = ok && pdb.stream_sizes[1] == 2000;
ok = ok && pdb.stream_block_counts[1] == 4;
PdbDeinit(&pdb);
}
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:1509:
ok = ok && pdb.num_streams == 1;
ok = ok && pdb.stream_sizes[0] == PDB_NIL;
PdbDeinit(&pdb);
}
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:1705:
}
PdbDeinit(&pdb);
DefaultAllocatorDeinit(&alloc);
return ok;- In
Pdb.c:1762:
}
PdbDeinit(&pdb);
DefaultAllocatorDeinit(&alloc);
return ok;- In
Pdb.c:1817:
}
PdbDeinit(&pdb);
DefaultAllocatorDeinit(&alloc);
return ok;- In
Pdb.c:1882:
}
PdbDeinit(&pdb);
DefaultAllocatorDeinit(&alloc);
return ok;- In
Pdb.c:1945:
}
PdbDeinit(&pdb);
DefaultAllocatorDeinit(&alloc);
return ok;- In
Pdb.c:2003:
}
PdbDeinit(&pdb);
DefaultAllocatorDeinit(&alloc);
return ok;- In
Pdb.c:2065:
}
PdbDeinit(&pdb);
DefaultAllocatorDeinit(&alloc);
return ok;- In
Pdb.c:2251:
}
PdbDeinit(&pdb);
DefaultAllocatorDeinit(&alloc);
return ok;- In
Pdb.c:2283:
ok = ok && MemCompare(pi->guid, kGuid, 16) == 0;
PdbDeinit(&pdb);
DefaultAllocatorDeinit(&alloc);
return ok;- In
Pdb.c:2349:
bool ok = !open_ok;
if (open_ok)
PdbDeinit(&pdb);
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:2373:
MemCompare(pdb.info.guid, kGuid, 16) == 0;
PdbDeinit(&pdb);
DefaultAllocatorDeinit(&alloc);
return ok;- In
Pdb.c:2408:
bool ok = !open_ok;
if (open_ok)
PdbDeinit(&pdb);
// Crux: the fail path must have freed every allocation, including the
- In
Pdb.c:2438:
ok = VecLen(&pdb.functions) == 2;
PdbDeinit(&pdb);
// Everything PdbDeinit owns -- including the name pool -- must be gone.
- In
Pdb.c:2472:
if (ok) {
ok = VecLen(&pdb.functions) == 2 && pdb.info.signature == 0xfeedface;
PdbDeinit(&pdb);
}- In
Pdb.c:2529:
}
PdbDeinit(&pdb);
DefaultAllocatorDeinit(&alloc);
return ok;- In
Pdb.c:2694:
ok = f->rva == 0x6010 && ZstrCompare(f->name, "sixth") == 0;
}
PdbDeinit(&pdb);
}
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:2725:
if (ok) {
ok = VecLen(&pdb.functions) == 0;
PdbDeinit(&pdb);
}
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:2759:
ok = f->rva == 0x1040 && ZstrCompare(f->name, "good") == 0;
}
PdbDeinit(&pdb);
}
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:2795:
ok = ok && c->rva == 0x1300 && c->size == 0; // last -> 0
}
PdbDeinit(&pdb);
}
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:2822:
ok = f->rva == 0x1010 && ZstrCompare(f->name, "named_fn") == 0;
}
PdbDeinit(&pdb);
}
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:2852:
bool rejected = !PdbOpenFromMemoryCopy(&pdb, g_blob_m5, P5_BLOB_SIZE, base);
if (!rejected)
PdbDeinit(&pdb);
DefaultAllocatorDeinit(&alloc);
return rejected; // real: open rejected (walk_publics failed)
- In
Pdb.c:3005:
return -1;
int n = (int)VecLen(&pdb.functions);
PdbDeinit(&pdb);
return n;
}- In
Pdb.c:3042:
ok = f->rva == 0x1100 && ZstrCompare(f->name, "deepblk") == 0;
}
PdbDeinit(&pdb);
DefaultAllocatorDeinit(&alloc);
return ok;- In
Pdb.c:3083:
}
if (opened)
PdbDeinit(&pdb);
// No heap write may have overrun any allocation (canary intact).
ok = ok && DebugAllocatorOverflows(&dbg) == 0;- In
Pdb.c:3124:
}
if (opened)
PdbDeinit(&pdb);
ok = ok && DebugAllocatorOverflows(&dbg) == 0;
DebugAllocatorDeinit(&dbg);
Last updated on