Table of Contents

Class CustomDebugDataSegment

Namespace
AsmResolver.PE.Debug
Assembly
AsmResolver.PE.dll

Represents a debug data stream with a custom or unsupported format, wrapping an instance of ISegment into a IDebugDataSegment.

public class CustomDebugDataSegment : IDebugDataSegment, ISegment, IOffsetProvider, IWritable
Inheritance
CustomDebugDataSegment
Implements
Inherited Members

Constructors

CustomDebugDataSegment(DebugDataType, ISegment)

Creates a new instance of the CustomDebugDataSegment class.

public CustomDebugDataSegment(DebugDataType type, ISegment contents)

Parameters

type DebugDataType

The format of the data.

contents ISegment

The contents of the code.

Properties

CanUpdateOffsets

Determines whether this structure can be relocated to another offset or virtual address.

public bool CanUpdateOffsets { get; }

Property Value

bool

Contents

Gets or sets the raw data of the segment.

public ISegment? Contents { get; set; }

Property Value

ISegment

Offset

Gets the physical starting offset of the segment.

public ulong Offset { get; }

Property Value

ulong

Rva

Gets the virtual address relative to the beginning of the section that the segment is located in.

public uint Rva { get; }

Property Value

uint

Type

Gets the type of debug data stored in the segment.

public DebugDataType Type { get; }

Property Value

DebugDataType

Methods

GetPhysicalSize()

Computes the number of bytes that the structure contains.

public uint GetPhysicalSize()

Returns

uint

The number of bytes.

GetVirtualSize()

Computes the number of bytes the segment will contain when it is mapped into memory.

public uint GetVirtualSize()

Returns

uint

The number of bytes.

UpdateOffsets(in RelocationParameters)

Assigns a new file and virtual offset to the segment and all its sub-components.

public void UpdateOffsets(in RelocationParameters parameters)

Parameters

parameters RelocationParameters

The parameters containing the new offset information for the segment.

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.