C# Class Reko.Core.MemoryArea

Contains the bytes that are present in memory after a program is loaded.
Loading sparse images should load multiple memory areas. Use SegmentMap and ImageSegments to accomplish this.
Afficher le fichier Open project: uxmal/reko Class Usage Examples

Méthodes publiques

Méthode Description
CompareArrays ( byte src, int iSrc, byte dst, int cb ) : bool
CreateBeReader ( Address addr ) : BeImageReader
CreateBeReader ( ulong offset ) : BeImageReader
CreateLeReader ( Address addr ) : Reko.Core.LeImageReader
CreateLeReader ( ulong offset ) : Reko.Core.LeImageReader
FixupLeUInt16 ( uint imageOffset, ushort delta ) : ushort

Adds the delta to the ushort at the given offset.

IsValidAddress ( Address addr ) : bool
IsValidLinearAddress ( ulong linearAddr ) : bool
MemoryArea ( Address addrBase, byte bytes ) : Reko.Core.Expressions
ReadBe ( byte abImage, long imageOffset, PrimitiveType type ) : Constant
ReadBe ( long imageOffset, PrimitiveType type ) : Constant
ReadBeDouble ( byte abImage, long off ) : Constant
ReadBeDouble ( long off ) : Constant
ReadBeFloat ( byte abImage, long off ) : Constant
ReadBeFloat ( long off ) : Constant
ReadBeInt16 ( byte img, long offset ) : short
ReadBeInt16 ( uint off ) : short
ReadBeInt32 ( byte abImage, long off ) : int
ReadBeInt32 ( uint off ) : int
ReadBeInt64 ( byte image, long off ) : long
ReadBeInt64 ( uint off ) : long
ReadBeUInt16 ( byte abImage, long off ) : ushort
ReadBeUInt16 ( uint off ) : ushort
ReadBeUInt32 ( byte abImage, long off ) : uint
ReadBeUInt32 ( uint off ) : uint
ReadBeUInt64 ( byte abImage, long off ) : ulong
ReadBeUint64 ( uint off ) : ulong
ReadByte ( Address addr ) : byte
ReadLe ( byte abImage, long imageOffset, PrimitiveType type ) : Constant
ReadLe ( long imageOffset, PrimitiveType type ) : Constant

Reads a little-endian word from image offset.

If the word being read was a relocation, it is returned with a [[pointer]] or [[segment]] data type. Otherwise a neutral [[word]] is returned.

ReadLeDouble ( Address addr ) : Constant
ReadLeDouble ( byte abImage, long off ) : Constant
ReadLeDouble ( long off ) : Constant
ReadLeFloat ( Address addr ) : Constant
ReadLeFloat ( byte abImage, long off ) : Constant
ReadLeFloat ( long off ) : Constant
ReadLeInt16 ( Address addr ) : short
ReadLeInt16 ( byte abImage, long offset ) : short
ReadLeInt16 ( uint off ) : short
ReadLeInt32 ( Address addr ) : int
ReadLeInt32 ( byte abImage, long off ) : int
ReadLeInt32 ( uint off ) : int
ReadLeInt64 ( Address addr ) : long
ReadLeInt64 ( byte image, long off ) : long
ReadLeInt64 ( uint off ) : long
ReadLeUInt16 ( Address addr ) : ushort
ReadLeUInt16 ( byte img, long off ) : ushort
ReadLeUInt16 ( uint off ) : ushort
ReadLeUInt32 ( Address addr ) : uint
ReadLeUInt32 ( byte img, long off ) : uint
ReadLeUInt32 ( uint off ) : uint
ReadLeUInt64 ( byte img, long off ) : ulong
ReadLeUint64 ( Address addr ) : ulong
ReadLeUint64 ( uint off ) : ulong
ToString ( ) : string
TryReadBe ( long imageOffset, PrimitiveType type, Constant &c ) : bool
TryReadBeInt32 ( byte abImage, long off, int &value ) : bool
TryReadBeInt64 ( byte image, long off, long &value ) : bool
TryReadBeUInt16 ( byte img, long offset, ushort &value ) : bool
TryReadBeUInt32 ( byte abImage, long off, uint &value ) : bool
TryReadBeUInt64 ( byte image, long off, ulong &value ) : bool
TryReadByte ( Address addr, byte &b ) : bool
TryReadByte ( byte img, long off, byte &b ) : bool
TryReadByte ( long off, byte &b ) : bool
TryReadBytes ( Address addr, int length, byte membuf ) : bool
TryReadBytes ( long off, int length, byte membuf ) : bool
TryReadLe ( long imageOffset, PrimitiveType type, Constant &c ) : bool
TryReadLeInt32 ( byte abImage, uint off, int &value ) : bool
TryReadLeInt64 ( byte image, long off, long &value ) : bool
TryReadLeUInt16 ( byte abImage, uint offset, ushort &us ) : bool
TryReadLeUInt32 ( Address address, uint &dw ) : bool
TryReadLeUInt32 ( byte abImage, long off, uint &value ) : bool
TryReadLeUInt64 ( Address address, ulong &dw ) : bool
TryReadLeUInt64 ( byte image, long off, ulong &value ) : bool
WriteBeUInt32 ( byte abImage, uint offset, uint dw ) : void
WriteBeUInt32 ( long offset, uint dw ) : void
WriteByte ( Address addr, byte b ) : void
WriteByte ( long offset, byte b ) : void
WriteBytes ( byte srcBytes, long offset, int count ) : void
WriteBytes ( byte srcBytes, long offset, int count, byte dstBytes ) : void
WriteLeInt16 ( byte abImage, long offset, short w ) : void
WriteLeUInt16 ( Address addr, ushort w ) : void
WriteLeUInt16 ( long offset, ushort w ) : void
WriteLeUInt32 ( Address addr, uint dw ) : void
WriteLeUInt32 ( long offset, uint dw ) : void

Private Methods

Méthode Description
CreateImageMap ( ) : Reko.Core.SegmentMap
IntPow ( double b, int e ) : double
ToOffset ( Address addr ) : long

Method Details

CompareArrays() public static méthode

public static CompareArrays ( byte src, int iSrc, byte dst, int cb ) : bool
src byte
iSrc int
dst byte
cb int
Résultat bool

CreateBeReader() public méthode

public CreateBeReader ( Address addr ) : BeImageReader
addr Address
Résultat BeImageReader

CreateBeReader() public méthode

public CreateBeReader ( ulong offset ) : BeImageReader
offset ulong
Résultat BeImageReader

CreateLeReader() public méthode

public CreateLeReader ( Address addr ) : Reko.Core.LeImageReader
addr Address
Résultat Reko.Core.LeImageReader

CreateLeReader() public méthode

public CreateLeReader ( ulong offset ) : Reko.Core.LeImageReader
offset ulong
Résultat Reko.Core.LeImageReader

FixupLeUInt16() public méthode

Adds the delta to the ushort at the given offset.
public FixupLeUInt16 ( uint imageOffset, ushort delta ) : ushort
imageOffset uint
delta ushort
Résultat ushort

IsValidAddress() public méthode

public IsValidAddress ( Address addr ) : bool
addr Address
Résultat bool

IsValidLinearAddress() public méthode

public IsValidLinearAddress ( ulong linearAddr ) : bool
linearAddr ulong
Résultat bool

MemoryArea() public méthode

public MemoryArea ( Address addrBase, byte bytes ) : Reko.Core.Expressions
addrBase Address
bytes byte
Résultat Reko.Core.Expressions

ReadBe() public static méthode

public static ReadBe ( byte abImage, long imageOffset, PrimitiveType type ) : Constant
abImage byte
imageOffset long
type PrimitiveType
Résultat Constant

ReadBe() public méthode

public ReadBe ( long imageOffset, PrimitiveType type ) : Constant
imageOffset long
type PrimitiveType
Résultat Constant

ReadBeDouble() public static méthode

public static ReadBeDouble ( byte abImage, long off ) : Constant
abImage byte
off long
Résultat Constant

ReadBeDouble() public méthode

public ReadBeDouble ( long off ) : Constant
off long
Résultat Constant

ReadBeFloat() public static méthode

public static ReadBeFloat ( byte abImage, long off ) : Constant
abImage byte
off long
Résultat Constant

ReadBeFloat() public méthode

public ReadBeFloat ( long off ) : Constant
off long
Résultat Constant

ReadBeInt16() public static méthode

public static ReadBeInt16 ( byte img, long offset ) : short
img byte
offset long
Résultat short

ReadBeInt16() public méthode

public ReadBeInt16 ( uint off ) : short
off uint
Résultat short

ReadBeInt32() public static méthode

public static ReadBeInt32 ( byte abImage, long off ) : int
abImage byte
off long
Résultat int

ReadBeInt32() public méthode

public ReadBeInt32 ( uint off ) : int
off uint
Résultat int

ReadBeInt64() public static méthode

public static ReadBeInt64 ( byte image, long off ) : long
image byte
off long
Résultat long

ReadBeInt64() public méthode

public ReadBeInt64 ( uint off ) : long
off uint
Résultat long

ReadBeUInt16() public static méthode

public static ReadBeUInt16 ( byte abImage, long off ) : ushort
abImage byte
off long
Résultat ushort

ReadBeUInt16() public méthode

public ReadBeUInt16 ( uint off ) : ushort
off uint
Résultat ushort

ReadBeUInt32() public static méthode

public static ReadBeUInt32 ( byte abImage, long off ) : uint
abImage byte
off long
Résultat uint

ReadBeUInt32() public méthode

public ReadBeUInt32 ( uint off ) : uint
off uint
Résultat uint

ReadBeUInt64() public static méthode

public static ReadBeUInt64 ( byte abImage, long off ) : ulong
abImage byte
off long
Résultat ulong

ReadBeUint64() public méthode

public ReadBeUint64 ( uint off ) : ulong
off uint
Résultat ulong

ReadByte() public méthode

public ReadByte ( Address addr ) : byte
addr Address
Résultat byte

ReadLe() public static méthode

public static ReadLe ( byte abImage, long imageOffset, PrimitiveType type ) : Constant
abImage byte
imageOffset long
type PrimitiveType
Résultat Constant

ReadLe() public méthode

Reads a little-endian word from image offset.
If the word being read was a relocation, it is returned with a [[pointer]] or [[segment]] data type. Otherwise a neutral [[word]] is returned.
public ReadLe ( long imageOffset, PrimitiveType type ) : Constant
imageOffset long Offset from image start, in bytes.
type PrimitiveType Size of the word being requested.
Résultat Constant

ReadLeDouble() public méthode

public ReadLeDouble ( Address addr ) : Constant
addr Address
Résultat Constant

ReadLeDouble() public static méthode

public static ReadLeDouble ( byte abImage, long off ) : Constant
abImage byte
off long
Résultat Constant

ReadLeDouble() public méthode

public ReadLeDouble ( long off ) : Constant
off long
Résultat Constant

ReadLeFloat() public méthode

public ReadLeFloat ( Address addr ) : Constant
addr Address
Résultat Constant

ReadLeFloat() public static méthode

public static ReadLeFloat ( byte abImage, long off ) : Constant
abImage byte
off long
Résultat Constant

ReadLeFloat() public méthode

public ReadLeFloat ( long off ) : Constant
off long
Résultat Constant

ReadLeInt16() public méthode

public ReadLeInt16 ( Address addr ) : short
addr Address
Résultat short

ReadLeInt16() public static méthode

public static ReadLeInt16 ( byte abImage, long offset ) : short
abImage byte
offset long
Résultat short

ReadLeInt16() public méthode

public ReadLeInt16 ( uint off ) : short
off uint
Résultat short

ReadLeInt32() public méthode

public ReadLeInt32 ( Address addr ) : int
addr Address
Résultat int

ReadLeInt32() public static méthode

public static ReadLeInt32 ( byte abImage, long off ) : int
abImage byte
off long
Résultat int

ReadLeInt32() public méthode

public ReadLeInt32 ( uint off ) : int
off uint
Résultat int

ReadLeInt64() public méthode

public ReadLeInt64 ( Address addr ) : long
addr Address
Résultat long

ReadLeInt64() public static méthode

public static ReadLeInt64 ( byte image, long off ) : long
image byte
off long
Résultat long

ReadLeInt64() public méthode

public ReadLeInt64 ( uint off ) : long
off uint
Résultat long

ReadLeUInt16() public méthode

public ReadLeUInt16 ( Address addr ) : ushort
addr Address
Résultat ushort

ReadLeUInt16() public static méthode

public static ReadLeUInt16 ( byte img, long off ) : ushort
img byte
off long
Résultat ushort

ReadLeUInt16() public méthode

public ReadLeUInt16 ( uint off ) : ushort
off uint
Résultat ushort

ReadLeUInt32() public méthode

public ReadLeUInt32 ( Address addr ) : uint
addr Address
Résultat uint

ReadLeUInt32() public static méthode

public static ReadLeUInt32 ( byte img, long off ) : uint
img byte
off long
Résultat uint

ReadLeUInt32() public méthode

public ReadLeUInt32 ( uint off ) : uint
off uint
Résultat uint

ReadLeUInt64() public static méthode

public static ReadLeUInt64 ( byte img, long off ) : ulong
img byte
off long
Résultat ulong

ReadLeUint64() public méthode

public ReadLeUint64 ( Address addr ) : ulong
addr Address
Résultat ulong

ReadLeUint64() public méthode

public ReadLeUint64 ( uint off ) : ulong
off uint
Résultat ulong

ToString() public méthode

public ToString ( ) : string
Résultat string

TryReadBe() public méthode

public TryReadBe ( long imageOffset, PrimitiveType type, Constant &c ) : bool
imageOffset long
type PrimitiveType
c Constant
Résultat bool

TryReadBeInt32() public static méthode

public static TryReadBeInt32 ( byte abImage, long off, int &value ) : bool
abImage byte
off long
value int
Résultat bool

TryReadBeInt64() public static méthode

public static TryReadBeInt64 ( byte image, long off, long &value ) : bool
image byte
off long
value long
Résultat bool

TryReadBeUInt16() public static méthode

public static TryReadBeUInt16 ( byte img, long offset, ushort &value ) : bool
img byte
offset long
value ushort
Résultat bool

TryReadBeUInt32() public static méthode

public static TryReadBeUInt32 ( byte abImage, long off, uint &value ) : bool
abImage byte
off long
value uint
Résultat bool

TryReadBeUInt64() public static méthode

public static TryReadBeUInt64 ( byte image, long off, ulong &value ) : bool
image byte
off long
value ulong
Résultat bool

TryReadByte() public méthode

public TryReadByte ( Address addr, byte &b ) : bool
addr Address
b byte
Résultat bool

TryReadByte() public static méthode

public static TryReadByte ( byte img, long off, byte &b ) : bool
img byte
off long
b byte
Résultat bool

TryReadByte() public méthode

public TryReadByte ( long off, byte &b ) : bool
off long
b byte
Résultat bool

TryReadBytes() public méthode

public TryReadBytes ( Address addr, int length, byte membuf ) : bool
addr Address
length int
membuf byte
Résultat bool

TryReadBytes() public méthode

public TryReadBytes ( long off, int length, byte membuf ) : bool
off long
length int
membuf byte
Résultat bool

TryReadLe() public méthode

public TryReadLe ( long imageOffset, PrimitiveType type, Constant &c ) : bool
imageOffset long
type PrimitiveType
c Constant
Résultat bool

TryReadLeInt32() public static méthode

public static TryReadLeInt32 ( byte abImage, uint off, int &value ) : bool
abImage byte
off uint
value int
Résultat bool

TryReadLeInt64() public static méthode

public static TryReadLeInt64 ( byte image, long off, long &value ) : bool
image byte
off long
value long
Résultat bool

TryReadLeUInt16() public static méthode

public static TryReadLeUInt16 ( byte abImage, uint offset, ushort &us ) : bool
abImage byte
offset uint
us ushort
Résultat bool

TryReadLeUInt32() public méthode

public TryReadLeUInt32 ( Address address, uint &dw ) : bool
address Address
dw uint
Résultat bool

TryReadLeUInt32() public static méthode

public static TryReadLeUInt32 ( byte abImage, long off, uint &value ) : bool
abImage byte
off long
value uint
Résultat bool

TryReadLeUInt64() public méthode

public TryReadLeUInt64 ( Address address, ulong &dw ) : bool
address Address
dw ulong
Résultat bool

TryReadLeUInt64() public static méthode

public static TryReadLeUInt64 ( byte image, long off, ulong &value ) : bool
image byte
off long
value ulong
Résultat bool

WriteBeUInt32() public static méthode

public static WriteBeUInt32 ( byte abImage, uint offset, uint dw ) : void
abImage byte
offset uint
dw uint
Résultat void

WriteBeUInt32() public méthode

public WriteBeUInt32 ( long offset, uint dw ) : void
offset long
dw uint
Résultat void

WriteByte() public méthode

public WriteByte ( Address addr, byte b ) : void
addr Address
b byte
Résultat void

WriteByte() public méthode

public WriteByte ( long offset, byte b ) : void
offset long
b byte
Résultat void

WriteBytes() public méthode

public WriteBytes ( byte srcBytes, long offset, int count ) : void
srcBytes byte
offset long
count int
Résultat void

WriteBytes() public static méthode

public static WriteBytes ( byte srcBytes, long offset, int count, byte dstBytes ) : void
srcBytes byte
offset long
count int
dstBytes byte
Résultat void

WriteLeInt16() public static méthode

public static WriteLeInt16 ( byte abImage, long offset, short w ) : void
abImage byte
offset long
w short
Résultat void

WriteLeUInt16() public méthode

public WriteLeUInt16 ( Address addr, ushort w ) : void
addr Address
w ushort
Résultat void

WriteLeUInt16() public méthode

public WriteLeUInt16 ( long offset, ushort w ) : void
offset long
w ushort
Résultat void

WriteLeUInt32() public méthode

public WriteLeUInt32 ( Address addr, uint dw ) : void
addr Address
dw uint
Résultat void

WriteLeUInt32() public méthode

public WriteLeUInt32 ( long offset, uint dw ) : void
offset long
dw uint
Résultat void