summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/lowlevelil.py4
-rw-r--r--python/mediumlevelil.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/python/lowlevelil.py b/python/lowlevelil.py
index 338eba68..79919efe 100644
--- a/python/lowlevelil.py
+++ b/python/lowlevelil.py
@@ -3784,13 +3784,13 @@ class LowLevelILFunction:
`LowLevelILFunction.ssa_reg_stacks_without_versions`, and `LowLevelILFunction.ssa_flags_without_versions`"""
return self.ssa_regs_without_versions + self.ssa_reg_stacks_without_versions + self.ssa_flags_without_versions
- def get_instruction_start(self, addr: int, arch: Optional['architecture.Architecture'] = None) -> Optional[int]:
+ def get_instruction_start(self, addr: int, arch: Optional['architecture.Architecture'] = None) -> Optional[InstructionIndex]:
if arch is None:
arch = self.arch
result = core.BNLowLevelILGetInstructionStart(self.handle, arch.handle, addr)
if result >= core.BNGetLowLevelILInstructionCount(self.handle):
return None
- return result
+ return InstructionIndex(result)
def clear_indirect_branches(self) -> None:
core.BNLowLevelILClearIndirectBranches(self.handle)
diff --git a/python/mediumlevelil.py b/python/mediumlevelil.py
index fb397213..6d4ae036 100644
--- a/python/mediumlevelil.py
+++ b/python/mediumlevelil.py
@@ -3490,7 +3490,7 @@ class MediumLevelILFunction:
def hlil(self) -> Optional[highlevelil.HighLevelILFunction]:
return self.high_level_il
- def get_instruction_start(self, addr: int, arch: Optional['architecture.Architecture'] = None) -> Optional[int]:
+ def get_instruction_start(self, addr: int, arch: Optional['architecture.Architecture'] = None) -> Optional[InstructionIndex]:
_arch = arch
if _arch is None:
if self._arch is None:
@@ -3499,7 +3499,7 @@ class MediumLevelILFunction:
result = core.BNMediumLevelILGetInstructionStart(self.handle, _arch.handle, addr)
if result >= core.BNGetMediumLevelILInstructionCount(self.handle):
return None
- return result
+ return InstructionIndex(result)
def expr(
self, operation: MediumLevelILOperation, a: int = 0, b: int = 0, c: int = 0, d: int = 0, e: int = 0,