Class MemoryInspection
- Namespace
- CStructSharp.Memory
- Assembly
- CStructSharp.dll
A decoded value together with the evidence of where it came from: its logical selection and the physical ranges that supplied its bytes.
public sealed record MemoryInspection : IEquatable<MemoryInspection>
- Inheritance
-
MemoryInspection
- Implements
- Inherited Members
Remarks
An inspector that shows "PID 42 at kernel address 0xffff800000000ffe, from file offsets 0x2ffe and 0x9000" needs three things: the value, the logical location with its type and member metadata, and the backing fragments after every mapping layer has been resolved. One logical field can span several fragments when it crosses a page boundary. A custom source adapter is reported as a terminal coordinate because the library cannot see how it obtains bytes. The result describes one read; it is not a snapshot and does not prevent the source from changing afterwards.
Constructors
MemoryInspection(object?, MemorySelection, IReadOnlyList<MemoryRegion>)
A decoded value together with the evidence of where it came from: its logical selection and the physical ranges that supplied its bytes.
public MemoryInspection(object? Value, MemorySelection Selection, IReadOnlyList<MemoryRegion> BackingRegions)
Parameters
ValueobjectDecoded value; pointers keep their stored value as StoredPointer.
SelectionMemorySelectionLogical region and metadata of the selected field.
BackingRegionsIReadOnlyList<MemoryRegion>Physical ranges in logical order, resolved through every known mapping layer.
Remarks
An inspector that shows "PID 42 at kernel address 0xffff800000000ffe, from file offsets 0x2ffe and 0x9000" needs three things: the value, the logical location with its type and member metadata, and the backing fragments after every mapping layer has been resolved. One logical field can span several fragments when it crosses a page boundary. A custom source adapter is reported as a terminal coordinate because the library cannot see how it obtains bytes. The result describes one read; it is not a snapshot and does not prevent the source from changing afterwards.
Properties
BackingRegions
Physical ranges in logical order, resolved through every known mapping layer.
public IReadOnlyList<MemoryRegion> BackingRegions { get; init; }
Property Value
Selection
Logical region and metadata of the selected field.
public MemorySelection Selection { get; init; }
Property Value
Value
Decoded value; pointers keep their stored value as StoredPointer.
public object? Value { get; init; }
Property Value
Methods
Deconstruct(out object?, out MemorySelection, out IReadOnlyList<MemoryRegion>)
public void Deconstruct(out object? Value, out MemorySelection Selection, out IReadOnlyList<MemoryRegion> BackingRegions)
Parameters
ValueobjectSelectionMemorySelectionBackingRegionsIReadOnlyList<MemoryRegion>
Equals(MemoryInspection?)
public bool Equals(MemoryInspection? other)
Parameters
otherMemoryInspection
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(MemoryInspection?, MemoryInspection?)
public static bool operator ==(MemoryInspection? left, MemoryInspection? right)
Parameters
leftMemoryInspectionrightMemoryInspection
Returns
operator !=(MemoryInspection?, MemoryInspection?)
public static bool operator !=(MemoryInspection? left, MemoryInspection? right)
Parameters
leftMemoryInspectionrightMemoryInspection