Method | Description | |
---|---|---|
AdjustProcedureAddress ( Address addr ) : Address |
Some architectures platforms (I'm looking at you ARM Thumb) will use addresses that are offset by 1. Most don't.
|
|
CreateAbsoluteMemoryMap ( ) : Reko.Core.SegmentMap |
Creates an empty imagemap based on the absolute memory map. It is the caller's responsibility to fill in the MemoryArea properties of each resulting ImageSegment.
|
|
CreateImplicitArgumentRegisters ( ) : HashSet |
Creates a set that represents those registers that are never used as arguments to a procedure. Typically, the stack pointer register is one of these registers. Some architectures define global registers that are preserved across calls; these should also be present in this set. |
|
CreateMetadata ( ) : Reko.Core.TypeLibrary | ||
CreatePointerScanner ( Reko.Core.SegmentMap segmentMap, Reko.Core.ImageReader rdr, IEnumerable address, PointerScannerFlags pointerScannerFlags ) : IEnumerable | ||
CreateProcedureSerializer ( ISerializedTypeVisitor |
Creates a procedure serializer that understands the calling conventions used on this processor and environment
|
|
CreateTrashedRegisters ( ) : HashSet |
Creates a set of registers that the "standard" ABI cannot guarantee will survive a call. Reko will do its best to determine what registers are trashed by a procedure, but when indirect calls are involved we have to guess. If Reko's guess is incorrect, users can override it by proving oracular type information. |
|
DataTypeFromImportName ( string importName ) : Tuple |
||
DetermineCallingConvention ( FunctionType signature ) : string | ||
EnsureTypeLibraries ( string envName ) : void |
Utility function for subclasses that loads all type libraries and characteristics libraries defined in the Reko configuration file.
|
|
FindMainProcedure ( Program program, Address addrStart ) : Reko.Core.ImageSymbol | ||
FindService ( RtlInstruction rtl, |
||
FindService ( int vector, |
||
FindService ( string name ) : Reko.Core.SystemService | ||
FormatProcedureName ( Program program, Procedure proc ) : string |
Formats a program/module and a procedure name together. This is done in the Windows way {module}!{procname}. Other platforms may have other conventions. Please override this in the other platforms to give the correct output. |
|
GetByteSizeFromCBasicType ( CBasicType cb ) : int | ||
GetPrimitiveTypeName ( PrimitiveType pt, string language ) : string | ||
GetTrampolineDestination ( Reko.Core.ImageReader imageReader, IRewriterHost host ) : Reko.Core.ProcedureBase |
If the instructions located at the address the image reader is reading are a trampoline, returns the procedure where the destination is located, otherwise returns null.
|
|
InjectProcedureEntryStatements ( Procedure proc, Address addr, Reko.Core.CodeEmitter emitter ) : void | ||
LoadUserOptions ( object>.Dictionary |
If the platform can be customized by user, load those customizations here.
|
|
LookupCharacteristicsByName ( string procName ) : Reko.Core.Serialization.ProcedureCharacteristics | ||
LookupGlobalByName ( string moduleName, string globalName ) : Identifier | ||
LookupGlobalByOrdinal ( string moduleName, int ordinal ) : Identifier | ||
LookupProcedureByName ( string moduleName, string procName ) : Reko.Core.ExternalProcedure | ||
LookupProcedureByOrdinal ( string moduleName, int ordinal ) : ExternalProcedure | ||
MakeAddressFromConstant ( Constant c ) : Address | ||
MakeAddressFromLinear ( ulong uAddr ) : Address |
Given a linear address, converts it to an Address instance. By default, use the architecture pointer size for the address. The method is virtual to allow a platform to override the pointer size. For instance although the PowerPC 64 has 64-bit addresses, the Playstation3 implementation uses 32-bit addresses. |
|
SaveUserOptions ( ) : object>.Dictionary |
If the platform can be customized by user, save those customizations here.
|
|
SignatureFromName ( string fnName ) : ExternalProcedure |
Guess signature from the name of the procedure.
|
|
TryParseAddress ( string sAddress, Address &addr ) : bool |
Method | Description | |
---|---|---|
Platform ( IServiceProvider services, IProcessorArchitecture arch, string platformId ) : Reko.Core.CLanguage |
Initializes a Platform instance
|
public AdjustProcedureAddress ( Address addr ) : Address | ||
addr | Address | |
return | Address |
public CreateAbsoluteMemoryMap ( ) : Reko.Core.SegmentMap | ||
return | Reko.Core.SegmentMap |
public abstract CreateImplicitArgumentRegisters ( ) : HashSet |
||
return | HashSet |
public CreateMetadata ( ) : Reko.Core.TypeLibrary | ||
return | Reko.Core.TypeLibrary |
public CreatePointerScanner ( Reko.Core.SegmentMap segmentMap, Reko.Core.ImageReader rdr, IEnumerable address, PointerScannerFlags pointerScannerFlags ) : IEnumerable | ||
segmentMap | Reko.Core.SegmentMap | |
rdr | Reko.Core.ImageReader | |
address | IEnumerable | |
pointerScannerFlags | PointerScannerFlags | |
return | IEnumerable |
public abstract CreateProcedureSerializer ( ISerializedTypeVisitor |
||
typeLoader | ISerializedTypeVisitor |
Used to resolve data types |
defaultConvention | string | Default calling convention, if none specified. |
return | Reko.Core.Serialization.ProcedureSerializer |
public abstract CreateTrashedRegisters ( ) : HashSet |
||
return | HashSet |
public DataTypeFromImportName ( string importName ) : Tuple |
||
importName | string | |
return | Tuple |
public DetermineCallingConvention ( FunctionType signature ) : string | ||
signature | FunctionType | |
return | string |
public EnsureTypeLibraries ( string envName ) : void | ||
envName | string | |
return | void |
public FindMainProcedure ( Program program, Address addrStart ) : Reko.Core.ImageSymbol | ||
program | Program | |
addrStart | Address | |
return | Reko.Core.ImageSymbol |
public FindService ( RtlInstruction rtl, |
||
rtl | RtlInstruction | |
state | ||
return | Reko.Core.SystemService |
public abstract FindService ( int vector, |
||
vector | int | |
state | ||
return | Reko.Core.SystemService |
public FindService ( string name ) : Reko.Core.SystemService | ||
name | string | |
return | Reko.Core.SystemService |
public FormatProcedureName ( Program program, Procedure proc ) : string | ||
program | Program | |
proc | Procedure | |
return | string |
public abstract GetByteSizeFromCBasicType ( CBasicType cb ) : int | ||
cb | CBasicType | |
return | int |
public GetPrimitiveTypeName ( PrimitiveType pt, string language ) : string | ||
pt | PrimitiveType | |
language | string | |
return | string |
public abstract GetTrampolineDestination ( Reko.Core.ImageReader imageReader, IRewriterHost host ) : Reko.Core.ProcedureBase | ||
imageReader | Reko.Core.ImageReader | |
host | IRewriterHost | |
return | Reko.Core.ProcedureBase |
public InjectProcedureEntryStatements ( Procedure proc, Address addr, Reko.Core.CodeEmitter emitter ) : void | ||
proc | Procedure | |
addr | Address | |
emitter | Reko.Core.CodeEmitter | |
return | void |
public LoadUserOptions ( object>.Dictionary |
||
options | object>.Dictionary | |
return | void |
public LookupCharacteristicsByName ( string procName ) : Reko.Core.Serialization.ProcedureCharacteristics | ||
procName | string | |
return | Reko.Core.Serialization.ProcedureCharacteristics |
public LookupGlobalByName ( string moduleName, string globalName ) : Identifier | ||
moduleName | string | |
globalName | string | |
return | Identifier |
public LookupGlobalByOrdinal ( string moduleName, int ordinal ) : Identifier | ||
moduleName | string | |
ordinal | int | |
return | Identifier |
public abstract LookupProcedureByName ( string moduleName, string procName ) : Reko.Core.ExternalProcedure | ||
moduleName | string | |
procName | string | |
return | Reko.Core.ExternalProcedure |
public LookupProcedureByOrdinal ( string moduleName, int ordinal ) : ExternalProcedure | ||
moduleName | string | |
ordinal | int | |
return | ExternalProcedure |
public MakeAddressFromConstant ( Constant c ) : Address | ||
c | Constant | |
return | Address |
public MakeAddressFromLinear ( ulong uAddr ) : Address | ||
uAddr | ulong | |
return | Address |
protected Platform ( IServiceProvider services, IProcessorArchitecture arch, string platformId ) : Reko.Core.CLanguage | ||
services | IServiceProvider | |
arch | IProcessorArchitecture | |
platformId | string | |
return | Reko.Core.CLanguage |
public SaveUserOptions ( ) : object>.Dictionary |
||
return | object>.Dictionary |
public SignatureFromName ( string fnName ) : ExternalProcedure | ||
fnName | string | |
return | ExternalProcedure |
public TryParseAddress ( string sAddress, Address &addr ) : bool | ||
sAddress | string | |
addr | Address | |
return | bool |