IDA Domain Python API
ida_domain.BasicBlocksIterator Class Reference

Inherits object.

Public Member Functions

def __init__ (self, database, start_ea, end_ea)
 
def get_count (self)
 
def get_at_index (self, index)
 
"Iterator[qbasic_block_t]" __iter__ (self)
 

Properties

 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 

Detailed Description

Iterator for basic blocks in a function.

Constructor & Destructor Documentation

◆ __init__()

def ida_domain.BasicBlocksIterator.__init__ (   self,
  database,
  start_ea,
  end_ea 
)
__init__(self, database, start_ea, end_ea) -> BasicBlocksIterator
Constructs a basic block iterator for the specified function.

:param database: Reference to the active IDA database.
:param start_ea: Start address of the function.
:param end_ea: End address of the function.

Member Function Documentation

◆ __iter__()

"Iterator[qbasic_block_t]" ida_domain.BasicBlocksIterator.__iter__ (   self)
__iter__(self) -> Iterator[qbasic_block_t]

◆ get_at_index()

def ida_domain.BasicBlocksIterator.get_at_index (   self,
  index 
)
get_at_index(self, index) -> qbasic_block_t
Retrieves the basic block at the given index.

:param index: The index of the block.
:return: The qbasic_block_t at the specified index, or an empty block on error.

◆ get_count()

def ida_domain.BasicBlocksIterator.get_count (   self)
get_count(self) -> int
Retrieves the number of basic blocks in the current range.

:return: The number of basic blocks.

Property Documentation

◆ thisown

ida_domain.BasicBlocksIterator.thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
static