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

Function test_class

bindings/python/tests/test_evm.py:20–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18
19
20def test_class():
21 address = 0x80001000
22 for (arch, mode, code, comment) in all_tests:
23 print("Platform: %s" % comment)
24 print("Code: %s " % code.hex(' '))
25 print("Disasm:")
26
27 try:
28 md = Cs(arch, mode)
29 md.detail = True
30 for i in md.disasm(code, address):
31 print("0x%x:\t%s\t%s" %(i.address, i.mnemonic, i.op_str))
32 if i.pop > 0:
33 print("\tPop: %u" %i.pop)
34 if i.push > 0:
35 print("\tPush: %u" %i.push)
36 if i.fee > 0:
37 print("\tGas fee: %u" %i.fee)
38 if len(i.groups) > 0:
39 print("\tGroups: ", end=''),
40 for m in i.groups:
41 print("%s " % i.group_name(m), end=''),
42 print()
43
44 except CsError as e:
45 print("ERROR: %s" % e.__str__())
46
47
48if __name__ == '__main__':

Callers 1

test_evm.pyFile · 0.70

Calls 5

disasmMethod · 0.95
CsClass · 0.85
__str__Method · 0.80
hexMethod · 0.45
group_nameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…