◆ allocateInject()
int4 PcodeInjectLibrarySleigh::allocateInject |
( |
const string & |
sourceName, |
|
|
const string & |
name, |
|
|
int4 |
type |
|
) |
| |
|
protectedvirtual |
Allocate a new InjectPayload object.
This acts as an InjectPayload factory. The formal name and type of the payload are given, this library allocates a new object that fits with its storage scheme and returns the id.
- Parameters
-
sourceName | is a string describing the source of the new payload |
name | is the formal name of the payload |
type | is the formal type (CALLFIXUP_TYPE, CALLOTHERFIXUP_TYPE, etc.) of the payload |
- Returns
- the id associated with the new InjectPayload object
Implements PcodeInjectLibrary.
◆ getBehaviors()
const vector< OpBehavior * > & PcodeInjectLibrarySleigh::getBehaviors |
( |
void |
| ) |
|
|
virtual |
Get the array of op-code behaviors for initializing and emulator.
Behaviors are pulled from the underlying architecture in order to initialize the Emulate object which services the p-code script payloads.
- Returns
- the array of OpBehavior objects indexed by op-code
Implements PcodeInjectLibrary.
◆ getCachedContext()
virtual InjectContext& PcodeInjectLibrarySleigh::getCachedContext |
( |
void |
| ) |
|
|
inlinevirtual |
Retrieve a reusable context object for this library.
The object returned by this method gets passed to the payload inject() method. The clear() method must be called between uses.
- Returns
- the cached context object
Implements PcodeInjectLibrary.
◆ manualCallFixup()
int4 PcodeInjectLibrarySleigh::manualCallFixup |
( |
const string & |
name, |
|
|
const string & |
snippetstring |
|
) |
| |
|
virtual |
Manually add a call-fixup payload given a compilable snippet of p-code source.
The snippet is compiled immediately to produce the payload.
- Parameters
-
name | is the formal name of the new payload |
snippetstring | is the compilable snippet of p-code source |
- Returns
- the id of the new payload
Implements PcodeInjectLibrary.
◆ manualCallOtherFixup()
int4 PcodeInjectLibrarySleigh::manualCallOtherFixup |
( |
const string & |
name, |
|
|
const string & |
outname, |
|
|
const vector< string > & |
inname, |
|
|
const string & |
snippet |
|
) |
| |
|
virtual |
Manually add a callother-fixup payload given a compilable snippet of p-code source.
The snippet is compiled immediately to produce the payload. Symbol names for input and output parameters must be provided to the compiler.
- Parameters
-
name | is the formal name of the new payload |
outname | is the name of the output symbol |
inname | is the ordered list of input symbol names |
snippet | is the compilable snippet of p-code source |
- Returns
- the id of the new payload
Implements PcodeInjectLibrary.
◆ registerInject()
void PcodeInjectLibrarySleigh::registerInject |
( |
int4 |
injectid | ) |
|
|
protectedvirtual |
Finalize a payload within the library, once the payload is initialized.
This provides the derived class the opportunity to add the payload name to the symbol tables or do anything else it needs to once the InjectPayload object has been fully initialized.
- Parameters
-
Implements PcodeInjectLibrary.
◆ restoreDebug()
void PcodeInjectLibrarySleigh::restoreDebug |
( |
const Element * |
el | ) |
|
|
virtual |
A method for reading in p-code generated externally for use in debugging.
Instantiate a special InjectPayloadDynamic object initialized with an <injectdebug> tag. Within the library, this replaces the original InjectPayload, allowing its p-code to be replayed for debugging purposes.
- Parameters
-
el | is the <injectdebug> element |
Reimplemented from PcodeInjectLibrary.
The documentation for this class was generated from the following files: