Ghidra Decompiler Analysis Engine
|
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 (const Address &addr) |
Look up if/how given address was heritaged. More... | |
int4 | findPass (const Address &addr) const |
Look up if/how given address was heritaged. More... | |
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, referred 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 |
LocationMap::iterator LocationMap::find | ( | const 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 |
int4 LocationMap::findPass | ( | const 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 |