MCPcopy Create free account
hub / github.com/qilingframework/qiling / disasm

Method disasm

qiling/debugger/qdb/context.py:56–69  ·  view source on GitHub ↗

Helper function for disassembling.

(self, address: int, detail: bool = False)

Source from the content-addressed store, hash-verified

54 self.ql.arch.regs.write(reg, value)
55
56 def disasm(self, address: int, detail: bool = False) -> InsnLike:
57 """Helper function for disassembling.
58 """
59
60 insn_bytes = self.read_insn(address) or b''
61 insn = None
62
63 if insn_bytes:
64 md = self.ql.arch.disassembler
65 md.detail = detail
66
67 insn = next(md.disasm(insn_bytes, address, 1), None)
68
69 return insn or InvalidInsn(insn_bytes, address)
70
71 def disasm_lite(self, address: int) -> Tuple[int, int, str, str]:
72 """Helper function for light disassembling, when details are not required.

Callers 15

handle_iMethod · 0.80
predictMethod · 0.80
predictMethod · 0.80
predictMethod · 0.80
is_branchMethod · 0.80
is_fcallMethod · 0.80
context_asmMethod · 0.80
context_asmMethod · 0.80
__disasm_allMethod · 0.80
emit_disasmMethod · 0.80
__get_trace_recordsFunction · 0.80
__hook_blockMethod · 0.80

Calls 2

InvalidInsnClass · 0.85
read_insnMethod · 0.45

Tested by

no test coverage detected