C# Class Reko.Gui.Windows.Controls.MixedCodeDataModel

Provides a text model that mixes code and data.
Inheritance: TextViewModel
Show file Open project: uxmal/reko Class Usage Examples

Public Methods

Method Description
Clone ( ) : MixedCodeDataModel
ComparePositions ( object a, object b ) : int
CountLines ( object startPos, object endPos ) : int
GetDataItemNodes ( ) : Collection
GetPositionAsFraction ( ) : int>.Tuple

Returns the (approximate) position. This doesn't have to be 100% precise, but it shouldn't be insanely wrong either.

MixedCodeDataModel ( MixedCodeDataModel that ) : Reko.Core
MixedCodeDataModel ( Program program ) : Reko.Core
MoveToLine ( object position, int offset ) : int
SetPositionAsFraction ( int numer, int denom ) : void

Private Methods

Method Description
Align ( Address addr, uint alignment ) : Address
Align ( ulong ul, uint alignment ) : ulong
CollectInstructions ( ) : void

Preemptively collect the machine code instructions in all image map blocks.

CountBlockLines ( ImageMapItem item ) : int
CountDisassembledLines ( Reko.Core.ImageMapBlock bi ) : int
CountLines ( ) : int
CountMemoryLines ( ImageMapItem item ) : int

Count the number of lines a memory area subtends.

We align mempry spans on 16-byte boundaries (//$REVIEW for now, this should be user-adjustable) so if we have a memory span straddling such a boundary, we have to account for it. E.g. the span [01FC-0201] should be rendered: 01FC 0C 0D 0F .... 0200 00 01 .. and therefore requires 2 lines even though the number of bytes is less than 16.

FindIndexOfMemoryAddress ( ImageMapItem item, Address addr ) : int

Find the index of the address within the item.

GetAddressOfLine ( ImageMapItem item, int i ) : Address
GetLineOffset ( ImageMapItem item, Address addr ) : int
SanitizeAddress ( Address position ) : Address

Given an address, attempts to make sure that it points to a valid position in the address space or to the EOF

Method Details

Clone() public method

public Clone ( ) : MixedCodeDataModel
return MixedCodeDataModel

ComparePositions() public method

public ComparePositions ( object a, object b ) : int
a object
b object
return int

CountLines() public method

public CountLines ( object startPos, object endPos ) : int
startPos object
endPos object
return int

GetDataItemNodes() public method

public GetDataItemNodes ( ) : Collection
return Collection

GetPositionAsFraction() public method

Returns the (approximate) position. This doesn't have to be 100% precise, but it shouldn't be insanely wrong either.
public GetPositionAsFraction ( ) : int>.Tuple
return int>.Tuple

MixedCodeDataModel() public method

public MixedCodeDataModel ( MixedCodeDataModel that ) : Reko.Core
that MixedCodeDataModel
return Reko.Core

MixedCodeDataModel() public method

public MixedCodeDataModel ( Program program ) : Reko.Core
program Program
return Reko.Core

MoveToLine() public method

public MoveToLine ( object position, int offset ) : int
position object
offset int
return int

SetPositionAsFraction() public method

public SetPositionAsFraction ( int numer, int denom ) : void
numer int
denom int
return void