MCPcopy Create free account
hub / github.com/capstone-engine/capstone / test_class

Function test_class

bindings/python/tests/test_m68k.py:92–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90
91# ## Test class Cs
92def test_class():
93 address = 0x01000
94 for (arch, mode, code, comment) in all_tests:
95 print("*" * 16)
96 print("Platform: %s" % comment)
97 print("Code: %s " % code.hex(' '))
98 print("Disasm:")
99
100 try:
101 md = Cs(arch, mode)
102 md.detail = True
103 last_address = 0
104 for insn in md.disasm(code, address):
105 last_address = insn.address + insn.size
106 print("0x%x:\t%s\t%s" % (insn.address, insn.mnemonic, insn.op_str))
107 print_insn_detail(insn)
108 print("0x%x:\n" % (last_address))
109
110 except CsError as e:
111 print("ERROR: %s" % e.__str__())
112
113if __name__ == '__main__':
114 test_class()

Callers 1

test_m68k.pyFile · 0.70

Calls 5

disasmMethod · 0.95
CsClass · 0.85
__str__Method · 0.80
print_insn_detailFunction · 0.70
hexMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…