close
IDA C++ SDK 9.2
Loading...
Searching...
No Matches
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 (void)
 func_tail_iterator_t (func_t *_pfn, ea_t ea=BADADDR)
 ~func_tail_iterator_t (void)
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)

Friends

struct kdata_t
class func_item_iterator_t

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();
....
func_tail_iterator_t(void)
Definition funcs.hpp:1346
bool ok
Definition kernwin.hpp:7410
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.

Deprecated
Use function_tail_iterator_t for safer ea-based access.

Constructor & Destructor Documentation

◆ func_tail_iterator_t() [1/2]

func_tail_iterator_t::func_tail_iterator_t ( void )
inline

◆ func_tail_iterator_t() [2/2]

func_tail_iterator_t::func_tail_iterator_t ( func_t * _pfn,
ea_t ea = BADADDR )
inline

◆ ~func_tail_iterator_t()

func_tail_iterator_t::~func_tail_iterator_t ( void )
inline

Member Function Documentation

◆ set()

bool func_tail_iterator_t::set ( func_t * _pfn,
ea_t ea = BADADDR )
inline

◆ set_ea()

bool func_tail_iterator_t::set_ea ( ea_t ea)
inline

◆ set_range()

bool func_tail_iterator_t::set_range ( ea_t ea1,
ea_t ea2 )
inline

◆ chunk()

const range_t & func_tail_iterator_t::chunk ( void ) const
inline

◆ first()

bool func_tail_iterator_t::first ( void )
inline

◆ last()

bool func_tail_iterator_t::last ( void )
inline

◆ next()

bool func_tail_iterator_t::next ( void )
inline

◆ prev()

bool func_tail_iterator_t::prev ( void )
inline

◆ main()

bool func_tail_iterator_t::main ( void )
inline

◆ kdata_t

friend struct kdata_t
friend

◆ func_item_iterator_t

friend class func_item_iterator_t
friend

The documentation for this class was generated from the following file:
  • /Users/geoffrey/ida-sdk/src/include/funcs.hpp