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

Method __getitem__

python/highlevelil.py:2542–2551  ·  view source on GitHub ↗
(self, i: int)

Source from the content-addressed store, hash-verified

2540 return int(core.BNGetHighLevelILInstructionCount(self.handle))
2541
2542 def __getitem__(self, i: int) -> HighLevelILInstruction:
2543 if isinstance(i, slice) or isinstance(i, tuple):
2544 raise IndexError("expected integer index")
2545 if i < -len(self) or i >= len(self):
2546 raise IndexError("index out of range")
2547 if i < 0:
2548 i = len(self) + i
2549 return HighLevelILInstruction.create(
2550 self, ExpressionIndex(core.BNGetHighLevelILIndexForInstruction(self.handle, i)), False, InstructionIndex(i)
2551 )
2552
2553 def __setitem__(self, i, j):
2554 raise IndexError("instruction modification not implemented")

Callers

nothing calls this directly

Calls 1

createMethod · 0.45

Tested by

no test coverage detected