From b6feff3f3d3bdcb4bea983a085f4ed794e186940 Mon Sep 17 00:00:00 2001 From: Xusheng Date: Tue, 16 Feb 2021 18:34:59 +0800 Subject: add a DisassemblySettings* parameter to MLIL/HLIL functions that retrieve instruction/expr text --- python/highlevelil.py | 2 +- python/mediumlevelil.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'python') diff --git a/python/highlevelil.py b/python/highlevelil.py index 1dc8a077..046d73a6 100644 --- a/python/highlevelil.py +++ b/python/highlevelil.py @@ -378,7 +378,7 @@ class HighLevelILInstruction(object): def lines(self): """HLIL text lines (read-only)""" count = ctypes.c_ulonglong() - lines = core.BNGetHighLevelILExprText(self._function.handle, self._expr_index, self._as_ast, count) + lines = core.BNGetHighLevelILExprText(self._function.handle, self._expr_index, self._as_ast, count, None) result = [] for i in range(0, count.value): addr = lines[i].addr diff --git a/python/mediumlevelil.py b/python/mediumlevelil.py index 65b90177..8d552b64 100644 --- a/python/mediumlevelil.py +++ b/python/mediumlevelil.py @@ -403,11 +403,11 @@ class MediumLevelILInstruction(object): if ((self._instr_index is not None) and (self._function.source_function is not None) and (self._expr_index == core.BNGetMediumLevelILIndexForInstruction(self._function.handle, self._instr_index))): if not core.BNGetMediumLevelILInstructionText(self._function.handle, self._function.source_function.handle, - self._function.arch.handle, self._instr_index, tokens, count): + self._function.arch.handle, self._instr_index, tokens, count, None): return None else: if not core.BNGetMediumLevelILExprText(self._function.handle, self._function.arch.handle, - self._expr_index, tokens, count): + self._expr_index, tokens, count, None): return None result = binaryninja.function.InstructionTextToken.get_instruction_lines(tokens, count.value) core.BNFreeInstructionText(tokens, count.value) -- cgit v1.3.1