我正在尝试使用regs_read
and regs_write
,但它不起作用:
$ cat cs.py
import capstone
Cs = capstone.Cs(capstone.CS_ARCH_X86, capstone.CS_MODE_64)
Cs.detail = True
CODE = b"\x48\x89\x44\x24\x10"
for i in Cs.disasm(CODE,0):
print(i)
print(i.regs_read)
print(i.regs_write)
这就是我得到的
$ python3.7 cs.py
<CsInsn 0x0 [4889442410]: mov qword ptr [rsp + 0x10], rax>
[] <----- why? rax is read
[]