decompiler
1.0.0
|
Map object for keeping track of which address ranges have been heritaged. More...
#include <heritage.hh>
Public Types | |
typedef map< Address, SizePass >::iterator | iterator |
Iterator into the main map. | |
Public Member Functions | |
iterator | add (Address addr, int4 size, int4 pass, int4 &intersect) |
Mark new address as heritaged. More... | |
iterator | find (Address addr) |
Look up if/how given address was heritaged. More... | |
int4 | findPass (Address addr) const |
Look up if/how given address was heritaged. More... | |
void | erase (iterator iter) |
Remove a particular entry from the map. | |
iterator | begin (void) |
Get starting iterator over heritaged ranges. | |
iterator | end (void) |
Get ending iterator over heritaged ranges. | |
void | clear (void) |
Clear the map of heritaged ranges. | |
Private Attributes | |
map< Address, SizePass > | themap |
Heritaged addresses mapped to range size and pass number. | |
Map object for keeping track of which address ranges have been heritaged.
We keep track of a fairly fine grained description of when each address range was entered in SSA form, refered to as heritaged or, for Varnode objects, no longer free. An address range is added using the add() method, which includes the particular pass when it was entered. The map can be queried using findPass() that informs the caller whether the address has been heritaged and if so in which pass.
LocationMap::iterator LocationMap::add | ( | Address | addr, |
int4 | size, | ||
int4 | pass, | ||
int4 & | intersect | ||
) |
Mark new address as heritaged.
Update disjoint cover making sure (addr,size) is contained in a single element and return iterator to this element. Pass back intersect value:
addr | is the starting address of the range to add |
size | is the number of bytes in the range |
pass | is the pass number when the range was heritaged |
intersect | is a reference for passing back the intersect code |
References Address::overlap(), and themap.
Referenced by Heritage::heritage(), and Heritage::refinement().
LocationMap::iterator LocationMap::find | ( | Address | addr | ) |
Look up if/how given address was heritaged.
If the given address was heritaged, return (the iterator to) the SizeMap entry describing the associated range and when it was heritaged.
addr | is the given address |
References Address::overlap(), and themap.
Referenced by Heritage::placeMultiequals(), and Heritage::refinement().
int4 LocationMap::findPass | ( | Address | addr | ) | const |
Look up if/how given address was heritaged.
Return the pass number when the given address was heritaged, or -1 if it was not heritaged
addr | is the given address |
References Address::overlap(), and themap.
Referenced by Heritage::heritagePass().