diff options
| author | Peter LaFosse <peter@vector35.com> | 2018-12-03 22:20:28 -0500 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2018-12-13 13:32:18 -0500 |
| commit | 231afab8b0ba6c8c9eff879681c52724b6688c18 (patch) | |
| tree | 38026cfa20f34702b7267e9c397652119f27ebe7 /python/basicblock.py | |
| parent | 7357dd114a145ca64e7356233c3cb8b9dd9eae84 (diff) | |
Commonize all InstructionTextToken generation
Diffstat (limited to 'python/basicblock.py')
| -rw-r--r-- | python/basicblock.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/python/basicblock.py b/python/basicblock.py index d66a41c2..d68189ab 100644 --- a/python/basicblock.py +++ b/python/basicblock.py @@ -338,17 +338,7 @@ class BasicBlock(object): else: il_instr = None color = highlight.HighlightColor._from_core_struct(lines[i].highlight) - tokens = [] - for j in range(0, lines[i].count): - token_type = InstructionTextTokenType(lines[i].tokens[j].type) - text = lines[i].tokens[j].text - value = lines[i].tokens[j].value - size = lines[i].tokens[j].size - operand = lines[i].tokens[j].operand - context = lines[i].tokens[j].context - confidence = lines[i].tokens[j].confidence - address = lines[i].tokens[j].address - tokens.append(binaryninja.function.InstructionTextToken(token_type, text, value, size, operand, context, address, confidence)) + tokens = binaryninja.function.InstructionTextToken.get_instruction_lines(lines[i].tokens, lines[i].count) result.append(binaryninja.function.DisassemblyTextLine(tokens, addr, il_instr, color)) core.BNFreeDisassemblyTextLines(lines, count.value) return result |
