ROSE 0.11.145.147
|
Describes how to modify machine state after each instruction.
The hot patching works by examining the hot patch records one by one trying to match them to the current machine state. When a record matches, the machine state is updated according to the matched record.
Definition at line 22 of file HotPatch.h.
#include <Rose/BinaryAnalysis/HotPatch.h>
Classes | |
class | Record |
Describes a single hot patch. More... | |
Public Types | |
typedef std::vector< Record > | Records |
Ordered list of hot patch records. | |
Public Member Functions | |
size_t | nRecords () const |
Number of hot-patch records in this object. | |
void | clear () |
Remove all records from this object. | |
size_t | append (const Record &record) |
Append a hot-patch record. | |
const Records & | records () const |
Property: Hot patch records. | |
Records & | records () |
Property: Hot patch records. | |
const Record & | operator[] (size_t idx) const |
Reference a particular record. | |
Record & | operator[] (size_t idx) |
Reference a particular record. | |
size_t | apply (const InstructionSemantics::BaseSemantics::RiscOperatorsPtr &) const |
Apply records to a machine state. | |
size_t | operator() (const InstructionSemantics::BaseSemantics::RiscOperatorsPtr &ops) const |
Apply records to a machine state. | |
Static Public Member Functions | |
static void | initDiagnostics () |
Initialize diagnostic output. | |
Static Public Attributes | |
static Sawyer::Message::Facility | mlog |
Diagnostic output for hot patching. | |
typedef std::vector<Record> Rose::BinaryAnalysis::HotPatch::Records |
Ordered list of hot patch records.
Definition at line 144 of file HotPatch.h.
|
inline |
Property: Hot patch records.
Hot patch records are matched in the order they're defined here.
Definition at line 166 of file HotPatch.h.
|
inline |
Property: Hot patch records.
Hot patch records are matched in the order they're defined here.
Definition at line 169 of file HotPatch.h.
|
inline |
Number of hot-patch records in this object.
Definition at line 175 of file HotPatch.h.
|
inline |
Remove all records from this object.
Definition at line 180 of file HotPatch.h.
|
inline |
Append a hot-patch record.
This is just a convenience function that's equivalent to records.push_back(x)
. It returns the index of the new record.
Definition at line 188 of file HotPatch.h.
|
inline |
Reference a particular record.
The idx
must be less than nRecords.
Definition at line 198 of file HotPatch.h.
|
inline |
Reference a particular record.
The idx
must be less than nRecords.
Definition at line 202 of file HotPatch.h.
size_t Rose::BinaryAnalysis::HotPatch::apply | ( | const InstructionSemantics::BaseSemantics::RiscOperatorsPtr & | ) | const |
Apply records to a machine state.
Scans through the records of this object and tries to match each against the specified machine state. If a match occurs, the state is modified according to the record. After a match is found and a change is made, the process continues according to the matched record's behavior property.
Returns the number of matching records that were applied.
Referenced by operator()().
|
inline |
Apply records to a machine state.
Scans through the records of this object and tries to match each against the specified machine state. If a match occurs, the state is modified according to the record. After a match is found and a change is made, the process continues according to the matched record's behavior property.
Returns the number of matching records that were applied.
Definition at line 218 of file HotPatch.h.
References apply().
|
static |
Initialize diagnostic output.
This is called automatically when ROSE is initialized.
|
static |
Diagnostic output for hot patching.
Definition at line 25 of file HotPatch.h.