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; }Methods
Section titled “Methods”Deconstruct(out ulong, out uint?, out long?, out IReadOnlyList<byte>, out int, out string, out IReadOnlyList<NativeOperand>, out string, out NativeInstructionCategory, out NativeFlowKind, out ulong?, out NativeTargetKind, out string?, out string?, out int?, out bool, out int?, out NativeLineLayout?)
Section titled “Deconstruct(out ulong, out uint?, out long?, out IReadOnlyList<byte>, out int, out string, out IReadOnlyList<NativeOperand>, out string, out NativeInstructionCategory, out NativeFlowKind, out ulong?, out NativeTargetKind, out string?, out string?, out int?, out bool, out int?, out NativeLineLayout?)”Parameters:
Address(UInt64)Rva(Nullable<UInt32>)FileOffset(Nullable<Int64>)Bytes(IReadOnlyList<Byte>)Length(Int32)Mnemonic(String)Operands(IReadOnlyList<NativeOperand>)OperandText(String)Category(NativeInstructionCategory)Flow(NativeFlowKind)TargetAddress(Nullable<UInt64>)TargetKind(NativeTargetKind)TargetName(String)SourceFile(String)Line(Nullable<Int32>)IsFallback(Boolean)DisplayLine(Nullable<Int32>)Layout(Nullable<NativeLineLayout>)
public void Deconstruct(out ulong Address, out uint? Rva, out long? FileOffset, out IReadOnlyList<byte> Bytes, out int Length, out string Mnemonic, out IReadOnlyList<NativeOperand> Operands, out string OperandText, out NativeInstructionCategory Category, out NativeFlowKind Flow, out ulong? TargetAddress, out NativeTargetKind TargetKind, out string? TargetName, out string? SourceFile, out int? Line, out bool IsFallback, out int? DisplayLine, out NativeLineLayout? Layout)Equals(NativeInstruction?)
Section titled “Equals(NativeInstruction?)”Parameters:
other(NativeInstruction)
Returns: Boolean
public bool Equals(NativeInstruction? other)Equals(object?)
Section titled “Equals(object?)”Parameters:
obj(Object)
Returns: Boolean
public override bool Equals(object? obj)GetHashCode()
Section titled “GetHashCode()”Returns: Int32
public override int GetHashCode()ToString()
Section titled “ToString()”Returns: String
public override string ToString()Members
Section titled “Members”operator !=(NativeInstruction?, NativeInstruction?)
Section titled “operator !=(NativeInstruction?, NativeInstruction?)”Parameters:
left(NativeInstruction)right(NativeInstruction)
Returns: Boolean
public static bool operator !=(NativeInstruction? left, NativeInstruction? right)operator ==(NativeInstruction?, NativeInstruction?)
Section titled “operator ==(NativeInstruction?, NativeInstruction?)”Parameters:
left(NativeInstruction)right(NativeInstruction)
Returns: Boolean
public static bool operator ==(NativeInstruction? left, NativeInstruction? right)