PdbOpenFromMemoryCopy
Description
Open and parse a PDB from an in-memory byte range – R-value / copy form (mirrors VecInsertR).
Parser allocates its own buffer through alloc and MemCopys the caller’s bytes in. Caller’s pointer is never retained.
Success
Returns true; out owns an independent copy of data.
Failure
Returns false; out zeroed; caller’s data untouched.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Pdb.c:99:
Pdb pdb;
bool ok = PdbOpenFromMemoryCopy(&pdb, blob, sizeof(blob), base);
if (!ok) {
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:125:
Pdb pdb;
bool ok = !PdbOpenFromMemoryCopy(&pdb, garbage, sizeof(garbage), base);
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:287:
Pdb pdb;
bool ok = PdbOpenFromMemoryCopy(&pdb, fblob, sizeof(fblob), base);
if (!ok) {
DefaultAllocatorDeinit(&alloc);- In
Pdb.c:725:
bool pdb_open_from_memory_copy(Pdb *out, const u8 *data, size data_size, Allocator *alloc) {
if (!out || !data || !alloc) {
LOG_FATAL("PdbOpenFromMemoryCopy: NULL argument (contract violation)");
}
Buf copy = BufInit(alloc);- In
Pdb.c:729:
Buf copy = BufInit(alloc);
if (!BufReserve(©, (u64)data_size)) {
LOG_ERROR("PdbOpenFromMemoryCopy: allocation failed ({} bytes)", (u64)data_size);
return false;
}
Last updated on