moonpdb

    A bounded, pure MoonBit reader for Microsoft PDB 7.0 debug information.

    pdb
    msf
    windows
    debug-info
    symbols
    binary
    Download zip
    Author
    Version
    0.3.2
    License
    Apache-2.0
    Last updated
    1 hour ago
    Downloads
    37

    #MoonPDB

    CI License

    MoonPDB is a pure MoonBit reader for Microsoft PDB 7.0 debug information. It targets Windows native symbolication, crash triage, build artifact audits, and debugger or language-tool integrations.

    The project is developed in independently testable layers:

    1. MSF container and stream directory
    2. PDB Info stream and named streams
    3. TPI/IPI type records
    4. DBI modules, public/global symbols, and line information
    5. Source lookup, symbolication reports, and inspection CLI

    MoonPDB does not replace MoonBit's existing ELF/DWARF tooling. PDB is a separate Microsoft format that is not read by DWARF parsers.

    #Status

    Pre-release. The API is not stable, but the reader, CLI, and symbolication workflows are usable.

    The current milestones parse the MSF container, the PDB Info stream, TPI/IPI type streams, the DBI structure stream, common CodeView symbol records, and the Publics/GSI address index, Globals name index, C13 line information, and PE address mapping. TPI/IPI includes typed FIELDLIST members and LF_INDEX continuation chains. DBI support includes module descriptors, section contributions, the section map, source-file mapping, EC/type-server substreams, and optional debug stream indexes. C13 source names may come from a module-local StringTable or the global PDB /names stream. See docs/msf.md, docs/pdb-info.md, docs/tpi.md, docs/dbi.md, docs/symbols.md, docs/publics.md, docs/globals.md, docs/c13.md, docs/pdb-names.md, docs/pe.md, and docs/symbolication.md.

    #Usage

    let msf = @moonpdb.parse_msf(file_bytes, @moonpdb.MsfLimits::default()) let info = msf.pdb_info(@moonpdb.PdbInfoLimits::default()) let names_stream = info.named_stream_index("/names") let tpi = msf.tpi(@moonpdb.TpiLimits::default()) let ipi = msf.ipi(@moonpdb.TpiLimits::default()) let int32_type = @moonpdb.simple_type(0x74) let dbi = msf.dbi(@moonpdb.DbiLimits::default()) let modules = dbi.modules() let module_debug = msf.module_debug_stream( dbi, 0, @moonpdb.SymbolLimits::default(), ) let symbols = module_debug.symbols() let publics = msf.publics_stream( dbi, @moonpdb.SymbolLimits::default(), ) let nearest_public = publics.find_public_nearest(1, 0x1000) let globals = msf.globals_stream( dbi, @moonpdb.SymbolLimits::default(), ) let matches = globals.find_records_by_name("main") let lines = msf.module_c13_info( dbi, 0, @moonpdb.SymbolLimits::default(), @moonpdb.C13Limits::default(), ) let source = lines.find_line(1, 0x1000) let pe = @moonpdb.parse_pe_image(pe_bytes, @moonpdb.PeLimits::default()) let report = @moonpdb.symbolicate_address( pe, publics, [lines], 1, 0x1000, )

    All parsers validate file sizes, stream counts, directory sizes, and allocation limits before reading untrusted data.

    #CLI

    moon run cmd/main -- summary test-data/llvm/global-name-lookup.pdb moon run cmd/main -- modules test-data/llvm/global-name-lookup.pdb moon run cmd/main -- types test-data/llvm/global-name-lookup.pdb 20 moon run cmd/main -- symbols test-data/llvm/global-name-lookup.pdb 20 moon run cmd/main -- publics test-data/llvm/global-name-lookup.pdb 20 moon run cmd/main -- find test-data/llvm/global-name-lookup.pdb main moon run cmd/main -- address app.exe app.pdb 1 0x1000

    The repository includes pinned LLVM PDB and PE fixtures with checksums and license provenance in test-data/llvm, plus a reproducible matching PE/PDB source-line fixture in test-data/demo.

    #Documentation

    #License

    Apache-2.0.

    DbiError

    pub suberror DbiError {
    TruncatedDbi(Int)
    InvalidDbiHeader(String)
    UnsupportedDbiVersion(UInt)
    UnsupportedSectionContributionVersion(UInt)
    InvalidDbiModule(String)
    InvalidSectionContribution(String)
    InvalidSectionMap(String)
    InvalidFileInfo(String)
    DbiStreamUnavailable
    DbiLimitExceeded(String)
    }

    Errors raised while reading the PDB DBI stream.

    MsfError

    pub suberror MsfError {
    TooSmall(Int)
    BadMagic
    UnsupportedBlockSize(Int)
    InvalidBlockCount(Int)
    InvalidFreeBlockMap(Int)
    InvalidBlockIndex(Int)
    Truncated(Int)
    InvalidDirectory(String)
    InvalidStream(Int)
    LimitExceeded(String)
    InvalidValue(String)
    }

    Errors raised while reading an MSF/PDB container.

    PdbInfoError

    pub suberror PdbInfoError {
    TruncatedInfo(Int)
    InvalidInfoValue(String)
    InvalidNamedStream(String)
    InfoStreamUnavailable
    LimitExceededInfo(String)
    }

    Errors raised while reading the PDB Info stream.

    PeError

    pub suberror PeError {
    TooSmallPe(Int)
    BadDosMagic
    BadPeSignature
    TruncatedPe(Int)
    UnsupportedPeOptionalHeader(UInt16)
    InvalidPeSection(String)
    PeLimitExceeded(String)
    }

    Errors raised while reading the PE image needed for PDB address mapping.

    SymbolError

    pub suberror SymbolError {
    TruncatedSymbol(Int)
    InvalidSymbolRecord(String)
    InvalidModuleStream(String)
    UnsupportedModuleSignature(UInt)
    SymbolStreamUnavailable(UInt16)
    ModuleStreamUnavailable(UInt16)
    SymbolLimitExceeded(String)
    TruncatedPublics(Int)
    InvalidPublicsHeader(String)
    UnsupportedGsiVersion(UInt)
    InvalidGsi(String)
    PublicsStreamUnavailable(UInt16)
    InvalidPublicSymbol(String)
    PublicsLimitExceeded(String)
    GlobalsStreamUnavailable(UInt16)
    InvalidGlobalIndex(String)
    TruncatedC13(Int)
    InvalidC13Subsection(String)
    InvalidFileChecksum(String)
    InvalidLineInfo(String)
    MissingC13StringTable
    C13LimitExceeded(String)
    InvalidPdbStringTable(String)
    PdbStringTableUnavailable
    }

    Errors raised while reading CodeView symbol and module-debug streams.

    TpiError

    pub suberror TpiError {
    TruncatedTpi(Int)
    InvalidTpiHeader(String)
    InvalidTypeRecord(String)
    TypeStreamUnavailable(Int)
    TpiLimitExceeded(String)
    }

    Errors raised while reading a TPI or IPI CodeView type stream.

    AggregateType

    pub struct AggregateType {
    leaf_kind : UInt16
    member_count : UInt16
    properties : UInt16
    field_list : UInt
    derived_from : UInt
    vtable_shape : UInt
    size : NumericValue
    name : String
    unique_name : String?
    }

    AggregateType::derived_from

    fn AggregateType::derived_from(self : AggregateType) -> UInt

    AggregateType::field_list

    fn AggregateType::field_list(self : AggregateType) -> UInt

    AggregateType::has_unique_name

    fn AggregateType::has_unique_name(self : AggregateType) -> Bool

    AggregateType::is_forward_reference

    fn AggregateType::is_forward_reference(self : AggregateType) -> Bool

    AggregateType::leaf_kind

    fn AggregateType::leaf_kind(self : AggregateType) -> UInt16

    AggregateType::member_count

    fn AggregateType::member_count(self : AggregateType) -> UInt16

    AggregateType::name

    fn AggregateType::name(self : AggregateType) -> String

    AggregateType::properties

    fn AggregateType::properties(self : AggregateType) -> UInt16

    AggregateType::size

    AggregateType::unique_name

    fn AggregateType::unique_name(self : AggregateType) -> String?

    AggregateType::vtable_shape

    fn AggregateType::vtable_shape(self : AggregateType) -> UInt

    AliasType

    pub struct AliasType {
    underlying_type : UInt
    name : String
    }

    AliasType::name

    fn AliasType::name(self : AliasType) -> String

    AliasType::underlying_type

    fn AliasType::underlying_type(self : AliasType) -> UInt

    ArgListType

    pub struct ArgListType {
    type_indices : Array[UInt]
    }

    ArgListType::count

    fn ArgListType::count(self : ArgListType) -> Int

    ArgListType::type_index

    fn ArgListType::type_index(self : ArgListType, index : Int) -> UInt?

    ArgListType::type_indices

    fn ArgListType::type_indices(self : ArgListType) -> Array[UInt]

    ArrayType

    pub struct ArrayType {
    element_type : UInt
    index_type : UInt
    size : NumericValue
    name : String
    }

    ArrayType::element_type

    fn ArrayType::element_type(self : ArrayType) -> UInt

    ArrayType::index_type

    fn ArrayType::index_type(self : ArrayType) -> UInt

    ArrayType::name

    fn ArrayType::name(self : ArrayType) -> String

    ArrayType::size

    fn ArrayType::size(self : ArrayType) -> NumericValue

    BPRelativeSymbol

    pub struct BPRelativeSymbol {
    offset : Int
    type_index : UInt
    name : String
    }

    BPRelativeSymbol::name

    fn BPRelativeSymbol::name(self : BPRelativeSymbol) -> String

    BPRelativeSymbol::offset

    fn BPRelativeSymbol::offset(self : BPRelativeSymbol) -> Int

    BPRelativeSymbol::type_index

    fn BPRelativeSymbol::type_index(self : BPRelativeSymbol) -> UInt

    BaseClassField

    pub struct BaseClassField {
    attributes : FieldAttributes
    base_type : UInt
    offset : NumericValue
    }

    BaseClassField::attributes

    BaseClassField::base_type

    fn BaseClassField::base_type(self : BaseClassField) -> UInt

    BaseClassField::offset

    BitFieldType

    pub struct BitFieldType {
    underlying_type : UInt
    bit_size : Int
    bit_offset : Int
    }

    BitFieldType::bit_offset

    fn BitFieldType::bit_offset(self : BitFieldType) -> Int

    BitFieldType::bit_size

    fn BitFieldType::bit_size(self : BitFieldType) -> Int

    BitFieldType::underlying_type

    fn BitFieldType::underlying_type(self : BitFieldType) -> UInt

    BlockSymbol

    pub struct BlockSymbol {
    parent : UInt
    end : UInt
    code_size : UInt
    code_offset : UInt
    segment : UInt16
    name : String
    }

    BlockSymbol::code_offset

    fn BlockSymbol::code_offset(self : BlockSymbol) -> UInt

    BlockSymbol::code_size

    fn BlockSymbol::code_size(self : BlockSymbol) -> UInt

    BlockSymbol::end

    fn BlockSymbol::end(self : BlockSymbol) -> UInt

    BlockSymbol::name

    fn BlockSymbol::name(self : BlockSymbol) -> String

    BlockSymbol::parent

    fn BlockSymbol::parent(self : BlockSymbol) -> UInt

    BlockSymbol::segment

    fn BlockSymbol::segment(self : BlockSymbol) -> UInt16

    BuildInfoType

    pub struct BuildInfoType {
    argument_indices : Array[UInt]
    }

    BuildInfoType::argument_indices

    fn BuildInfoType::argument_indices(self : BuildInfoType) -> Array[UInt]

    C13DebugInfo

    pub struct C13DebugInfo {
    subsections : Array[C13Subsection]
    string_table : DebugStringTable?
    checksums : Array[FileChecksum]
    line_fragments : Array[LineFragment]
    }

    Parsed C13 subsections, file checksums, and line contributions.

    C13DebugInfo::file_checksum_at

    fn C13DebugInfo::file_checksum_at(self : C13DebugInfo, index : Int) -> FileChecksum?

    C13DebugInfo::file_checksum_count

    fn C13DebugInfo::file_checksum_count(self : C13DebugInfo) -> Int

    C13DebugInfo::find_line

    fn C13DebugInfo::find_line(self : C13DebugInfo, segment : UInt16, offset : UInt) -> SourceLocation?

    C13DebugInfo::line_fragment_at

    fn C13DebugInfo::line_fragment_at(self : C13DebugInfo, index : Int) -> LineFragment?

    C13DebugInfo::line_fragment_count

    fn C13DebugInfo::line_fragment_count(self : C13DebugInfo) -> Int

    C13DebugInfo::string_table

    fn C13DebugInfo::string_table(self : C13DebugInfo) -> DebugStringTable?

    C13DebugInfo::subsection_at

    fn C13DebugInfo::subsection_at(self : C13DebugInfo, index : Int) -> C13Subsection?

    C13DebugInfo::subsection_count

    fn C13DebugInfo::subsection_count(self : C13DebugInfo) -> Int

    C13Limits

    pub struct C13Limits {
    max_bytes : Int
    max_subsections : Int
    max_file_checksums : Int
    max_line_fragments : Int
    max_line_entries : Int
    }

    Resource limits for one module's C13 debug subsections.

    C13Limits::default

    fn C13Limits::default() -> C13Limits

    C13Subsection

    pub struct C13Subsection {
    kind : UInt
    payload : Bytes
    }

    One raw C13 debug subsection.

    C13Subsection::kind

    fn C13Subsection::kind(self : C13Subsection) -> UInt

    C13Subsection::payload

    fn C13Subsection::payload(self : C13Subsection) -> Bytes

    ConstantSymbol

    pub struct ConstantSymbol {
    type_index : UInt
    value : NumericValue
    name : String
    }

    ConstantSymbol::name

    fn ConstantSymbol::name(self : ConstantSymbol) -> String

    ConstantSymbol::type_index

    fn ConstantSymbol::type_index(self : ConstantSymbol) -> UInt

    ConstantSymbol::value

    DataField

    pub struct DataField {
    attributes : FieldAttributes
    type_index : UInt
    offset : NumericValue
    name : String
    }

    DataField::attributes

    fn DataField::attributes(self : DataField) -> FieldAttributes

    DataField::name

    fn DataField::name(self : DataField) -> String

    DataField::offset

    fn DataField::offset(self : DataField) -> NumericValue

    DataField::type_index

    fn DataField::type_index(self : DataField) -> UInt

    DataSymbol

    pub struct DataSymbol {
    type_index : UInt
    offset : UInt
    segment : UInt16
    name : String
    }

    DataSymbol::name

    fn DataSymbol::name(self : DataSymbol) -> String

    DataSymbol::offset

    fn DataSymbol::offset(self : DataSymbol) -> UInt

    DataSymbol::segment

    fn DataSymbol::segment(self : DataSymbol) -> UInt16

    DataSymbol::type_index

    fn DataSymbol::type_index(self : DataSymbol) -> UInt

    DbiFile

    pub struct DbiFile {
    data : Bytes
    header : DbiHeader
    modules : Array[DbiModule]
    section_contributions : Array[SectionContribution]
    section_contribution_version : SectionContributionVersion
    section_map : SectionMap
    reported_source_file_count : UInt16
    type_server_map : Bytes
    ec_substream : Bytes
    optional_debug_streams : Array[UInt16]
    }

    A parsed DBI stream with its addressable substreams.

    DbiFile::data

    fn DbiFile::data(self : DbiFile) -> Bytes

    DbiFile::debug_stream_index

    fn DbiFile::debug_stream_index(self : DbiFile, kind : DebugStreamKind) -> UInt16?

    DbiFile::ec_substream

    fn DbiFile::ec_substream(self : DbiFile) -> Bytes

    DbiFile::header

    fn DbiFile::header(self : DbiFile) -> DbiHeader

    DbiFile::module_at

    fn DbiFile::module_at(self : DbiFile, index : Int) -> DbiModule?

    DbiFile::module_count

    fn DbiFile::module_count(self : DbiFile) -> Int

    DbiFile::modules

    fn DbiFile::modules(self : DbiFile) -> Array[DbiModule]

    DbiFile::optional_debug_streams

    fn DbiFile::optional_debug_streams(self : DbiFile) -> Array[UInt16]

    DbiFile::reported_source_file_count

    fn DbiFile::reported_source_file_count(self : DbiFile) -> UInt16

    DbiFile::section_contribution

    fn DbiFile::section_contribution(self : DbiFile, index : Int) -> SectionContribution?

    DbiFile::section_contribution_count

    fn DbiFile::section_contribution_count(self : DbiFile) -> Int

    DbiFile::section_contribution_version

    fn DbiFile::section_contribution_version(self : DbiFile) -> SectionContributionVersion

    DbiFile::section_map

    fn DbiFile::section_map(self : DbiFile) -> SectionMap

    DbiFile::source_file_count

    fn DbiFile::source_file_count(self : DbiFile) -> Int

    DbiFile::type_server_map

    fn DbiFile::type_server_map(self : DbiFile) -> Bytes

    DbiHeader

    pub struct DbiHeader {
    version_signature : UInt
    version : UInt
    age : UInt
    global_symbol_stream_index : UInt16
    build_number : UInt16
    public_symbol_stream_index : UInt16
    pdb_dll_version : UInt16
    symbol_record_stream_index : UInt16
    pdb_dll_rebuild : UInt16
    modi_substream_bytes : Int
    section_contributions_bytes : Int
    section_map_bytes : Int
    file_info_bytes : Int
    type_server_map_bytes : Int
    mfc_type_server_index : UInt
    optional_debug_header_bytes : Int
    ec_substream_bytes : Int
    flags : UInt16
    machine_type : UInt16
    reserved : UInt
    }

    The fixed 64-byte header at the start of DBI stream 3.

    DbiHeader::age

    fn DbiHeader::age(self : DbiHeader) -> UInt

    DbiHeader::build_major_version

    fn DbiHeader::build_major_version(self : DbiHeader) -> UInt16

    DbiHeader::build_minor_version

    fn DbiHeader::build_minor_version(self : DbiHeader) -> UInt16

    DbiHeader::build_number

    fn DbiHeader::build_number(self : DbiHeader) -> UInt16

    DbiHeader::ec_substream_bytes

    fn DbiHeader::ec_substream_bytes(self : DbiHeader) -> Int

    DbiHeader::file_info_bytes

    fn DbiHeader::file_info_bytes(self : DbiHeader) -> Int

    DbiHeader::flags

    fn DbiHeader::flags(self : DbiHeader) -> UInt16

    DbiHeader::global_symbol_stream_index

    fn DbiHeader::global_symbol_stream_index(self : DbiHeader) -> UInt16

    DbiHeader::has_c_types

    fn DbiHeader::has_c_types(self : DbiHeader) -> Bool

    DbiHeader::is_incrementally_linked

    fn DbiHeader::is_incrementally_linked(self : DbiHeader) -> Bool

    DbiHeader::is_stripped

    fn DbiHeader::is_stripped(self : DbiHeader) -> Bool

    DbiHeader::machine_type

    fn DbiHeader::machine_type(self : DbiHeader) -> UInt16

    DbiHeader::mfc_type_server_index

    fn DbiHeader::mfc_type_server_index(self : DbiHeader) -> UInt

    DbiHeader::modi_substream_bytes

    fn DbiHeader::modi_substream_bytes(self : DbiHeader) -> Int

    DbiHeader::optional_debug_header_bytes

    fn DbiHeader::optional_debug_header_bytes(self : DbiHeader) -> Int

    DbiHeader::pdb_dll_rebuild

    fn DbiHeader::pdb_dll_rebuild(self : DbiHeader) -> UInt16

    DbiHeader::pdb_dll_version

    fn DbiHeader::pdb_dll_version(self : DbiHeader) -> UInt16

    DbiHeader::public_symbol_stream_index

    fn DbiHeader::public_symbol_stream_index(self : DbiHeader) -> UInt16

    DbiHeader::reserved

    fn DbiHeader::reserved(self : DbiHeader) -> UInt

    DbiHeader::section_contributions_bytes

    fn DbiHeader::section_contributions_bytes(self : DbiHeader) -> Int

    DbiHeader::section_map_bytes

    fn DbiHeader::section_map_bytes(self : DbiHeader) -> Int

    DbiHeader::symbol_record_stream_index

    fn DbiHeader::symbol_record_stream_index(self : DbiHeader) -> UInt16

    DbiHeader::type_server_map_bytes

    fn DbiHeader::type_server_map_bytes(self : DbiHeader) -> Int

    DbiHeader::uses_new_version_format

    fn DbiHeader::uses_new_version_format(self : DbiHeader) -> Bool

    DbiHeader::version

    fn DbiHeader::version(self : DbiHeader) -> UInt

    DbiHeader::version_signature

    fn DbiHeader::version_signature(self : DbiHeader) -> UInt

    DbiLimits

    pub struct DbiLimits {
    max_stream_bytes : Int
    max_modules : Int
    max_section_contributions : Int
    max_section_map_entries : Int
    max_source_files : Int
    max_string_bytes : Int
    max_debug_streams : Int
    }

    Resource limits for parsing the DBI stream.

    DbiLimits::default

    fn DbiLimits::default() -> DbiLimits

    DbiModule

    pub struct DbiModule {
    record_index : Int
    module_name : String
    object_name : String
    section_contribution : SectionContribution
    flags : UInt16
    module_stream_index : UInt16
    symbol_debug_bytes : UInt
    c11_line_bytes : UInt
    c13_line_bytes : UInt
    declared_source_file_count : UInt16
    source_file_name_index : UInt
    pdb_file_path_index : UInt
    source_files : Array[String]
    }

    One variable-length module descriptor from the MODI substream.

    DbiModule::c11_line_bytes

    fn DbiModule::c11_line_bytes(self : DbiModule) -> UInt

    DbiModule::c13_line_bytes

    fn DbiModule::c13_line_bytes(self : DbiModule) -> UInt

    DbiModule::declared_source_file_count

    fn DbiModule::declared_source_file_count(self : DbiModule) -> UInt16

    DbiModule::flags

    fn DbiModule::flags(self : DbiModule) -> UInt16

    DbiModule::has_ec_info

    fn DbiModule::has_ec_info(self : DbiModule) -> Bool

    DbiModule::module_name

    fn DbiModule::module_name(self : DbiModule) -> String

    DbiModule::module_stream_index

    fn DbiModule::module_stream_index(self : DbiModule) -> UInt16

    DbiModule::object_name

    fn DbiModule::object_name(self : DbiModule) -> String

    DbiModule::pdb_file_path_index

    fn DbiModule::pdb_file_path_index(self : DbiModule) -> UInt

    DbiModule::record_index

    fn DbiModule::record_index(self : DbiModule) -> Int

    DbiModule::section_contribution

    fn DbiModule::section_contribution(self : DbiModule) -> SectionContribution

    DbiModule::source_file_name_index

    fn DbiModule::source_file_name_index(self : DbiModule) -> UInt

    DbiModule::source_files

    fn DbiModule::source_files(self : DbiModule) -> Array[String]

    DbiModule::symbol_debug_bytes

    fn DbiModule::symbol_debug_bytes(self : DbiModule) -> UInt

    DbiModule::type_server_index

    fn DbiModule::type_server_index(self : DbiModule) -> UInt16

    DebugStreamKind

    pub enum DebugStreamKind {
    Fpo
    Exception
    Fixup
    OmapToSrc
    OmapFromSrc
    SectionHdr
    TokenRidMap
    Xdata
    Pdata
    NewFpo
    SectionHdrOrig
    }

    Optional indexed streams listed in the DBI debug header.

    DebugStreamKind::all

    DebugStringTable

    pub struct DebugStringTable {
    bytes : Bytes
    }

    A flat CodeView string table addressed by byte offsets.

    DebugStringTable::bytes

    fn DebugStringTable::bytes(self : DebugStringTable) -> Bytes

    DebugStringTable::string_at

    fn DebugStringTable::string_at(self : DebugStringTable, offset : UInt) -> String?

    EnumType

    pub struct EnumType {
    member_count : UInt16
    properties : UInt16
    underlying_type : UInt
    field_list : UInt
    name : String
    unique_name : String?
    }

    EnumType::field_list

    fn EnumType::field_list(self : EnumType) -> UInt

    EnumType::member_count

    fn EnumType::member_count(self : EnumType) -> UInt16

    EnumType::name

    fn EnumType::name(self : EnumType) -> String

    EnumType::properties

    fn EnumType::properties(self : EnumType) -> UInt16

    EnumType::underlying_type

    fn EnumType::underlying_type(self : EnumType) -> UInt

    EnumType::unique_name

    fn EnumType::unique_name(self : EnumType) -> String?

    EnumeratedField

    pub struct EnumeratedField {
    attributes : FieldAttributes
    value : NumericValue
    name : String
    }

    EnumeratedField::attributes

    EnumeratedField::name

    fn EnumeratedField::name(self : EnumeratedField) -> String

    EnumeratedField::value

    FieldAttributes

    pub struct FieldAttributes {
    raw : UInt16
    }

    CodeView field attributes shared by members, bases, and enumerators.

    FieldAttributes::access

    fn FieldAttributes::access(self : FieldAttributes) -> UInt16

    FieldAttributes::is_introducing_virtual

    fn FieldAttributes::is_introducing_virtual(self : FieldAttributes) -> Bool

    FieldAttributes::method_kind

    fn FieldAttributes::method_kind(self : FieldAttributes) -> UInt16

    FieldAttributes::raw

    fn FieldAttributes::raw(self : FieldAttributes) -> UInt16

    FieldListMember

    pub enum FieldListMember {
    BaseClass(BaseClassField)
    VirtualBaseClass(VirtualBaseClassField)
    Data(DataField)
    StaticData(StaticDataField)
    Enumerated(EnumeratedField)
    OverloadedMethod(OverloadedMethodField)
    NestedType(NestedTypeField)
    OneMethod(OneMethodField)
    VFunctionTable(VFunctionTableField)
    FriendClass(FriendClassField)
    UnknownTail(UnknownFieldTail)
    }

    FieldListType

    pub struct FieldListType {
    bytes : Bytes
    members : Array[FieldListMember]
    continuation : UInt?
    }

    FieldListType::bytes

    fn FieldListType::bytes(self : FieldListType) -> Bytes

    FieldListType::continuation

    fn FieldListType::continuation(self : FieldListType) -> UInt?

    FieldListType::member_at

    fn FieldListType::member_at(self : FieldListType, index : Int) -> FieldListMember?

    FieldListType::member_count

    fn FieldListType::member_count(self : FieldListType) -> Int

    FieldListType::members

    FileChecksum

    pub struct FileChecksum {
    subsection_offset : UInt
    file_name_offset : UInt
    kind : Int
    checksum : Bytes
    file_path : String
    }

    One file-checksum entry in a C13 FileChecksums subsection.

    FileChecksum::checksum

    fn FileChecksum::checksum(self : FileChecksum) -> Bytes

    FileChecksum::file_name_offset

    fn FileChecksum::file_name_offset(self : FileChecksum) -> UInt

    FileChecksum::file_path

    fn FileChecksum::file_path(self : FileChecksum) -> String

    FileChecksum::kind

    fn FileChecksum::kind(self : FileChecksum) -> Int

    FileChecksum::subsection_offset

    fn FileChecksum::subsection_offset(self : FileChecksum) -> UInt

    FrameProcedureSymbol

    pub struct FrameProcedureSymbol {
    total_frame_bytes : UInt
    padding_frame_bytes : UInt
    offset_to_padding : UInt
    callee_saved_bytes : UInt
    exception_handler_offset : UInt
    exception_handler_section : UInt16
    flags : UInt
    }

    FrameProcedureSymbol::callee_saved_bytes

    fn FrameProcedureSymbol::callee_saved_bytes(self : FrameProcedureSymbol) -> UInt

    FrameProcedureSymbol::exception_handler_offset

    fn FrameProcedureSymbol::exception_handler_offset(self : FrameProcedureSymbol) -> UInt

    FrameProcedureSymbol::exception_handler_section

    fn FrameProcedureSymbol::exception_handler_section(self : FrameProcedureSymbol) -> UInt16

    FrameProcedureSymbol::flags

    fn FrameProcedureSymbol::flags(self : FrameProcedureSymbol) -> UInt

    FrameProcedureSymbol::offset_to_padding

    fn FrameProcedureSymbol::offset_to_padding(self : FrameProcedureSymbol) -> UInt

    FrameProcedureSymbol::padding_frame_bytes

    fn FrameProcedureSymbol::padding_frame_bytes(self : FrameProcedureSymbol) -> UInt

    FrameProcedureSymbol::total_frame_bytes

    fn FrameProcedureSymbol::total_frame_bytes(self : FrameProcedureSymbol) -> UInt

    FriendClassField

    pub struct FriendClassField {
    type_index : UInt
    }

    FriendClassField::type_index

    fn FriendClassField::type_index(self : FriendClassField) -> UInt

    FunctionIdType

    pub struct FunctionIdType {
    parent_scope : UInt
    function_type : UInt
    name : String
    }

    FunctionIdType::function_type

    fn FunctionIdType::function_type(self : FunctionIdType) -> UInt

    FunctionIdType::name

    fn FunctionIdType::name(self : FunctionIdType) -> String

    FunctionIdType::parent_scope

    fn FunctionIdType::parent_scope(self : FunctionIdType) -> UInt

    GlobalsStream

    pub struct GlobalsStream {
    gsi : GsiTable
    symbols : SymbolTable
    max_results : Int
    }

    The Globals/GSI stream and the symbol records it indexes.

    GlobalsStream::find_records_by_name

    fn GlobalsStream::find_records_by_name(self : GlobalsStream, name : String) -> Array[SymbolRecord] raise SymbolError

    Return all symbol records whose exact names match name.

    GlobalsStream::gsi

    GlobalsStream::symbols

    fn GlobalsStream::symbols(self : GlobalsStream) -> SymbolTable

    GsiHashHeader

    pub struct GsiHashHeader {
    signature : UInt
    version : UInt
    hash_record_bytes : UInt
    declared_bucket_count : UInt
    }

    The fixed header before a Publics or Globals GSI hash table.

    GsiHashHeader::declared_bucket_count

    fn GsiHashHeader::declared_bucket_count(self : GsiHashHeader) -> UInt

    GsiHashHeader::hash_record_bytes

    fn GsiHashHeader::hash_record_bytes(self : GsiHashHeader) -> UInt

    GsiHashHeader::signature

    fn GsiHashHeader::signature(self : GsiHashHeader) -> UInt

    GsiHashHeader::version

    fn GsiHashHeader::version(self : GsiHashHeader) -> UInt

    GsiHashRecord

    pub struct GsiHashRecord {
    raw_offset : UInt
    reference_count : UInt
    }

    One GSI hash record. On-disk offsets are stored one greater than zero.

    GsiHashRecord::raw_offset

    fn GsiHashRecord::raw_offset(self : GsiHashRecord) -> UInt

    GsiHashRecord::reference_count

    fn GsiHashRecord::reference_count(self : GsiHashRecord) -> UInt

    GsiHashRecord::symbol_offset

    fn GsiHashRecord::symbol_offset(self : GsiHashRecord) -> UInt?

    GsiTable

    pub struct GsiTable {
    header : GsiHashHeader
    hash_records : Array[GsiHashRecord]
    bitmap : Array[UInt]
    buckets : Array[UInt]
    bucket_map : Array[Int]
    }

    A parsed GSI hash table, including its compressed bucket map.

    GsiTable::bitmap

    fn GsiTable::bitmap(self : GsiTable) -> Array[UInt]

    GsiTable::bucket_count

    fn GsiTable::bucket_count(self : GsiTable) -> Int

    GsiTable::bucket_map_index

    fn GsiTable::bucket_map_index(self : GsiTable, expanded_bucket : Int) -> Int?

    GsiTable::buckets

    fn GsiTable::buckets(self : GsiTable) -> Array[UInt]

    GsiTable::hash_record_at

    fn GsiTable::hash_record_at(self : GsiTable, index : Int) -> GsiHashRecord?

    GsiTable::hash_record_count

    fn GsiTable::hash_record_count(self : GsiTable) -> Int

    GsiTable::hash_records

    fn GsiTable::hash_records(self : GsiTable) -> Array[GsiHashRecord]

    GsiTable::header

    fn GsiTable::header(self : GsiTable) -> GsiHashHeader

    LabelSymbol

    pub struct LabelSymbol {
    code_offset : UInt
    segment : UInt16
    flags : Int
    name : String
    }

    LabelSymbol::code_offset

    fn LabelSymbol::code_offset(self : LabelSymbol) -> UInt

    LabelSymbol::flags

    fn LabelSymbol::flags(self : LabelSymbol) -> Int

    LabelSymbol::name

    fn LabelSymbol::name(self : LabelSymbol) -> String

    LabelSymbol::segment

    fn LabelSymbol::segment(self : LabelSymbol) -> UInt16

    LabelType

    pub struct LabelType {
    mode : UInt16
    }

    LabelType::mode

    fn LabelType::mode(self : LabelType) -> UInt16

    LineBlock

    pub struct LineBlock {
    file_checksum_offset : UInt
    file_path : String
    record_size : UInt
    lines : Array[LineNumber]
    }

    LineBlock::file_checksum_offset

    fn LineBlock::file_checksum_offset(self : LineBlock) -> UInt

    LineBlock::file_path

    fn LineBlock::file_path(self : LineBlock) -> String

    LineBlock::line_at

    fn LineBlock::line_at(self : LineBlock, index : Int) -> LineNumber?

    LineBlock::line_count

    fn LineBlock::line_count(self : LineBlock) -> Int

    LineBlock::record_size

    fn LineBlock::record_size(self : LineBlock) -> UInt

    LineColumnRange

    pub struct LineColumnRange {
    start : UInt16
    end : UInt16
    }

    LineColumnRange::end

    fn LineColumnRange::end(self : LineColumnRange) -> UInt16

    LineColumnRange::start

    fn LineColumnRange::start(self : LineColumnRange) -> UInt16

    LineFragment

    pub struct LineFragment {
    relocation_offset : UInt
    relocation_segment : UInt16
    flags : UInt16
    code_size : UInt
    blocks : Array[LineBlock]
    }

    LineFragment::block_at

    fn LineFragment::block_at(self : LineFragment, index : Int) -> LineBlock?

    LineFragment::block_count

    fn LineFragment::block_count(self : LineFragment) -> Int

    LineFragment::code_size

    fn LineFragment::code_size(self : LineFragment) -> UInt

    LineFragment::flags

    fn LineFragment::flags(self : LineFragment) -> UInt16

    LineFragment::has_columns

    fn LineFragment::has_columns(self : LineFragment) -> Bool

    LineFragment::relocation_offset

    fn LineFragment::relocation_offset(self : LineFragment) -> UInt

    LineFragment::relocation_segment

    fn LineFragment::relocation_segment(self : LineFragment) -> UInt16

    LineNumber

    pub struct LineNumber {
    offset : UInt
    line_start : UInt
    line_end : UInt
    is_statement : Bool
    columns : LineColumnRange?
    }

    LineNumber::columns

    fn LineNumber::columns(self : LineNumber) -> LineColumnRange?

    LineNumber::is_statement

    fn LineNumber::is_statement(self : LineNumber) -> Bool

    LineNumber::line_end

    fn LineNumber::line_end(self : LineNumber) -> UInt

    LineNumber::line_start

    fn LineNumber::line_start(self : LineNumber) -> UInt

    LineNumber::offset

    fn LineNumber::offset(self : LineNumber) -> UInt

    MemberFunctionIdType

    pub struct MemberFunctionIdType {
    class_type : UInt
    function_type : UInt
    name : String
    }

    MemberFunctionIdType::class_type

    fn MemberFunctionIdType::class_type(self : MemberFunctionIdType) -> UInt

    MemberFunctionIdType::function_type

    fn MemberFunctionIdType::function_type(self : MemberFunctionIdType) -> UInt

    MemberFunctionIdType::name

    fn MemberFunctionIdType::name(self : MemberFunctionIdType) -> String

    MemberFunctionType

    pub struct MemberFunctionType {
    return_type : UInt
    class_type : UInt
    this_type : UInt
    calling_convention : Int
    function_options : Int
    parameter_count : UInt16
    argument_list : UInt
    this_adjustment : Int
    }

    MemberFunctionType::argument_list

    fn MemberFunctionType::argument_list(self : MemberFunctionType) -> UInt

    MemberFunctionType::calling_convention

    fn MemberFunctionType::calling_convention(self : MemberFunctionType) -> Int

    MemberFunctionType::class_type

    fn MemberFunctionType::class_type(self : MemberFunctionType) -> UInt

    MemberFunctionType::function_options

    fn MemberFunctionType::function_options(self : MemberFunctionType) -> Int

    MemberFunctionType::parameter_count

    fn MemberFunctionType::parameter_count(self : MemberFunctionType) -> UInt16

    MemberFunctionType::return_type

    fn MemberFunctionType::return_type(self : MemberFunctionType) -> UInt

    MemberFunctionType::this_adjustment

    fn MemberFunctionType::this_adjustment(self : MemberFunctionType) -> Int

    MemberFunctionType::this_type

    fn MemberFunctionType::this_type(self : MemberFunctionType) -> UInt

    ModifierType

    pub struct ModifierType {
    modified_type : UInt
    modifiers : UInt16
    }

    ModifierType::is_const

    fn ModifierType::is_const(self : ModifierType) -> Bool

    ModifierType::is_unaligned

    fn ModifierType::is_unaligned(self : ModifierType) -> Bool

    ModifierType::is_volatile

    fn ModifierType::is_volatile(self : ModifierType) -> Bool

    ModifierType::modified_type

    fn ModifierType::modified_type(self : ModifierType) -> UInt

    ModifierType::modifiers

    fn ModifierType::modifiers(self : ModifierType) -> UInt16

    ModuleDebugStream

    pub struct ModuleDebugStream {
    signature : UInt
    symbols : SymbolTable
    c11_lines : Bytes
    c13_lines : Bytes
    global_refs : Array[UInt]
    }

    One module debug stream split into symbols, line data, and global refs.

    ModuleDebugStream::c11_lines

    fn ModuleDebugStream::c11_lines(self : ModuleDebugStream) -> Bytes

    ModuleDebugStream::c13_info

    fn ModuleDebugStream::c13_info(self : ModuleDebugStream, limits : C13Limits) -> C13DebugInfo raise SymbolError

    Parse the C13 subsection buffer stored in a module debug stream.

    ModuleDebugStream::c13_info_with_fallback

    fn ModuleDebugStream::c13_info_with_fallback(self : ModuleDebugStream, fallback : DebugStringTable?, limits : C13Limits) -> C13DebugInfo raise SymbolError

    Parse C13 data with a PDB /names table fallback.

    ModuleDebugStream::c13_lines

    fn ModuleDebugStream::c13_lines(self : ModuleDebugStream) -> Bytes

    ModuleDebugStream::global_refs

    fn ModuleDebugStream::global_refs(self : ModuleDebugStream) -> Array[UInt]

    ModuleDebugStream::signature

    fn ModuleDebugStream::signature(self : ModuleDebugStream) -> UInt

    ModuleDebugStream::symbols

    MsfFile

    pub struct MsfFile {
    data : Bytes
    header : MsfHeader
    streams : Array[MsfStream]
    }

    A parsed MSF container with bounded stream access.

    MsfFile::dbi

    fn MsfFile::dbi(self : MsfFile, limits : DbiLimits) -> DbiFile raise DbiError

    Parse stream 3 of an MSF file as the DBI stream.

    MsfFile::globals_stream

    fn MsfFile::globals_stream(self : MsfFile, dbi : DbiFile, limits : SymbolLimits) -> GlobalsStream raise SymbolError

    Read the Globals/GSI stream referenced by the DBI header.

    MsfFile::header

    fn MsfFile::header(self : MsfFile) -> MsfHeader

    MsfFile::ipi

    fn MsfFile::ipi(self : MsfFile, limits : TpiLimits) -> TypeTable raise TpiError

    Parse stream 4 of an MSF file as an IPI type table.

    MsfFile::module_c13_info

    fn MsfFile::module_c13_info(self : MsfFile, dbi : DbiFile, module_index : Int, symbol_limits : SymbolLimits, limits : C13Limits) -> C13DebugInfo raise SymbolError

    Read a module debug stream and parse its C13 line information.

    MsfFile::module_debug_stream

    fn MsfFile::module_debug_stream(self : MsfFile, dbi : DbiFile, module_index : Int, limits : SymbolLimits) -> ModuleDebugStream raise SymbolError

    Read and parse one module's debug stream.

    MsfFile::pdb_info

    fn MsfFile::pdb_info(self : MsfFile, limits : PdbInfoLimits) -> PdbInfo raise PdbInfoError

    Parse stream 1 of an already parsed MSF file.

    MsfFile::pdb_string_table

    fn MsfFile::pdb_string_table(self : MsfFile, info : PdbInfo, name : String, limits : PdbStringTableLimits) -> PdbStringTable raise SymbolError

    Read and parse a named PDB string table.

    MsfFile::publics_stream

    fn MsfFile::publics_stream(self : MsfFile, dbi : DbiFile, limits : SymbolLimits) -> PublicsStream raise SymbolError

    Read the Publics stream referenced by DBI and resolve its address map.

    MsfFile::stream

    fn MsfFile::stream(self : MsfFile, index : Int) -> Bytes raise MsfError

    Return the logical bytes of one stream.

    MsfFile::stream_count

    fn MsfFile::stream_count(self : MsfFile) -> Int

    MsfFile::stream_info

    fn MsfFile::stream_info(self : MsfFile, index : Int) -> MsfStream raise MsfError

    MsfFile::symbol_record_stream

    fn MsfFile::symbol_record_stream(self : MsfFile, dbi : DbiFile, limits : SymbolLimits) -> SymbolTable raise SymbolError

    Parse the symbol-record stream referenced by the DBI header.

    MsfFile::tpi

    fn MsfFile::tpi(self : MsfFile, limits : TpiLimits) -> TypeTable raise TpiError

    Parse stream 2 of an MSF file as a TPI type table.

    MsfHeader

    pub struct MsfHeader {
    block_size : Int
    free_block_map_block : Int
    num_blocks : Int
    num_directory_bytes : Int
    block_map_addr : Int
    }

    The fixed MSF 7.0 superblock fields that describe the container layout.

    MsfHeader::block_map_addr

    fn MsfHeader::block_map_addr(self : MsfHeader) -> Int

    MsfHeader::block_size

    fn MsfHeader::block_size(self : MsfHeader) -> Int

    MsfHeader::free_block_map_block

    fn MsfHeader::free_block_map_block(self : MsfHeader) -> Int

    MsfHeader::num_blocks

    fn MsfHeader::num_blocks(self : MsfHeader) -> Int

    MsfHeader::num_directory_bytes

    fn MsfHeader::num_directory_bytes(self : MsfHeader) -> Int

    MsfLimits

    pub struct MsfLimits {
    max_file_bytes : Int
    max_directory_bytes : Int
    max_streams : Int
    max_stream_bytes : Int
    }

    Resource limits for parsing untrusted MSF files.

    MsfLimits::default

    fn MsfLimits::default() -> MsfLimits

    MsfStream

    pub struct MsfStream {
    index : Int
    size : Int
    blocks : Array[Int]
    }

    One stream and the physical file blocks that contain it.

    MsfStream::block_count

    fn MsfStream::block_count(self : MsfStream) -> Int

    MsfStream::index

    fn MsfStream::index(self : MsfStream) -> Int

    MsfStream::size

    fn MsfStream::size(self : MsfStream) -> Int

    NamedStream

    pub struct NamedStream {
    name : String
    stream_index : Int
    }

    One name-to-stream-index entry in the PDB Info stream.

    NamedStream::name

    fn NamedStream::name(self : NamedStream) -> String

    NamedStream::stream_index

    fn NamedStream::stream_index(self : NamedStream) -> Int

    NestedTypeField

    pub struct NestedTypeField {
    type_index : UInt
    name : String
    }

    NestedTypeField::name

    fn NestedTypeField::name(self : NestedTypeField) -> String

    NestedTypeField::type_index

    fn NestedTypeField::type_index(self : NestedTypeField) -> UInt

    NumericValue

    pub enum NumericValue {
    Signed(Int64)
    Unsigned(UInt64)
    Opaque(UInt16, Bytes)
    }

    A CodeView numeric leaf used for sizes, offsets, and enumerator values.

    NumericValue::as_signed

    fn NumericValue::as_signed(self : NumericValue) -> Int64?

    NumericValue::as_unsigned

    fn NumericValue::as_unsigned(self : NumericValue) -> UInt64?

    ObjectNameSymbol

    pub struct ObjectNameSymbol {
    signature : UInt
    name : String
    }

    ObjectNameSymbol::name

    fn ObjectNameSymbol::name(self : ObjectNameSymbol) -> String

    ObjectNameSymbol::signature

    fn ObjectNameSymbol::signature(self : ObjectNameSymbol) -> UInt

    OneMethodField

    pub struct OneMethodField {
    attributes : FieldAttributes
    type_index : UInt
    vtable_offset : Int?
    name : String
    }

    OneMethodField::attributes

    OneMethodField::name

    fn OneMethodField::name(self : OneMethodField) -> String

    OneMethodField::type_index

    fn OneMethodField::type_index(self : OneMethodField) -> UInt

    OneMethodField::vtable_offset

    fn OneMethodField::vtable_offset(self : OneMethodField) -> Int?

    OverloadedMethodField

    pub struct OverloadedMethodField {
    count : UInt16
    method_list : UInt
    name : String
    }

    OverloadedMethodField::count

    fn OverloadedMethodField::count(self : OverloadedMethodField) -> UInt16

    OverloadedMethodField::method_list

    fn OverloadedMethodField::method_list(self : OverloadedMethodField) -> UInt

    OverloadedMethodField::name

    fn OverloadedMethodField::name(self : OverloadedMethodField) -> String

    PdbInfo

    pub struct PdbInfo {
    version : UInt
    signature : UInt
    age : UInt
    guid : Bytes
    named_streams : Array[NamedStream]
    feature_codes : Array[UInt]
    }

    The fixed header and variable sections of the PDB Info stream.

    PdbInfo::age

    fn PdbInfo::age(self : PdbInfo) -> UInt

    PdbInfo::feature_codes

    fn PdbInfo::feature_codes(self : PdbInfo) -> Array[UInt]

    PdbInfo::guid

    fn PdbInfo::guid(self : PdbInfo) -> Bytes

    PdbInfo::guid_string

    fn PdbInfo::guid_string(self : PdbInfo) -> String

    Format the PDB GUID using the conventional Windows field order.

    PdbInfo::has_feature

    fn PdbInfo::has_feature(self : PdbInfo, code : UInt) -> Bool

    PdbInfo::named_stream_count

    fn PdbInfo::named_stream_count(self : PdbInfo) -> Int

    PdbInfo::named_stream_index

    fn PdbInfo::named_stream_index(self : PdbInfo, name : String) -> Int?

    PdbInfo::named_streams

    fn PdbInfo::named_streams(self : PdbInfo) -> Array[NamedStream]

    PdbInfo::signature

    fn PdbInfo::signature(self : PdbInfo) -> UInt

    PdbInfo::version

    fn PdbInfo::version(self : PdbInfo) -> UInt

    PdbInfoLimits

    pub struct PdbInfoLimits {
    max_string_bytes : Int
    max_named_streams : Int
    max_hash_capacity : Int
    max_features : Int
    }

    Resource limits for the PDB Info stream.

    PdbInfoLimits::default

    fn PdbInfoLimits::default() -> PdbInfoLimits

    PdbStringTable

    pub struct PdbStringTable {
    signature : UInt
    hash_version : UInt
    strings : DebugStringTable
    name_ids : Array[UInt]
    name_count : UInt
    }

    Parsed PDB /names stream.

    PdbStringTable::hash_version

    fn PdbStringTable::hash_version(self : PdbStringTable) -> UInt

    PdbStringTable::name_count

    fn PdbStringTable::name_count(self : PdbStringTable) -> UInt

    PdbStringTable::name_id_at

    fn PdbStringTable::name_id_at(self : PdbStringTable, index : Int) -> UInt?

    PdbStringTable::name_id_count

    fn PdbStringTable::name_id_count(self : PdbStringTable) -> Int

    PdbStringTable::signature

    fn PdbStringTable::signature(self : PdbStringTable) -> UInt

    PdbStringTable::string_for_id

    fn PdbStringTable::string_for_id(self : PdbStringTable, id : UInt) -> String?

    PdbStringTable::strings

    PdbStringTableLimits

    pub struct PdbStringTableLimits {
    max_bytes : Int
    max_names : Int
    }

    Resource limits for the PDB /names string table.

    PdbStringTableLimits::default

    PeImage

    pub struct PeImage {
    machine : UInt16
    section_count : UInt16
    timestamp : UInt
    optional_magic : UInt16
    image_base : UInt64
    sections : Array[PeSection]
    }

    PeImage::image_base

    fn PeImage::image_base(self : PeImage) -> UInt64

    PeImage::machine

    fn PeImage::machine(self : PeImage) -> UInt16

    PeImage::map_segment_offset

    fn PeImage::map_segment_offset(self : PeImage, segment : UInt16, offset : UInt) -> RvaLocation?

    PeImage::optional_magic

    fn PeImage::optional_magic(self : PeImage) -> UInt16

    PeImage::section_at

    fn PeImage::section_at(self : PeImage, index : Int) -> PeSection?

    PeImage::section_count

    fn PeImage::section_count(self : PeImage) -> UInt16

    PeImage::timestamp

    fn PeImage::timestamp(self : PeImage) -> UInt

    PeLimits

    pub struct PeLimits {
    max_file_bytes : Int
    max_sections : Int
    }

    Resource limits for parsing a PE image.

    PeLimits::default

    fn PeLimits::default() -> PeLimits

    PeSection

    pub struct PeSection {
    name : String
    virtual_size : UInt
    virtual_address : UInt
    raw_size : UInt
    raw_pointer : UInt
    characteristics : UInt
    }

    PeSection::characteristics

    fn PeSection::characteristics(self : PeSection) -> UInt

    PeSection::name

    fn PeSection::name(self : PeSection) -> String

    PeSection::raw_pointer

    fn PeSection::raw_pointer(self : PeSection) -> UInt

    PeSection::raw_size

    fn PeSection::raw_size(self : PeSection) -> UInt

    PeSection::virtual_address

    fn PeSection::virtual_address(self : PeSection) -> UInt

    PeSection::virtual_size

    fn PeSection::virtual_size(self : PeSection) -> UInt

    PeSection::virtual_span

    fn PeSection::virtual_span(self : PeSection) -> UInt

    PointerType

    pub struct PointerType {
    referent_type : UInt
    attributes : UInt
    containing_type : UInt?
    member_representation : UInt16?
    }

    PointerType::attributes

    fn PointerType::attributes(self : PointerType) -> UInt

    PointerType::byte_size

    fn PointerType::byte_size(self : PointerType) -> Int

    PointerType::containing_type

    fn PointerType::containing_type(self : PointerType) -> UInt?

    PointerType::is_const

    fn PointerType::is_const(self : PointerType) -> Bool

    PointerType::is_restrict

    fn PointerType::is_restrict(self : PointerType) -> Bool

    PointerType::is_unaligned

    fn PointerType::is_unaligned(self : PointerType) -> Bool

    PointerType::is_volatile

    fn PointerType::is_volatile(self : PointerType) -> Bool

    PointerType::kind

    fn PointerType::kind(self : PointerType) -> UInt

    PointerType::member_representation

    fn PointerType::member_representation(self : PointerType) -> UInt16?

    PointerType::mode

    fn PointerType::mode(self : PointerType) -> UInt

    PointerType::referent_type

    fn PointerType::referent_type(self : PointerType) -> UInt

    ProcedureReferenceSymbol

    pub struct ProcedureReferenceSymbol {
    name_hash : UInt
    symbol_offset : UInt
    module_index : UInt16
    name : String
    }

    ProcedureReferenceSymbol::module_index

    fn ProcedureReferenceSymbol::module_index(self : ProcedureReferenceSymbol) -> UInt16

    ProcedureReferenceSymbol::name

    ProcedureReferenceSymbol::name_hash

    ProcedureReferenceSymbol::symbol_offset

    fn ProcedureReferenceSymbol::symbol_offset(self : ProcedureReferenceSymbol) -> UInt

    ProcedureSymbol

    pub struct ProcedureSymbol {
    parent : UInt
    end : UInt
    next : UInt
    code_size : UInt
    debug_start : UInt
    debug_end : UInt
    function_type : UInt
    code_offset : UInt
    segment : UInt16
    flags : Int
    name : String
    }

    ProcedureSymbol::code_offset

    fn ProcedureSymbol::code_offset(self : ProcedureSymbol) -> UInt

    ProcedureSymbol::code_size

    fn ProcedureSymbol::code_size(self : ProcedureSymbol) -> UInt

    ProcedureSymbol::debug_end

    fn ProcedureSymbol::debug_end(self : ProcedureSymbol) -> UInt

    ProcedureSymbol::debug_start

    fn ProcedureSymbol::debug_start(self : ProcedureSymbol) -> UInt

    ProcedureSymbol::end

    fn ProcedureSymbol::end(self : ProcedureSymbol) -> UInt

    ProcedureSymbol::flags

    fn ProcedureSymbol::flags(self : ProcedureSymbol) -> Int

    ProcedureSymbol::function_type

    fn ProcedureSymbol::function_type(self : ProcedureSymbol) -> UInt

    ProcedureSymbol::name

    fn ProcedureSymbol::name(self : ProcedureSymbol) -> String

    ProcedureSymbol::next

    fn ProcedureSymbol::next(self : ProcedureSymbol) -> UInt

    ProcedureSymbol::parent

    fn ProcedureSymbol::parent(self : ProcedureSymbol) -> UInt

    ProcedureSymbol::segment

    fn ProcedureSymbol::segment(self : ProcedureSymbol) -> UInt16

    ProcedureType

    pub struct ProcedureType {
    return_type : UInt
    calling_convention : Int
    function_options : Int
    parameter_count : UInt16
    argument_list : UInt
    }

    ProcedureType::argument_list

    fn ProcedureType::argument_list(self : ProcedureType) -> UInt

    ProcedureType::calling_convention

    fn ProcedureType::calling_convention(self : ProcedureType) -> Int

    ProcedureType::function_options

    fn ProcedureType::function_options(self : ProcedureType) -> Int

    ProcedureType::parameter_count

    fn ProcedureType::parameter_count(self : ProcedureType) -> UInt16

    ProcedureType::return_type

    fn ProcedureType::return_type(self : ProcedureType) -> UInt

    PublicSectionOffset

    pub struct PublicSectionOffset {
    offset : UInt
    section : UInt16
    }

    PublicSectionOffset::offset

    fn PublicSectionOffset::offset(self : PublicSectionOffset) -> UInt

    PublicSectionOffset::section

    fn PublicSectionOffset::section(self : PublicSectionOffset) -> UInt16

    PublicSymbol

    pub struct PublicSymbol {
    flags : UInt
    offset : UInt
    segment : UInt16
    name : String
    }

    PublicSymbol::flags

    fn PublicSymbol::flags(self : PublicSymbol) -> UInt

    PublicSymbol::name

    fn PublicSymbol::name(self : PublicSymbol) -> String

    PublicSymbol::offset

    fn PublicSymbol::offset(self : PublicSymbol) -> UInt

    PublicSymbol::segment

    fn PublicSymbol::segment(self : PublicSymbol) -> UInt16

    PublicsHeader

    pub struct PublicsHeader {
    symbol_hash : UInt
    address_map_bytes : UInt
    thunk_count : UInt
    thunk_size : UInt
    thunk_table_section : UInt16
    thunk_table_offset : UInt
    section_count : UInt
    }

    The fixed 28-byte header at the start of the Publics stream.

    PublicsHeader::address_map_bytes

    fn PublicsHeader::address_map_bytes(self : PublicsHeader) -> UInt

    PublicsHeader::section_count

    fn PublicsHeader::section_count(self : PublicsHeader) -> UInt

    PublicsHeader::symbol_hash

    fn PublicsHeader::symbol_hash(self : PublicsHeader) -> UInt

    PublicsHeader::thunk_count

    fn PublicsHeader::thunk_count(self : PublicsHeader) -> UInt

    PublicsHeader::thunk_size

    fn PublicsHeader::thunk_size(self : PublicsHeader) -> UInt

    PublicsHeader::thunk_table_offset

    fn PublicsHeader::thunk_table_offset(self : PublicsHeader) -> UInt

    PublicsHeader::thunk_table_section

    fn PublicsHeader::thunk_table_section(self : PublicsHeader) -> UInt16

    PublicsStream

    pub struct PublicsStream {
    header : PublicsHeader
    gsi : GsiTable
    address_map : Array[UInt]
    thunk_map : Array[UInt]
    section_offsets : Array[PublicSectionOffset]
    public_symbols : Array[ResolvedPublicSymbol]
    }

    The Publics stream, its GSI table, and address-resolved S_PUB32 records.

    PublicsStream::address_map

    fn PublicsStream::address_map(self : PublicsStream) -> Array[UInt]

    PublicsStream::find_public_exact

    fn PublicsStream::find_public_exact(self : PublicsStream, segment : UInt16, offset : UInt) -> ResolvedPublicSymbol?

    PublicsStream::find_public_nearest

    fn PublicsStream::find_public_nearest(self : PublicsStream, segment : UInt16, offset : UInt) -> ResolvedPublicSymbol?

    PublicsStream::gsi

    PublicsStream::header

    PublicsStream::public_symbol_at

    fn PublicsStream::public_symbol_at(self : PublicsStream, index : Int) -> ResolvedPublicSymbol?

    PublicsStream::public_symbol_count

    fn PublicsStream::public_symbol_count(self : PublicsStream) -> Int

    PublicsStream::section_offsets

    fn PublicsStream::section_offsets(self : PublicsStream) -> Array[PublicSectionOffset]

    PublicsStream::thunk_map

    fn PublicsStream::thunk_map(self : PublicsStream) -> Array[UInt]

    RegRelativeSymbol

    pub struct RegRelativeSymbol {
    offset : UInt
    type_index : UInt
    register : UInt16
    name : String
    }

    RegRelativeSymbol::name

    fn RegRelativeSymbol::name(self : RegRelativeSymbol) -> String

    RegRelativeSymbol::offset

    fn RegRelativeSymbol::offset(self : RegRelativeSymbol) -> UInt

    RegRelativeSymbol::register

    fn RegRelativeSymbol::register(self : RegRelativeSymbol) -> UInt16

    RegRelativeSymbol::type_index

    fn RegRelativeSymbol::type_index(self : RegRelativeSymbol) -> UInt

    ResolvedPublicSymbol

    pub struct ResolvedPublicSymbol {
    symbol_offset : UInt
    flags : UInt
    segment : UInt16
    offset : UInt
    name : String
    }

    A Publics address-map entry resolved to its S_PUB32 symbol.

    ResolvedPublicSymbol::flags

    fn ResolvedPublicSymbol::flags(self : ResolvedPublicSymbol) -> UInt

    ResolvedPublicSymbol::name

    fn ResolvedPublicSymbol::name(self : ResolvedPublicSymbol) -> String

    ResolvedPublicSymbol::offset

    fn ResolvedPublicSymbol::offset(self : ResolvedPublicSymbol) -> UInt

    ResolvedPublicSymbol::segment

    fn ResolvedPublicSymbol::segment(self : ResolvedPublicSymbol) -> UInt16

    ResolvedPublicSymbol::symbol_offset

    fn ResolvedPublicSymbol::symbol_offset(self : ResolvedPublicSymbol) -> UInt

    RvaLocation

    pub struct RvaLocation {
    segment : UInt16
    section_offset : UInt
    section_name : String
    rva : UInt
    image_address : UInt64
    }

    A PE section-number and section-relative offset mapped to RVA and VA.

    RvaLocation::image_address

    fn RvaLocation::image_address(self : RvaLocation) -> UInt64

    RvaLocation::rva

    fn RvaLocation::rva(self : RvaLocation) -> UInt

    RvaLocation::section_name

    fn RvaLocation::section_name(self : RvaLocation) -> String

    RvaLocation::section_offset

    fn RvaLocation::section_offset(self : RvaLocation) -> UInt

    RvaLocation::segment

    fn RvaLocation::segment(self : RvaLocation) -> UInt16

    SectionContribution

    pub struct SectionContribution {
    version : SectionContributionVersion
    section_index : UInt16
    offset : Int
    size : Int
    characteristics : UInt
    module_index : UInt16
    data_crc : UInt
    relocation_crc : UInt
    coff_section_index : UInt?
    }

    One section contribution record.

    SectionContribution::characteristics

    fn SectionContribution::characteristics(self : SectionContribution) -> UInt

    SectionContribution::coff_section_index

    fn SectionContribution::coff_section_index(self : SectionContribution) -> UInt?

    SectionContribution::data_crc

    fn SectionContribution::data_crc(self : SectionContribution) -> UInt

    SectionContribution::module_index

    fn SectionContribution::module_index(self : SectionContribution) -> UInt16

    SectionContribution::offset

    fn SectionContribution::offset(self : SectionContribution) -> Int

    SectionContribution::relocation_crc

    fn SectionContribution::relocation_crc(self : SectionContribution) -> UInt

    SectionContribution::section_index

    fn SectionContribution::section_index(self : SectionContribution) -> UInt16

    SectionContribution::size

    SectionContribution::version

    SectionContributionVersion

    pub enum SectionContributionVersion {
    None
    V60
    V2
    }

    The version marker at the start of the section-contribution substream.

    SectionMap

    pub struct SectionMap {
    physical_count : UInt16
    logical_count : UInt16
    entries : Array[SectionMapEntry]
    }

    A parsed section map and its two declared counts.

    SectionMap::entry

    fn SectionMap::entry(self : SectionMap, index : Int) -> SectionMapEntry?

    SectionMap::entry_count

    fn SectionMap::entry_count(self : SectionMap) -> Int

    SectionMap::logical_count

    fn SectionMap::logical_count(self : SectionMap) -> UInt16

    SectionMap::physical_count

    fn SectionMap::physical_count(self : SectionMap) -> UInt16

    SectionMapEntry

    pub struct SectionMapEntry {
    flags : UInt16
    overlay : UInt16
    group : UInt16
    frame : UInt16
    section_name_offset : UInt16
    class_name_offset : UInt16
    offset : UInt
    byte_length : UInt
    }

    One logical-to-physical section mapping.

    SectionMapEntry::byte_length

    fn SectionMapEntry::byte_length(self : SectionMapEntry) -> UInt

    SectionMapEntry::class_name_offset

    fn SectionMapEntry::class_name_offset(self : SectionMapEntry) -> UInt16

    SectionMapEntry::flags

    fn SectionMapEntry::flags(self : SectionMapEntry) -> UInt16

    SectionMapEntry::frame

    fn SectionMapEntry::frame(self : SectionMapEntry) -> UInt16

    SectionMapEntry::group

    fn SectionMapEntry::group(self : SectionMapEntry) -> UInt16

    SectionMapEntry::offset

    fn SectionMapEntry::offset(self : SectionMapEntry) -> UInt

    SectionMapEntry::overlay

    fn SectionMapEntry::overlay(self : SectionMapEntry) -> UInt16

    SectionMapEntry::section_name_offset

    fn SectionMapEntry::section_name_offset(self : SectionMapEntry) -> UInt16

    SimpleType

    pub struct SimpleType {
    raw : UInt
    base : Int
    mode : SimpleTypeMode
    kind : SimpleTypeKind
    name : String
    byte_size : Int
    }

    A decoded simple type index below 0x1000.

    SimpleType::base

    fn SimpleType::base(self : SimpleType) -> Int

    SimpleType::byte_size

    fn SimpleType::byte_size(self : SimpleType) -> Int

    SimpleType::is_pointer

    fn SimpleType::is_pointer(self : SimpleType) -> Bool

    SimpleType::kind

    SimpleType::mode

    SimpleType::name

    fn SimpleType::name(self : SimpleType) -> String

    SimpleType::raw

    fn SimpleType::raw(self : SimpleType) -> UInt

    SimpleTypeKind

    pub enum SimpleTypeKind {
    NoType
    Void
    SignedInteger
    UnsignedInteger
    Boolean
    Real
    Character
    WideCharacter
    Bit
    Unknown
    }

    The logical category of a simple CodeView type.

    SimpleTypeMode

    pub enum SimpleTypeMode {
    Direct
    NearPointer
    FarPointer
    HugePointer
    Pointer32
    FarPointer32
    Pointer64
    Reserved
    }

    The direction represented by a simple CodeView type-index mode.

    SourceLocation

    pub struct SourceLocation {
    segment : UInt16
    code_offset : UInt
    file_path : String
    line_start : UInt
    line_end : UInt
    is_statement : Bool
    columns : LineColumnRange?
    }

    A resolved source line at a segment-relative code offset.

    SourceLocation::code_offset

    fn SourceLocation::code_offset(self : SourceLocation) -> UInt

    SourceLocation::columns

    SourceLocation::file_path

    fn SourceLocation::file_path(self : SourceLocation) -> String

    SourceLocation::is_statement

    fn SourceLocation::is_statement(self : SourceLocation) -> Bool

    SourceLocation::line_end

    fn SourceLocation::line_end(self : SourceLocation) -> UInt

    SourceLocation::line_start

    fn SourceLocation::line_start(self : SourceLocation) -> UInt

    SourceLocation::segment

    fn SourceLocation::segment(self : SourceLocation) -> UInt16

    StaticDataField

    pub struct StaticDataField {
    attributes : FieldAttributes
    type_index : UInt
    name : String
    }

    StaticDataField::attributes

    StaticDataField::name

    fn StaticDataField::name(self : StaticDataField) -> String

    StaticDataField::type_index

    fn StaticDataField::type_index(self : StaticDataField) -> UInt

    StringIdType

    pub struct StringIdType {
    id : UInt
    value : String
    }

    StringIdType::id

    fn StringIdType::id(self : StringIdType) -> UInt

    StringIdType::value

    fn StringIdType::value(self : StringIdType) -> String

    SymbolDetails

    pub enum SymbolDetails {
    Public(PublicSymbol)
    Data(DataSymbol)
    Procedure(ProcedureSymbol)
    Thunk(ThunkSymbol)
    Block(BlockSymbol)
    Label(LabelSymbol)
    Constant(ConstantSymbol)
    Udt(UdtSymbol)
    ObjectName(ObjectNameSymbol)
    BPRelative(BPRelativeSymbol)
    RegRelative(RegRelativeSymbol)
    ProcedureReference(ProcedureReferenceSymbol)
    FrameProcedure(FrameProcedureSymbol)
    ScopeEnd
    Unknown(UnknownSymbol)
    }

    The decoded payload of a known CodeView symbol record.

    SymbolLimits

    pub struct SymbolLimits {
    max_stream_bytes : Int
    max_records : Int
    max_record_bytes : Int
    max_global_refs : Int
    max_hash_records : Int
    max_public_symbols : Int
    }

    Resource limits for CodeView symbol and module debug streams.

    SymbolLimits::default

    fn SymbolLimits::default() -> SymbolLimits

    SymbolRecord

    pub struct SymbolRecord {
    offset : Int
    kind : UInt16
    details : SymbolDetails
    }

    SymbolRecord::details

    fn SymbolRecord::details(self : SymbolRecord) -> SymbolDetails

    SymbolRecord::kind

    fn SymbolRecord::kind(self : SymbolRecord) -> UInt16

    SymbolRecord::name

    fn SymbolRecord::name(self : SymbolRecord) -> String?

    Return the symbol name when its decoded kind carries one.

    SymbolRecord::offset

    fn SymbolRecord::offset(self : SymbolRecord) -> Int

    SymbolTable

    pub struct SymbolTable {
    data : Bytes
    records : Array[SymbolRecord]
    }

    SymbolTable::data

    fn SymbolTable::data(self : SymbolTable) -> Bytes

    SymbolTable::record_at

    fn SymbolTable::record_at(self : SymbolTable, index : Int) -> SymbolRecord?

    SymbolTable::record_at_offset

    fn SymbolTable::record_at_offset(self : SymbolTable, offset : Int) -> SymbolRecord?

    SymbolTable::record_count

    fn SymbolTable::record_count(self : SymbolTable) -> Int

    SymbolTable::records

    fn SymbolTable::records(self : SymbolTable) -> Array[SymbolRecord]

    SymbolizedAddress

    pub struct SymbolizedAddress {
    segment : UInt16
    section_offset : UInt
    section_name : String
    rva : UInt
    image_address : UInt64
    public_symbol : ResolvedPublicSymbol?
    source : SourceLocation?
    }

    A PDB address combined with PE mapping, public symbol, and source location.

    SymbolizedAddress::image_address

    fn SymbolizedAddress::image_address(self : SymbolizedAddress) -> UInt64

    SymbolizedAddress::public_symbol

    SymbolizedAddress::rva

    fn SymbolizedAddress::rva(self : SymbolizedAddress) -> UInt

    SymbolizedAddress::section_name

    fn SymbolizedAddress::section_name(self : SymbolizedAddress) -> String

    SymbolizedAddress::section_offset

    fn SymbolizedAddress::section_offset(self : SymbolizedAddress) -> UInt

    SymbolizedAddress::segment

    fn SymbolizedAddress::segment(self : SymbolizedAddress) -> UInt16

    SymbolizedAddress::source

    ThunkSymbol

    pub struct ThunkSymbol {
    parent : UInt
    end : UInt
    next : UInt
    offset : UInt
    segment : UInt16
    length : UInt16
    ordinal : Int
    name : String
    variant_bytes : Bytes
    }

    ThunkSymbol::end

    fn ThunkSymbol::end(self : ThunkSymbol) -> UInt

    ThunkSymbol::length

    fn ThunkSymbol::length(self : ThunkSymbol) -> UInt16

    ThunkSymbol::name

    fn ThunkSymbol::name(self : ThunkSymbol) -> String

    ThunkSymbol::next

    fn ThunkSymbol::next(self : ThunkSymbol) -> UInt

    ThunkSymbol::offset

    fn ThunkSymbol::offset(self : ThunkSymbol) -> UInt

    ThunkSymbol::ordinal

    fn ThunkSymbol::ordinal(self : ThunkSymbol) -> Int

    ThunkSymbol::parent

    fn ThunkSymbol::parent(self : ThunkSymbol) -> UInt

    ThunkSymbol::segment

    fn ThunkSymbol::segment(self : ThunkSymbol) -> UInt16

    ThunkSymbol::variant_bytes

    fn ThunkSymbol::variant_bytes(self : ThunkSymbol) -> Bytes

    TpiHeader

    pub struct TpiHeader {
    version : UInt
    header_size : Int
    type_index_begin : UInt
    type_index_end : UInt
    type_record_bytes : Int
    hash_stream_index : Int
    hash_aux_stream_index : Int
    hash_key_size : UInt
    hash_bucket_count : UInt
    hash_value_offset : Int
    hash_value_bytes : Int
    index_offset_offset : Int
    index_offset_bytes : Int
    hash_adjust_offset : Int
    hash_adjust_bytes : Int
    }

    The fixed 56-byte header shared by TPI and IPI streams.

    TpiHeader::hash_adjust_bytes

    fn TpiHeader::hash_adjust_bytes(self : TpiHeader) -> Int

    TpiHeader::hash_adjust_offset

    fn TpiHeader::hash_adjust_offset(self : TpiHeader) -> Int

    TpiHeader::hash_aux_stream_index

    fn TpiHeader::hash_aux_stream_index(self : TpiHeader) -> Int

    TpiHeader::hash_bucket_count

    fn TpiHeader::hash_bucket_count(self : TpiHeader) -> UInt

    TpiHeader::hash_key_size

    fn TpiHeader::hash_key_size(self : TpiHeader) -> UInt

    TpiHeader::hash_stream_index

    fn TpiHeader::hash_stream_index(self : TpiHeader) -> Int

    TpiHeader::hash_value_bytes

    fn TpiHeader::hash_value_bytes(self : TpiHeader) -> Int

    TpiHeader::hash_value_offset

    fn TpiHeader::hash_value_offset(self : TpiHeader) -> Int

    TpiHeader::header_size

    fn TpiHeader::header_size(self : TpiHeader) -> Int

    TpiHeader::index_offset_bytes

    fn TpiHeader::index_offset_bytes(self : TpiHeader) -> Int

    TpiHeader::index_offset_offset

    fn TpiHeader::index_offset_offset(self : TpiHeader) -> Int

    TpiHeader::type_index_begin

    fn TpiHeader::type_index_begin(self : TpiHeader) -> UInt

    TpiHeader::type_index_end

    fn TpiHeader::type_index_end(self : TpiHeader) -> UInt

    TpiHeader::type_record_bytes

    fn TpiHeader::type_record_bytes(self : TpiHeader) -> Int

    TpiHeader::type_record_count

    fn TpiHeader::type_record_count(self : TpiHeader) -> UInt

    TpiHeader::version

    fn TpiHeader::version(self : TpiHeader) -> UInt

    TpiLimits

    pub struct TpiLimits {
    max_stream_bytes : Int
    max_records : Int
    max_record_bytes : Int
    max_type_refs : Int
    }

    Resource limits for a TPI or IPI type stream.

    TpiLimits::default

    fn TpiLimits::default() -> TpiLimits

    TypeDetails

    pub enum TypeDetails {
    Modifier(ModifierType)
    Pointer(PointerType)
    Procedure(ProcedureType)
    MemberFunction(MemberFunctionType)
    ArgList(ArgListType)
    FieldList(FieldListType)
    BitField(BitFieldType)
    Array(ArrayType)
    Aggregate(AggregateType)
    Union(UnionType)
    Enum(EnumType)
    Alias(AliasType)
    Label(LabelType)
    FunctionId(FunctionIdType)
    MemberFunctionId(MemberFunctionIdType)
    StringId(StringIdType)
    BuildInfo(BuildInfoType)
    UdtSourceLine(UdtSourceLineType)
    TypeServer2(TypeServer2Type)
    Unknown(UnknownType)
    }

    The decoded representation of one CodeView type record.

    TypeRecord

    pub struct TypeRecord {
    type_index : UInt
    kind : UInt16
    payload : Bytes
    details : TypeDetails
    }

    One indexed TPI or IPI record.

    TypeRecord::details

    fn TypeRecord::details(self : TypeRecord) -> TypeDetails

    TypeRecord::kind

    fn TypeRecord::kind(self : TypeRecord) -> UInt16

    TypeRecord::payload

    fn TypeRecord::payload(self : TypeRecord) -> Bytes

    TypeRecord::type_index

    fn TypeRecord::type_index(self : TypeRecord) -> UInt

    TypeServer2Type

    pub struct TypeServer2Type {
    guid : Bytes
    age : UInt
    name : String
    }

    TypeServer2Type::age

    fn TypeServer2Type::age(self : TypeServer2Type) -> UInt

    TypeServer2Type::guid

    fn TypeServer2Type::guid(self : TypeServer2Type) -> Bytes

    TypeServer2Type::name

    fn TypeServer2Type::name(self : TypeServer2Type) -> String

    TypeTable

    pub struct TypeTable {
    data : Bytes
    header : TpiHeader
    records : Array[TypeRecord]
    }

    A parsed TPI or IPI stream.

    TypeTable::data

    fn TypeTable::data(self : TypeTable) -> Bytes

    TypeTable::field_list_members

    fn TypeTable::field_list_members(self : TypeTable, type_index : UInt) -> Array[FieldListMember] raise TpiError

    Resolve a field-list record and all records reached by LF_INDEX continuations.

    TypeTable::header

    fn TypeTable::header(self : TypeTable) -> TpiHeader

    TypeTable::record

    fn TypeTable::record(self : TypeTable, type_index : UInt) -> TypeRecord?

    TypeTable::record_at

    fn TypeTable::record_at(self : TypeTable, position : Int) -> TypeRecord?

    TypeTable::record_count

    fn TypeTable::record_count(self : TypeTable) -> Int

    TypeTable::records

    fn TypeTable::records(self : TypeTable) -> Array[TypeRecord]

    UdtSourceLineType

    pub struct UdtSourceLineType {
    udt : UInt
    source_file : UInt
    line_number : UInt
    module_index : UInt?
    }

    UdtSourceLineType::line_number

    fn UdtSourceLineType::line_number(self : UdtSourceLineType) -> UInt

    UdtSourceLineType::module_index

    fn UdtSourceLineType::module_index(self : UdtSourceLineType) -> UInt?

    UdtSourceLineType::source_file

    fn UdtSourceLineType::source_file(self : UdtSourceLineType) -> UInt

    UdtSourceLineType::udt

    fn UdtSourceLineType::udt(self : UdtSourceLineType) -> UInt

    UdtSymbol

    pub struct UdtSymbol {
    type_index : UInt
    name : String
    }

    UdtSymbol::name

    fn UdtSymbol::name(self : UdtSymbol) -> String

    UdtSymbol::type_index

    fn UdtSymbol::type_index(self : UdtSymbol) -> UInt

    UnionType

    pub struct UnionType {
    member_count : UInt16
    properties : UInt16
    field_list : UInt
    size : NumericValue
    name : String
    unique_name : String?
    }

    UnionType::field_list

    fn UnionType::field_list(self : UnionType) -> UInt

    UnionType::member_count

    fn UnionType::member_count(self : UnionType) -> UInt16

    UnionType::name

    fn UnionType::name(self : UnionType) -> String

    UnionType::properties

    fn UnionType::properties(self : UnionType) -> UInt16

    UnionType::size

    fn UnionType::size(self : UnionType) -> NumericValue

    UnionType::unique_name

    fn UnionType::unique_name(self : UnionType) -> String?

    UnknownFieldTail

    pub struct UnknownFieldTail {
    kind : UInt16
    payload : Bytes
    }

    UnknownFieldTail::kind

    fn UnknownFieldTail::kind(self : UnknownFieldTail) -> UInt16

    UnknownFieldTail::payload

    fn UnknownFieldTail::payload(self : UnknownFieldTail) -> Bytes

    UnknownSymbol

    pub struct UnknownSymbol {
    kind : UInt16
    payload : Bytes
    }

    UnknownSymbol::kind

    fn UnknownSymbol::kind(self : UnknownSymbol) -> UInt16

    UnknownSymbol::payload

    fn UnknownSymbol::payload(self : UnknownSymbol) -> Bytes

    UnknownType

    pub struct UnknownType {
    kind : UInt16
    payload : Bytes
    }

    UnknownType::kind

    fn UnknownType::kind(self : UnknownType) -> UInt16

    UnknownType::payload

    fn UnknownType::payload(self : UnknownType) -> Bytes

    VFunctionTableField

    pub struct VFunctionTableField {
    type_index : UInt
    }

    VFunctionTableField::type_index

    fn VFunctionTableField::type_index(self : VFunctionTableField) -> UInt

    VirtualBaseClassField

    pub struct VirtualBaseClassField {
    virtual_inheritance : Bool
    attributes : FieldAttributes
    base_type : UInt
    vbptr_type : UInt
    vbptr_offset : NumericValue
    vtable_index : NumericValue
    }

    VirtualBaseClassField::attributes

    VirtualBaseClassField::base_type

    fn VirtualBaseClassField::base_type(self : VirtualBaseClassField) -> UInt

    VirtualBaseClassField::vbptr_offset

    VirtualBaseClassField::vbptr_type

    fn VirtualBaseClassField::vbptr_type(self : VirtualBaseClassField) -> UInt

    VirtualBaseClassField::virtual_inheritance

    fn VirtualBaseClassField::virtual_inheritance(self : VirtualBaseClassField) -> Bool

    VirtualBaseClassField::vtable_index

    hash_string_v1

    fn hash_string_v1(value : String) -> UInt

    Compute the case-insensitive PDB v1 string hash used by GSI tables.

    parse_c13_debug_info

    fn parse_c13_debug_info(data : Bytes, limits : C13Limits) -> C13DebugInfo raise SymbolError

    parse_c13_debug_info_with_fallback

    fn parse_c13_debug_info_with_fallback(data : Bytes, fallback : DebugStringTable?, limits : C13Limits) -> C13DebugInfo raise SymbolError

    parse_dbi

    fn parse_dbi(data : Bytes, limits : DbiLimits) -> DbiFile raise DbiError

    Parse a complete DBI stream and all bounded substreams.

    parse_globals_stream

    fn parse_globals_stream(data : Bytes, symbols : SymbolTable, limits : SymbolLimits) -> GlobalsStream raise SymbolError

    Parse a standalone Globals/GSI stream and its symbol table.

    parse_module_debug_stream

    fn parse_module_debug_stream(data : Bytes, symbol_bytes_raw : UInt, c11_bytes_raw : UInt, c13_bytes_raw : UInt, limits : SymbolLimits) -> ModuleDebugStream raise SymbolError

    Split and parse a module debug stream using sizes from its DBI descriptor.

    parse_msf

    fn parse_msf(data : Bytes, limits : MsfLimits) -> MsfFile raise MsfError

    Parse the MSF container and its stream directory.

    parse_msf_header

    fn parse_msf_header(data : Bytes, limits : MsfLimits) -> MsfHeader raise MsfError

    Parse and validate the MSF superblock.

    parse_pdb_info

    fn parse_pdb_info(data : Bytes, msf_stream_count : Int, limits : PdbInfoLimits) -> PdbInfo raise PdbInfoError

    Parse the PDB Info stream bytes.

    parse_pdb_string_table

    fn parse_pdb_string_table(data : Bytes, limits : PdbStringTableLimits) -> PdbStringTable raise SymbolError

    Parse the /names stream referenced by PDB Info.

    parse_pe_image

    fn parse_pe_image(data : Bytes, limits : PeLimits) -> PeImage raise PeError

    Parse the DOS, PE/COFF, optional-header, and section-table structures.

    parse_publics_stream

    fn parse_publics_stream(data : Bytes, symbols : SymbolTable, limits : SymbolLimits) -> PublicsStream raise SymbolError

    parse_symbols

    fn parse_symbols(data : Bytes, limits : SymbolLimits) -> SymbolTable raise SymbolError

    Parse a standalone CodeView symbol stream without a module signature.

    parse_tpi

    fn parse_tpi(data : Bytes, limits : TpiLimits) -> TypeTable raise TpiError

    Parse a TPI or IPI stream, including all indexed type records.

    simple_type

    fn simple_type(type_index : UInt) -> SimpleType?

    Return the standard interpretation of a simple type index below 0x1000.

    symbolicate_address

    fn symbolicate_address(pe : PeImage, publics : PublicsStream, c13_modules : Array[C13DebugInfo], segment : UInt16, offset : UInt) -> SymbolizedAddress?

    Combine PE mapping, nearest public symbol, and C13 source line information.

    symbolicate_addresses

    fn symbolicate_addresses(pe : PeImage, publics : PublicsStream, c13_modules : Array[C13DebugInfo], addresses : Array[(UInt16, UInt)]) -> Array[SymbolizedAddress]

    Symbolicate a batch of PDB segment-relative addresses.

    Powered by MoonBit

    Site sourceReport issueModulesSkillsBuild queueStatistics

    © 2026 mooncakes.io