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

Function debug

bindings/python/capstone/__init__.py:1224–1260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1222
1223# print out debugging info
1224def debug():
1225 # is Cython there?
1226 try:
1227 from . import ccapstone
1228 return ccapstone.debug()
1229 except:
1230 # no Cython, fallback to Python code below
1231 pass
1232
1233 if cs_support(CS_SUPPORT_DIET):
1234 diet = "diet"
1235 else:
1236 diet = "standard"
1237
1238 archs = {
1239 "arm": CS_ARCH_ARM, "arm64": CS_ARCH_ARM64, "m68k": CS_ARCH_M68K,
1240 "mips": CS_ARCH_MIPS, "ppc": CS_ARCH_PPC, "sparc": CS_ARCH_SPARC,
1241 "sysz": CS_ARCH_SYSZ, 'xcore': CS_ARCH_XCORE, "tms320c64x": CS_ARCH_TMS320C64X,
1242 "m680x": CS_ARCH_M680X, 'evm': CS_ARCH_EVM, 'mos65xx': CS_ARCH_MOS65XX,
1243 'bpf': CS_ARCH_BPF, 'riscv': CS_ARCH_RISCV, 'tricore': CS_ARCH_TRICORE,
1244 'wasm': CS_ARCH_WASM, 'sh': CS_ARCH_SH,
1245 }
1246
1247 all_archs = ""
1248 keys = archs.keys()
1249 for k in sorted(keys):
1250 if cs_support(archs[k]):
1251 all_archs += "-%s" % k
1252
1253 if cs_support(CS_ARCH_X86):
1254 all_archs += "-x86"
1255 if cs_support(CS_SUPPORT_X86_REDUCE):
1256 all_archs += "_reduce"
1257
1258 (major, minor, _combined) = cs_version()
1259
1260 return "python-%s%s-c%u.%u-b%u.%u" % (diet, all_archs, major, minor, CS_API_MAJOR, CS_API_MINOR)

Callers

nothing calls this directly

Calls 3

debugMethod · 0.80
cs_supportFunction · 0.70
cs_versionFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…