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 (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... | |
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, 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 ghidra::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 an iterator to this element. The element's pass number is set to be the smallest value of any previous intersecting element. Additionally an intersect code is passed back:
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 ghidra::Address::overlap(), and themap.
LocationMap::iterator ghidra::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 |
References ghidra::Address::overlap(), and themap.
int4 ghidra::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 |
References ghidra::Address::overlap(), and themap.
Referenced by ghidra::Heritage::heritagePass().