Class PdbImage
- Namespace
- AsmResolver.Symbols.Pdb
- Assembly
- AsmResolver.Symbols.Pdb.dll
Represents a single Program Debug Database (PDB) image.
public class PdbImage : ICodeViewSymbolProvider
- Inheritance
-
PdbImage
- Implements
- Derived
- Inherited Members
Properties
Age
Gets or sets the number of times the PDB file has been written.
public uint Age { get; set; }
Property Value
Attributes
Gets or sets attributes associated to the DBI stream.
public DbiAttributes Attributes { get; set; }
Property Value
BuildMajorVersion
Gets or sets the major version of the toolchain that was used to build the program.
public byte BuildMajorVersion { get; set; }
Property Value
BuildMinorVersion
Gets or sets the minor version of the toolchain that was used to build the program.
public byte BuildMinorVersion { get; set; }
Property Value
Machine
Gets or sets the machine type the program was compiled for.
public MachineType Machine { get; set; }
Property Value
Modules
Gets a collection of all modules stored in the PDB image.
public IList<PdbModule> Modules { get; }
Property Value
PdbDllVersion
Gets or sets the version number of mspdbXXXX.dll that was used to produce this PDB file.
public ushort PdbDllVersion { get; set; }
Property Value
Symbols
Gets the list of defined symbols.
public IList<ICodeViewSymbol> Symbols { get; }
Property Value
Timestamp
Gets or sets the time-stamp of the PDB file.
public DateTime Timestamp { get; set; }
Property Value
UniqueId
Gets or sets the unique identifier assigned to the PDB file.
public Guid UniqueId { get; set; }
Property Value
Methods
FromBytes(byte[])
Interprets a byte array as a PDB image.
public static PdbImage FromBytes(byte[] data)
Parameters
data
byte[]The data to interpret.
Returns
- PdbImage
The read PDB image.
FromBytes(byte[], PdbReaderParameters)
Interprets a byte array as a PDB image.
public static PdbImage FromBytes(byte[] data, PdbReaderParameters readerParameters)
Parameters
data
byte[]The data to interpret.
readerParameters
PdbReaderParametersThe parameters to use while reading the PDB image.
Returns
- PdbImage
The read PDB image.
FromFile(IInputFile)
Reads a PDB image from the provided input file.
public static PdbImage FromFile(IInputFile file)
Parameters
file
IInputFileThe input file.
Returns
- PdbImage
The read PDB image.
FromFile(IInputFile, PdbReaderParameters)
Reads a PDB image from the provided input file.
public static PdbImage FromFile(IInputFile file, PdbReaderParameters readerParameters)
Parameters
file
IInputFileThe input file.
readerParameters
PdbReaderParametersThe parameters to use while reading the PDB image.
Returns
- PdbImage
The read PDB image.
FromFile(MsfFile)
Loads a PDB image from the provided MSF file.
public static PdbImage FromFile(MsfFile file)
Parameters
file
MsfFileThe MSF file.
Returns
- PdbImage
The read PDB image.
FromFile(MsfFile, PdbReaderParameters)
Loads a PDB image from the provided MSF file.
public static PdbImage FromFile(MsfFile file, PdbReaderParameters readerParameters)
Parameters
file
MsfFileThe MSF file.
readerParameters
PdbReaderParametersThe parameters to use while reading the PDB image.
Returns
- PdbImage
The read PDB image.
FromFile(string)
Reads a PDB image from the provided input file.
public static PdbImage FromFile(string path)
Parameters
path
stringThe path to the PDB file.
Returns
- PdbImage
The read PDB image.
FromFile(string, PdbReaderParameters)
Reads a PDB image from the provided input file.
public static PdbImage FromFile(string path, PdbReaderParameters readerParameters)
Parameters
path
stringThe path to the PDB file.
readerParameters
PdbReaderParametersThe parameters to use while reading the PDB image.
Returns
- PdbImage
The read PDB image.
FromReader(BinaryStreamReader)
Reads an PDB image from the provided input stream reader.
public static PdbImage FromReader(BinaryStreamReader reader)
Parameters
reader
BinaryStreamReaderThe reader.
Returns
- PdbImage
The read PDB image.
FromReader(BinaryStreamReader, PdbReaderParameters)
Reads an PDB image from the provided input stream reader.
public static PdbImage FromReader(BinaryStreamReader reader, PdbReaderParameters readerParameters)
Parameters
reader
BinaryStreamReaderThe reader.
readerParameters
PdbReaderParametersThe parameters to use while reading the PDB image.
Returns
- PdbImage
The read PDB image.
GetIdLeafRecord(uint)
Obtains an ID record from the IPI stream based on its ID index.
public IIpiLeaf GetIdLeafRecord(uint idIndex)
Parameters
idIndex
uintThe ID index.
Returns
- IIpiLeaf
The resolved leaf
Exceptions
- ArgumentException
Occurs when the ID index is invalid.
GetIdLeafRecord<TLeaf>(uint)
Obtains an ID record from the IPI stream based on its ID index.
public TLeaf GetIdLeafRecord<TLeaf>(uint idIndex) where TLeaf : CodeViewLeaf
Parameters
idIndex
uintThe ID index.
Returns
- TLeaf
The resolved leaf
Type Parameters
TLeaf
Exceptions
- ArgumentException
Occurs when the ID index is invalid.
GetIdLeafRecords()
Obtains all records stored in the original IPI stream of the PDB image.
public virtual IEnumerable<IIpiLeaf> GetIdLeafRecords()
Returns
- IEnumerable<IIpiLeaf>
An object that lazily enumerates all IPI leaf records.
GetLeafRecord(uint)
Obtains a type record from the TPI stream based on its type index.
public ITpiLeaf GetLeafRecord(uint typeIndex)
Parameters
typeIndex
uintThe type index.
Returns
- ITpiLeaf
The resolved type.
Exceptions
- ArgumentException
Occurs when the type index is invalid.
GetLeafRecord<TLeaf>(uint)
Obtains a type record from the TPI stream based on its type index.
public TLeaf GetLeafRecord<TLeaf>(uint typeIndex) where TLeaf : ITpiLeaf
Parameters
typeIndex
uintThe type index.
Returns
- TLeaf
The resolved type.
Type Parameters
TLeaf
Exceptions
- ArgumentException
Occurs when the type index is invalid.
GetLeafRecords()
Obtains all records stored in the original TPI stream of the PDB image.
public virtual IEnumerable<ITpiLeaf> GetLeafRecords()
Returns
- IEnumerable<ITpiLeaf>
An object that lazily enumerates all TPI leaf records.
GetModules()
Obtains a collection of modules stored in the DBI stream of the PDB image.
protected virtual IList<PdbModule> GetModules()
Returns
Remarks
This method is called upon initialization of the Modules property.
GetSymbols()
Obtains a collection of symbols stored in the symbol record stream of the PDB image.
protected virtual IList<ICodeViewSymbol> GetSymbols()
Returns
- IList<ICodeViewSymbol>
The symbols.
Remarks
This method is called upon initialization of the Symbols property.
TryGetIdLeafRecord(uint, out IIpiLeaf?)
Attempts to obtain an ID record from the IPI stream based on its ID index.
public virtual bool TryGetIdLeafRecord(uint idIndex, out IIpiLeaf? leaf)
Parameters
Returns
- bool
true
if the leaf was found,false
otherwise.
TryGetIdLeafRecord<TLeaf>(uint, out TLeaf?)
Attempts to obtain an ID record from the IPI stream based on its ID index.
public bool TryGetIdLeafRecord<TLeaf>(uint idIndex, out TLeaf? leaf) where TLeaf : IIpiLeaf
Parameters
idIndex
uintThe ID index.
leaf
TLeafThe resolved leaf.
Returns
- bool
true
if the leaf was found,false
otherwise.
Type Parameters
TLeaf
TryGetLeafRecord(uint, out ITpiLeaf?)
Attempts to obtain a type record from the TPI stream based on its type index.
public virtual bool TryGetLeafRecord(uint typeIndex, out ITpiLeaf? leaf)
Parameters
Returns
- bool
true
if the type was found,false
otherwise.
TryGetLeafRecord<TLeaf>(uint, out TLeaf?)
Attempts to obtain a type record from the TPI stream based on its type index.
public bool TryGetLeafRecord<TLeaf>(uint typeIndex, out TLeaf? leaf) where TLeaf : ITpiLeaf
Parameters
typeIndex
uintThe type index.
leaf
TLeafThe resolved type.
Returns
- bool
true
if the type was found,false
otherwise.
Type Parameters
TLeaf