MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / __iter__

Method __iter__

python/flowgraph.py:127–143  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

125 return hash(ctypes.addressof(self.handle.contents))
126
127 def __iter__(self):
128 count = ctypes.c_ulonglong()
129 lines = core.BNGetFlowGraphNodeLines(self.handle, count)
130 assert lines is not None, "core.BNGetFlowGraphNodeLines returned None"
131 block = self.basic_block
132 try:
133 for i in range(0, count.value):
134 addr = lines[i].addr
135 if (lines[i].instrIndex != 0xffffffffffffffff) and (block
136 is not None) and hasattr(block, 'il_function'):
137 il_instr = block.il_function[lines[i].instrIndex]
138 else:
139 il_instr = None
140 tokens = function.InstructionTextToken._from_core_struct(lines[i].tokens, lines[i].count)
141 yield function.DisassemblyTextLine(tokens, addr, il_instr)
142 finally:
143 core.BNFreeDisassemblyTextLines(lines, count.value)
144
145 @property
146 def graph(self):

Callers

nothing calls this directly

Calls 2

DisassemblyTextLineMethod · 0.80
_from_core_structMethod · 0.45

Tested by

no test coverage detected