Latest available version: IDA and decompilers v8.4.240320sp1 see all releases
Hex-Rays logo State-of-the-art binary code analysis tools
email icon
func_tail_iterator_t Class Reference

Class to enumerate all function tails sorted by addresses. More...

#include <funcs.hpp>

Public Member Functions

 func_tail_iterator_t (func_t *_pfn, ea_t ea=BADADDR)
 
bool set (func_t *_pfn, ea_t ea=BADADDR)
 
bool set_ea (ea_t ea)
 
bool set_range (ea_t ea1, ea_t ea2)
 
const range_tchunk (void) const
 
bool first (void)
 
bool last (void)
 
bool next (void)
 
bool prev (void)
 
bool main (void)
 

Detailed Description

Class to enumerate all function tails sorted by addresses.

Enumeration is started with main(), first(), or last(). If first() is used, the function entry chunk will be excluded from the enumeration. Otherwise it will be included in the enumeration (for main() and last()). The loop may continue until the next() or prev() function returns false. These functions return false when the enumeration is over. The tail chunks are always sorted by their addresses.

Sample code:

for ( bool ok=fti.first(); ok; ok=fti.next() )
const range_t &a = fti.chunk();
....
Class to enumerate all function tails sorted by addresses.
Definition: funcs.hpp:711
Base class for an range.
Definition: range.hpp:35

If the 'ea' parameter is used in the constructor, then the iterator is positioned at the chunk containing the specified 'ea'. Otherwise it is positioned at the function entry chunk. If 'pfn' is specified as nullptr then the set() function will fail, but it is still possible to use the class. In this case the iteration will be limited by the segment boundaries. The function main chunk is locked during the iteration. It is also possible to enumerate one single arbitrary range using set_range() This function is mainly designed to be used from func_item_iterator_t.


The documentation for this class was generated from the following file: