Skip to content
PdbFileOpenFromMemory

PdbFileOpenFromMemory

Description

Open and parse a PDB from an in-memory byte range. The data buffer is borrowed.

Success

Returns true; out->owns_data is false.

Failure

Returns false. out is left zeroed.

Usage example (Cross-references)

Usage examples (Cross-references)
    
        PdbFile pdb;
        bool    ok = PdbFileOpenFromMemory(&pdb, blob, sizeof(blob), base);
        if (!ok) {
            DefaultAllocatorDeinit(&alloc);
    
        PdbFile pdb;
        bool    ok = !PdbFileOpenFromMemory(&pdb, garbage, sizeof(garbage), base);
    
        DefaultAllocatorDeinit(&alloc);
    
        PdbFile pdb;
        bool    ok = PdbFileOpenFromMemory(&pdb, fblob, sizeof(fblob), base);
        if (!ok) {
            DefaultAllocatorDeinit(&alloc);
    // ---------------------------------------------------------------------------
    
    bool PdbFileOpenFromMemory(PdbFile *out, u8 *data, size data_size, Allocator *alloc) {
        if (!out || !data || !alloc) {
            LOG_ERROR("PdbFileOpenFromMemory: NULL argument");
    bool PdbFileOpenFromMemory(PdbFile *out, u8 *data, size data_size, Allocator *alloc) {
        if (!out || !data || !alloc) {
            LOG_ERROR("PdbFileOpenFromMemory: NULL argument");
            return false;
        }
            return false;
        }
        if (!PdbFileOpenFromMemory(out, (u8 *)buf, (size)bytes, alloc)) {
            AllocatorFree(alloc, buf, capacity);
            return false;
Last updated on