NativeInstruction
Namespace: Dotsider.Core.Analysis.Models
Assembly: Dotsider.Core.dll
One decoded native instruction. The model is structured — bytes, structured operands, flow and target metadata, and source attribution — so navigation, JSON/MCP output, syntax decoration, and future diffing read facts rather than parse text. OperandText and the rendered listing line are projections; Address is the semantic key and DisplayLine the presentation key, mirroring IlInstruction for the shared IL-Inspector plumbing.
public sealed record NativeInstruction : IEquatable<NativeInstruction>Inheritance
Section titled “Inheritance”Object → NativeInstruction
Implements
Section titled “Implements”Constructors
Section titled “Constructors”NativeInstruction(ulong, uint?, long?, IReadOnlyList<byte>, int, string, IReadOnlyList<NativeOperand>, string, NativeInstructionCategory, NativeFlowKind, ulong?, NativeTargetKind, string?, string?, int?, bool, int?, NativeLineLayout?)
Section titled “NativeInstruction(ulong, uint?, long?, IReadOnlyList<byte>, int, string, IReadOnlyList<NativeOperand>, string, NativeInstructionCategory, NativeFlowKind, ulong?, NativeTargetKind, string?, string?, int?, bool, int?, NativeLineLayout?)”One decoded native instruction. The model is structured — bytes, structured operands, flow and target metadata, and source attribution — so navigation, JSON/MCP output, syntax decoration, and future diffing read facts rather than parse text. OperandText and the rendered listing line are projections; Address is the semantic key and DisplayLine the presentation key, mirroring IlInstruction for the shared IL-Inspector plumbing.
Parameters:
Address(UInt64): The instruction’s virtual address.Rva(Nullable<UInt32>): The PE relative virtual address, or null for non-PE images.FileOffset(Nullable<Int64>): The file offset of the instruction’s bytes, or null when not file-backed.Bytes(IReadOnlyList<Byte>): The raw encoded bytes of exactly this instruction.Length(Int32): The encoded byte length (always exact, even for the fallback).Mnemonic(String): The instruction mnemonic (e.g.mov,vaddps,bl, or.byte/.wordfor the fallback).Operands(IReadOnlyList<NativeOperand>): The structured operands, in source order.OperandText(String): The rendered operand string, or empty when there are none.Category(NativeInstructionCategory): The instruction’s coarse category.Flow(NativeFlowKind): How the instruction affects control flow.TargetAddress(Nullable<UInt64>): The resolved absolute call/branch/data target, or null.TargetKind(NativeTargetKind): What TargetAddress points at.TargetName(String): The resolved target’s display name (e.g.Foo,Foo+0x12,loc_140001234), or null.SourceFile(String): The source file for this address from the native source map, or null.Line(Nullable<Int32>): The source line for this address, or null.IsFallback(Boolean): Whether this is a.byte/.wordsafety-net entry for undefined or corrupt bytes.DisplayLine(Nullable<Int32>): The 1-based rendered line number in formatted disassembly, or null.Layout(Nullable<NativeLineLayout>): The rendered-line column spans, set by the text formatter, or null.
public NativeInstruction(ulong Address, uint? Rva, long? FileOffset, IReadOnlyList<byte> Bytes, int Length, string Mnemonic, IReadOnlyList<NativeOperand> Operands, string OperandText, NativeInstructionCategory Category, NativeFlowKind Flow, ulong? TargetAddress = null, NativeTargetKind TargetKind = NativeTargetKind.None, string? TargetName = null, string? SourceFile = null, int? Line = null, bool IsFallback = false, int? DisplayLine = null, NativeLineLayout? Layout = null)Properties
Section titled “Properties”Address
Section titled “Address”The instruction’s virtual address.
Returns: UInt64
public ulong Address { get; init; }The raw encoded bytes of exactly this instruction.
Returns: IReadOnlyList<Byte>
public IReadOnlyList<byte> Bytes { get; init; }Category
Section titled “Category”The instruction’s coarse category.
Returns: NativeInstructionCategory
public NativeInstructionCategory Category { get; init; }DisplayLine
Section titled “DisplayLine”The 1-based rendered line number in formatted disassembly, or null.
Returns: Nullable<Int32>
public int? DisplayLine { get; init; }FileOffset
Section titled “FileOffset”The file offset of the instruction’s bytes, or null when not file-backed.
Returns: Nullable<Int64>
public long? FileOffset { get; init; }How the instruction affects control flow.
Returns: NativeFlowKind
public NativeFlowKind Flow { get; init; }IsFallback
Section titled “IsFallback”Whether this is a .byte/.word safety-net entry for undefined or corrupt bytes.
Returns: Boolean
public bool IsFallback { get; init; }Layout
Section titled “Layout”The rendered-line column spans, set by the text formatter, or null.
Returns: Nullable<NativeLineLayout>
public NativeLineLayout? Layout { get; init; }Length
Section titled “Length”The encoded byte length (always exact, even for the fallback).
Returns: Int32
public int Length { get; init; }The source line for this address, or null.
Returns: Nullable<Int32>
public int? Line { get; init; }Mnemonic
Section titled “Mnemonic”The instruction mnemonic (e.g. mov, vaddps, bl, or .byte/.word for the fallback).
Returns: String
public string Mnemonic { get; init; }Operands
Section titled “Operands”The structured operands, in source order.
Returns: IReadOnlyList<NativeOperand>
public IReadOnlyList<NativeOperand> Operands { get; init; }OperandText
Section titled “OperandText”The rendered operand string, or empty when there are none.
Returns: String
public string OperandText { get; init; }The PE relative virtual address, or null for non-PE images.
Returns: Nullable<UInt32>
public uint? Rva { get; init; }SourceFile
Section titled “SourceFile”The source file for this address from the native source map, or null.
Returns: String
public string? SourceFile { get; init; }TargetAddress
Section titled “TargetAddress”The resolved absolute call/branch/data target, or null.
Returns: Nullable<UInt64>
public ulong? TargetAddress { get; init; }TargetKind
Section titled “TargetKind”What TargetAddress points at.
Returns: NativeTargetKind
public NativeTargetKind TargetKind { get; init; }TargetName
Section titled “TargetName”The resolved target’s display name (e.g. Foo, Foo+0x12, loc_140001234), or null.
Returns: String
public string? TargetName { get; init; }