Fix RISCV Python bindings
The structs had changed and the `need_effective_addr` element wasn't exposed.
This commit is contained in:
parent
89549ccffb
commit
11be359590
|
@ -726,7 +726,7 @@ class CsInsn(object):
|
||||||
elif arch == CS_ARCH_BPF:
|
elif arch == CS_ARCH_BPF:
|
||||||
(self.operands) = bpf.get_arch_info(self._raw.detail.contents.arch.bpf)
|
(self.operands) = bpf.get_arch_info(self._raw.detail.contents.arch.bpf)
|
||||||
elif arch == CS_ARCH_RISCV:
|
elif arch == CS_ARCH_RISCV:
|
||||||
(self.operands) = riscv.get_arch_info(self._raw.detail.contents.arch.riscv)
|
(self.need_effective_addr, self.operands) = riscv.get_arch_info(self._raw.detail.contents.arch.riscv)
|
||||||
elif arch == CS_ARCH_TRICORE:
|
elif arch == CS_ARCH_TRICORE:
|
||||||
(self.update_flags, self.operands) = tricore.get_arch_info(self._raw.detail.contents.arch.tricore)
|
(self.update_flags, self.operands) = tricore.get_arch_info(self._raw.detail.contents.arch.tricore)
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ from .riscv_const import *
|
||||||
# define the API
|
# define the API
|
||||||
class RISCVOpMem(ctypes.Structure):
|
class RISCVOpMem(ctypes.Structure):
|
||||||
_fields_ = (
|
_fields_ = (
|
||||||
('base', ctypes.c_uint8),
|
('base', ctypes.c_uint),
|
||||||
('disp', ctypes.c_int64),
|
('disp', ctypes.c_int64),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -45,5 +45,5 @@ class CsRISCV(ctypes.Structure):
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_arch_info(a):
|
def get_arch_info(a):
|
||||||
return (copy_ctypes_list(a.operands[:a.op_count]))
|
return (a.need_effective_addr, copy_ctypes_list(a.operands[:a.op_count]))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue