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:
|
||||
(self.operands) = bpf.get_arch_info(self._raw.detail.contents.arch.bpf)
|
||||
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:
|
||||
(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
|
||||
class RISCVOpMem(ctypes.Structure):
|
||||
_fields_ = (
|
||||
('base', ctypes.c_uint8),
|
||||
('base', ctypes.c_uint),
|
||||
('disp', ctypes.c_int64),
|
||||
)
|
||||
|
||||
|
@ -39,11 +39,11 @@ class RISCVOp(ctypes.Structure):
|
|||
|
||||
class CsRISCV(ctypes.Structure):
|
||||
_fields_ = (
|
||||
('need_effective_addr', ctypes.c_bool),
|
||||
('need_effective_addr', ctypes.c_bool),
|
||||
('op_count', ctypes.c_uint8),
|
||||
('operands', RISCVOp * 8),
|
||||
)
|
||||
|
||||
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