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

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

#include <funcs.hpp>

Public Member Functions

 function_item_iterator_t ()
 function_item_iterator_t (ea_t func_ea, ea_t ea=BADADDR)
bool set (ea_t func_ea, ea_t ea=BADADDR)
 Set a function range. if func_ea == BADADDR then a segment range will be set.
bool set_range (ea_t ea1, ea_t ea2)
 Set an arbitrary range.
bool first ()
bool last ()
ea_t current () const
bool set_ea (ea_t ea)
void chunk (range_t *out) const
bool next (testf_t *func, void *ud)
bool prev (testf_t *func, void *ud)
bool next_addr ()
bool next_head ()
bool next_code ()
bool next_data ()
bool next_not_tail ()
bool prev_addr ()
bool prev_head ()
bool prev_code ()
bool prev_data ()
bool prev_not_tail ()
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 ()

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(func_ea); ok; ok = fii.next_addr() )
msg("ea: %a\n", fii.current());
ea_t current() const
Definition funcs.hpp:1954
bool next_addr()
Definition funcs.hpp:1965
function_item_iterator_t()
Definition funcs.hpp:1925
bool set(ea_t func_ea, ea_t ea=BADADDR)
Set a function range. if func_ea == BADADDR then a segment range will be set.
Definition funcs.hpp:1928
bool ok
Definition kernwin.hpp:7410

If 'ea' is not specified in the call to set(), then the enumeration starts at the function entry point. If 'func_ea' is specified as BADADDR 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().

Constructor & Destructor Documentation

◆ function_item_iterator_t() [1/2]

function_item_iterator_t::function_item_iterator_t ( )
inline

◆ function_item_iterator_t() [2/2]

function_item_iterator_t::function_item_iterator_t ( ea_t func_ea,
ea_t ea = BADADDR )
inline

Member Function Documentation

◆ set()

bool function_item_iterator_t::set ( ea_t func_ea,
ea_t ea = BADADDR )
inline

Set a function range. if func_ea == BADADDR then a segment range will be set.

◆ set_range()

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

Set an arbitrary range.

◆ first()

bool function_item_iterator_t::first ( )
inline

◆ last()

bool function_item_iterator_t::last ( )
inline

◆ current()

ea_t function_item_iterator_t::current ( ) const
inline

◆ set_ea()

bool function_item_iterator_t::set_ea ( ea_t ea)
inline

◆ chunk()

void function_item_iterator_t::chunk ( range_t * out) const
inline

◆ next()

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

◆ prev()

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

◆ next_addr()

bool function_item_iterator_t::next_addr ( )
inline

◆ next_head()

bool function_item_iterator_t::next_head ( )
inline

◆ next_code()

bool function_item_iterator_t::next_code ( )
inline

◆ next_data()

bool function_item_iterator_t::next_data ( )
inline

◆ next_not_tail()

bool function_item_iterator_t::next_not_tail ( )
inline

◆ prev_addr()

bool function_item_iterator_t::prev_addr ( )
inline

◆ prev_head()

bool function_item_iterator_t::prev_head ( )
inline

◆ prev_code()

bool function_item_iterator_t::prev_code ( )
inline

◆ prev_data()

bool function_item_iterator_t::prev_data ( )
inline

◆ prev_not_tail()

bool function_item_iterator_t::prev_not_tail ( )
inline

◆ decode_prev_insn()

bool function_item_iterator_t::decode_prev_insn ( insn_t * out)
inline

◆ decode_preceding_insn()

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

◆ succ()

bool function_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 function_item_iterator_t::succ_code ( )
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