From 231afab8b0ba6c8c9eff879681c52724b6688c18 Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Mon, 3 Dec 2018 22:20:28 -0500 Subject: Commonize all InstructionTextToken generation --- python/lowlevelil.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'python/lowlevelil.py') diff --git a/python/lowlevelil.py b/python/lowlevelil.py index a98de6d3..2a8ba5d0 100644 --- a/python/lowlevelil.py +++ b/python/lowlevelil.py @@ -524,17 +524,7 @@ class LowLevelILInstruction(object): if not core.BNGetLowLevelILExprText(self.function.handle, self.function.arch.handle, self.expr_index, tokens, count): return None - result = [] - for i in range(0, count.value): - token_type = InstructionTextTokenType(tokens[i].type) - text = tokens[i].text - value = tokens[i].value - size = tokens[i].size - operand = tokens[i].operand - context = tokens[i].context - confidence = tokens[i].confidence - address = tokens[i].address - result.append(binaryninja.function.InstructionTextToken(token_type, text, value, size, operand, context, address, confidence)) + result = binaryninja.function.InstructionTextToken.get_instruction_lines(tokens, count.value) core.BNFreeInstructionText(tokens, count.value) return result -- cgit v1.3.1