|
virtual int4 | getContextSize (void) const |
| Retrieve the number of words (uintm) in a context blob. More...
|
|
virtual void | registerVariable (const string &nm, int4 sbit, int4 ebit) |
| Register a new named context variable (as a bit range) with the database. More...
|
|
virtual const uintm * | getContext (const Address &addr) const |
| Get the context blob of values associated with a given address. More...
|
|
virtual const uintm * | getContext (const Address &addr, uintb &first, uintb &last) const |
| Get the context blob of values associated with a given address and its bounding offsets. More...
|
|
virtual TrackedSet & | getTrackedDefault (void) |
| Get the set of default values for all tracked registers. More...
|
|
virtual const TrackedSet & | getTrackedSet (const Address &addr) const |
| Get the set of tracked register values associated with the given address. More...
|
|
virtual TrackedSet & | createSet (const Address &addr1, const Address &addr2) |
| Create a tracked register set that is valid over the given range. More...
|
|
virtual void | saveXml (ostream &s) const |
| Serialize the entire database to an XML stream. More...
|
|
virtual void | restoreXml (const Element *el, const AddrSpaceManager *manage) |
| Restore the state of this database object from a serialized XML stream. More...
|
|
virtual void | restoreFromSpec (const Element *el, const AddrSpaceManager *manage) |
| Add initial context state from XML tags in compiler/processor specifications. More...
|
|
void | setVariableDefault (const string &nm, uintm val) |
| Provide a default value for a context variable. More...
|
|
uintm | getDefaultValue (const string &nm) const |
| Retrieve the default value for a context variable. More...
|
|
void | setVariable (const string &nm, const Address &addr, uintm value) |
| Set a context value at the given address. More...
|
|
uintm | getVariable (const string &nm, const Address &addr) const |
| Retrieve a context value at the given address. More...
|
|
void | setContextChangePoint (const Address &addr, int4 num, uintm mask, uintm value) |
| Set a specific context value starting at the given address. More...
|
|
void | setContextRegion (const Address &addr1, const Address &addr2, int4 num, uintm mask, uintm value) |
| Set a context variable value over a given range of addresses. More...
|
|
void | setVariableRegion (const string &nm, const Address &begad, const Address &endad, uintm value) |
| Set a context variable by name over a given range of addresses. More...
|
|
uintb | getTrackedValue (const VarnodeData &mem, const Address &point) const |
| Get the value of a tracked register at a specific address. More...
|
|
An in-memory implementation of the ContextDatabase interface.
Context blobs are held in a partition map on addresses. Any address within the map indicates a split point, where the value of a context variable was explicitly changed. Sets of tracked registers are held in a separate partition map.
void ContextInternal::registerVariable |
( |
const string & |
nm, |
|
|
int4 |
sbit, |
|
|
int4 |
ebit |
|
) |
| |
|
virtual |
Register a new named context variable (as a bit range) with the database.
A new variable is registered by providing a name and the range of bits the value will occupy within the context blob. The full blob size is automatically increased if necessary. The variable must be contained within a single word, and all variables must be registered before any values can be set.
- Parameters
-
nm | is the name of the new variable |
sbit | is the position of the variable's most significant bit within the blob |
ebit | is the position of the variable's least significant bit within the blob |
Implements ContextDatabase.