IDA C++ SDK 9.2
Loading...
Searching...
No Matches
func_item_iterator_t Class Reference

Class to enumerate all function instructions and data sorted by addresses. More...

#include <funcs.hpp>

Public Member Functions

 func_item_iterator_t (void)
 func_item_iterator_t (func_t *pfn, ea_t _ea=BADADDR)
bool set (func_t *pfn, ea_t _ea=BADADDR)
 Set a function range. if pfn == nullptr then a segment range will be set.
bool set_range (ea_t ea1, ea_t ea2)
 Set an arbitrary range.
bool first (void)
bool last (void)
ea_t current (void) const
bool set_ea (ea_t _ea)
const range_tchunk (void) const
bool next (testf_t *func, void *ud)
bool prev (testf_t *func, void *ud)
bool next_addr (void)
bool next_head (void)
bool next_code (void)
bool next_data (void)
bool next_not_tail (void)
bool prev_addr (void)
bool prev_head (void)
bool prev_code (void)
bool prev_data (void)
bool prev_not_tail (void)
bool decode_prev_insn (insn_t *out)
bool decode_preceding_insn (eavec_t *visited, bool *p_farref, insn_t *out)
bool succ (testf_t *func, void *ud)
 Similar to next(), but succ() iterates the chunks from low to high addresses, while next() iterates through chunks starting at the function entry chunk.
bool succ_code (void)

Friends

struct kdata_t

Detailed Description

Class to enumerate all function instructions and data sorted by addresses.

The function entry chunk items are enumerated first regardless of their addresses

Sample code:

for ( bool ok=fii.set(pfn, ea); ok; ok=fii.next_addr() )
ea_t ea = fii.current();
....
ea_t current(void) const
Definition funcs.hpp:1435
bool set(func_t *pfn, ea_t _ea=BADADDR)
Set a function range. if pfn == nullptr then a segment range will be set.
Definition funcs.hpp:1426
func_item_iterator_t(void)
Definition funcs.hpp:1423
bool next_addr(void)
Definition funcs.hpp:1446
bool ok
Definition kernwin.hpp:7410
uint64 ea_t
Definition pro.h:425

If 'ea' is not specified in the call to set(), then the enumeration starts at the function entry point. 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. It is also possible to enumerate addresses in an arbitrary range using set_range().

Deprecated
Use function_item_iterator_t for safer ea-based access.

Constructor & Destructor Documentation

◆ func_item_iterator_t() [1/2]

func_item_iterator_t::func_item_iterator_t ( void )
inline

◆ func_item_iterator_t() [2/2]

func_item_iterator_t::func_item_iterator_t ( func_t * pfn,
ea_t _ea = BADADDR )
inline

Member Function Documentation

◆ set()

bool func_item_iterator_t::set ( func_t * pfn,
ea_t _ea = BADADDR )
inline

Set a function range. if pfn == nullptr then a segment range will be set.

◆ set_range()

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

Set an arbitrary range.

◆ first()

bool func_item_iterator_t::first ( void )
inline

◆ last()

bool func_item_iterator_t::last ( void )
inline

◆ current()

ea_t func_item_iterator_t::current ( void ) const
inline

◆ set_ea()

bool func_item_iterator_t::set_ea ( ea_t _ea)
inline

◆ chunk()

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

◆ next()

bool func_item_iterator_t::next ( testf_t * func,
void * ud )
inline

◆ prev()

bool func_item_iterator_t::prev ( testf_t * func,
void * ud )
inline

◆ next_addr()

bool func_item_iterator_t::next_addr ( void )
inline

◆ next_head()

bool func_item_iterator_t::next_head ( void )
inline

◆ next_code()

bool func_item_iterator_t::next_code ( void )
inline

◆ next_data()

bool func_item_iterator_t::next_data ( void )
inline

◆ next_not_tail()

bool func_item_iterator_t::next_not_tail ( void )
inline

◆ prev_addr()

bool func_item_iterator_t::prev_addr ( void )
inline

◆ prev_head()

bool func_item_iterator_t::prev_head ( void )
inline

◆ prev_code()

bool func_item_iterator_t::prev_code ( void )
inline

◆ prev_data()

bool func_item_iterator_t::prev_data ( void )
inline

◆ prev_not_tail()

bool func_item_iterator_t::prev_not_tail ( void )
inline

◆ decode_prev_insn()

bool func_item_iterator_t::decode_prev_insn ( insn_t * out)
inline

◆ decode_preceding_insn()

bool func_item_iterator_t::decode_preceding_insn ( eavec_t * visited,
bool * p_farref,
insn_t * out )
inline

◆ succ()

bool func_item_iterator_t::succ ( testf_t * func,
void * ud )
inline

Similar to next(), but succ() iterates the chunks from low to high addresses, while next() iterates through chunks starting at the function entry chunk.

◆ succ_code()

bool func_item_iterator_t::succ_code ( void )
inline

◆ kdata_t

friend struct kdata_t
friend

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