summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/function.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/python/function.py b/python/function.py
index ae3af65b..afd9d5b7 100644
--- a/python/function.py
+++ b/python/function.py
@@ -29,7 +29,7 @@ from . import _binaryninjacore as core
from .enums import (
AnalysisSkipReason, FunctionGraphType, SymbolType, InstructionTextTokenType, HighlightStandardColor,
HighlightColorStyle, DisassemblyOption, IntegerDisplayType, FunctionAnalysisSkipOverride, FunctionUpdateType,
- BuiltinType, ExprFolding
+ BuiltinType, ExprFolding, EarlyReturn
)
from . import associateddatastore # Required in the main scope due to being an argument for _FunctionAssociatedDataStore
@@ -3476,6 +3476,16 @@ class Function:
addr = addr.address
core.BNSetConditionInverted(self.handle, addr, invert)
+ def get_early_return(self, addr: Union[int, highlevelil.HighLevelILInstruction]) -> EarlyReturn:
+ if isinstance(addr, highlevelil.HighLevelILInstruction):
+ addr = addr.address
+ return EarlyReturn(core.BNGetEarlyReturn(self.handle, addr))
+
+ def set_early_return(self, addr: Union[int, highlevelil.HighLevelILInstruction], value: EarlyReturn):
+ if isinstance(addr, highlevelil.HighLevelILInstruction):
+ addr = addr.address
+ core.BNSetEarlyReturn(self.handle, addr, value)
+
class AdvancedFunctionAnalysisDataRequestor:
def __init__(self, func: Optional['Function'] = None):