Table of Contents

Class ModuleDescriptor

Namespace
AsmResolver.Symbols.Pdb.Metadata.Dbi
Assembly
AsmResolver.Symbols.Pdb.dll

Represents a reference to a single module (object file) that was linked into a program.

public class ModuleDescriptor : IWritable
Inheritance
ModuleDescriptor
Implements
Inherited Members

Properties

Attributes

Gets or sets the attributes assigned to this module descriptor.

public ModuleDescriptorAttributes Attributes { get; set; }

Property Value

ModuleDescriptorAttributes

ModuleName

Gets or sets the name of the module.

public Utf8String? ModuleName { get; set; }

Property Value

Utf8String

Remarks

This is often a full path to the object file that was passed into link.exe directly, or a string in the form of Import:dll_name

ObjectFileName

Gets or sets the name of the object file name.

public Utf8String? ObjectFileName { get; set; }

Property Value

Utf8String

Remarks

In the case this module is linked directly passed to link.exe, this is the same as ModuleName. If the module comes from an archive, this is the full path to that archive.

PdbFilePathNameIndex

Gets or sets the offset in the names buffer of the PDB file.

public uint PdbFilePathNameIndex { get; set; }

Property Value

uint

Remarks

For most modules (except the special * LINKER * module) this value is set to zero.

SectionContribution

Gets or sets a description of the section within the final binary which contains code and/or data from this module.

public SectionContribution SectionContribution { get; set; }

Property Value

SectionContribution

SourceFileCount

Gets or sets the number of source files that contributed to this module during the compilation.

public ushort SourceFileCount { get; set; }

Property Value

ushort

SourceFileNameIndex

Gets or sets the offset in the names buffer of the primary translation unit.

public uint SourceFileNameIndex { get; set; }

Property Value

uint

Remarks

For most compilers this value is set to zero.

SymbolC11DataSize

Gets or sets the size of the C11-style CodeView data within the module's symbol stream.

public uint SymbolC11DataSize { get; set; }

Property Value

uint

SymbolC13DataSize

Gets or sets the size of the C13-style CodeView data within the module's symbol stream.

public uint SymbolC13DataSize { get; set; }

Property Value

uint

SymbolDataSize

Gets or sets the size of the CodeView data within the module's symbol stream.

public uint SymbolDataSize { get; set; }

Property Value

uint

SymbolStreamIndex

Gets or sets the MSF stream index of the stream that the symbols of this module.

public ushort SymbolStreamIndex { get; set; }

Property Value

ushort

TypeServerIndex

Gets or sets the index of the type server for this module.

public ushort TypeServerIndex { get; set; }

Property Value

ushort

Methods

FromReader(ref BinaryStreamReader)

Parses a single module descriptor from the provided input stream.

public static ModuleDescriptor FromReader(ref BinaryStreamReader reader)

Parameters

reader BinaryStreamReader

The input stream.

Returns

ModuleDescriptor

THe parsed module descriptor.

GetPhysicalSize()

Computes the number of bytes that the structure contains.

public uint GetPhysicalSize()

Returns

uint

The number of bytes.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Write(BinaryStreamWriter)

Serializes the structure to an output stream.

public void Write(BinaryStreamWriter writer)

Parameters

writer BinaryStreamWriter

The output stream to write the data to.