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

Function test

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

Source from the content-addressed store, hash-verified

18
19
20def test():
21 try:
22 md = Cs(CS_ARCH_X86, CS_MODE_32)
23
24 print("Disassemble X86 code with default instruction mnemonic")
25 print_insn(md, X86_CODE32)
26
27 print("Now customize engine to change mnemonic from 'JNE' to 'JNZ'")
28 md.mnemonic_setup(X86_INS_JNE, "jnz")
29 print_insn(md, X86_CODE32)
30
31 print("Reset engine to use the default mnemonic")
32 md.mnemonic_setup(X86_INS_JNE, None)
33 print_insn(md, X86_CODE32)
34 except CsError as e:
35 print("ERROR: %s" % e)
36
37
38if __name__ == '__main__':

Callers 1

Calls 3

mnemonic_setupMethod · 0.95
CsClass · 0.85
print_insnFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…