decompiler
1.0.0
|
Description of a LOAD operation that needs to be guarded. More...
#include <heritage.hh>
Public Member Functions | |
PcodeOp * | getOp (void) const |
Get the PcodeOp being guarded. | |
uintb | getMinimum (void) const |
Get minimum offset of the guarded range. | |
uintb | getMaximum (void) const |
Get maximum offset of the guarded range. | |
int4 | getStep (void) const |
Get the calculated step associated with the range (or 0) | |
bool | isGuarded (const Address &addr) const |
Does this guard apply to the given address. More... | |
bool | isRangeLocked (void) const |
Return true if the range is fully determined. | |
bool | isValid (OpCode opc) const |
Return true if the record still describes an active LOAD. | |
Private Member Functions | |
void | establishRange (const ValueSetRead &valueSet) |
Convert partial value set analysis into guard range. More... | |
void | finalizeRange (const ValueSetRead &valueSet) |
Convert value set analysis to final guard range. | |
void | set (PcodeOp *o, AddrSpace *s, uintb off) |
Set a new unanalyzed LOAD guard that initially guards everything. More... | |
Private Attributes | |
PcodeOp * | op |
The LOAD op. | |
AddrSpace * | spc |
The stack space being loaded from. | |
uintb | pointerBase |
Base offset of the pointer. | |
uintb | minimumOffset |
Minimum offset of the LOAD. | |
uintb | maximumOffset |
Maximum offset of the LOAD. | |
int4 | step |
Step of any access into this range (0=unknown) | |
int4 | analysisState |
0=unanalyzed, 1=analyzed(partial result), 2=analyzed(full result) | |
Friends | |
class | Heritage |
Description of a LOAD operation that needs to be guarded.
Heritage maintains a list of CPUI_LOAD ops that reference the stack dynamically. These can potentially alias stack Varnodes, so we maintain what (possibly limited) information we known about the range of stack addresses that can be referenced.
|
private |
Convert partial value set analysis into guard range.
Make some determination of the range of possible values for a LOAD based an partial value set analysis. This can sometimes get
isAnalyzed is set to true, if full range analysis is not needed
valueSet | is the calculated value set as seen by the LOAD operation |
References ValueSetRead::getRange(), CircleRange::getSize(), ValueSetRead::isLeftStable(), and ValueSetRead::isRightStable().
Referenced by Heritage::analyzeNewLoadGuards().
bool LoadGuard::isGuarded | ( | const Address & | addr | ) | const |
Does this guard apply to the given address.
Check if the address falls within the range defined by this
addr | is the given address |
References Address::getOffset(), and Address::getSpace().
Referenced by RuleIndirectCollapse::applyOp().
Set a new unanalyzed LOAD guard that initially guards everything.
o | is the LOAD op |
s | is the (stack) space it is loading from |
off | is the base offset that is indexed from |
References AddrSpace::getHighest().