Gets HLIL text lines with optional settings
(self, settings: Optional['function.DisassemblySettings'] = None)
| 924 | return core.BNHighLevelILHasSideEffects(self.function.handle, self.expr_index) |
| 925 | |
| 926 | def get_lines(self, settings: Optional['function.DisassemblySettings'] = None) -> LinesType: |
| 927 | """Gets HLIL text lines with optional settings""" |
| 928 | if settings is not None: |
| 929 | settings = settings.handle |
| 930 | count = ctypes.c_ulonglong() |
| 931 | lines = core.BNGetHighLevelILExprText(self.function.handle, self.expr_index, self.as_ast, count, settings) |
| 932 | assert lines is not None, "core.BNGetHighLevelILExprText returned None" |
| 933 | try: |
| 934 | for i in range(0, count.value): |
| 935 | addr = lines[i].addr |
| 936 | if lines[i].instrIndex != 0xffffffffffffffff: |
| 937 | il_instr = self.function[lines[i].instrIndex] |
| 938 | else: |
| 939 | il_instr = None |
| 940 | color = highlight.HighlightColor._from_core_struct(lines[i].highlight) |
| 941 | tokens = function.InstructionTextToken._from_core_struct(lines[i].tokens, lines[i].count) |
| 942 | yield function.DisassemblyTextLine(tokens, addr, il_instr, color) |
| 943 | finally: |
| 944 | core.BNFreeDisassemblyTextLines(lines, count.value) |
| 945 | |
| 946 | |
| 947 | @dataclass(frozen=True, repr=False, eq=False) |
no test coverage detected