Closed flipnut closed 2 weeks ago
Has there been any progress on this issue?
Sorry for the late reply. The Rust types are "bespoke" and written by hand. :sweat_smile:
If you are interested in contributing the feature, take a look at RegAccessType
and the use for X86:
RegAccessType
in capstone-rs/src/instruction.rs
:
https://github.com/capstone-rust/capstone-rs/blob/cb4cc5e7e3e3b0d1e88265a650a920392b8d5ab5/capstone-rs/src/instruction.rs#L42impl TryFrom<cs_ac_type> for RegAccessType
: https://github.com/capstone-rust/capstone-rs/blob/cb4cc5e7e3e3b0d1e88265a650a920392b8d5ab5/capstone-rs/src/instruction.rs#L71RegAccessType
https://github.com/capstone-rust/capstone-rs/blob/cb4cc5e7e3e3b0d1e88265a650a920392b8d5ab5/capstone-rs/src/arch/x86.rs#L52You will also need to update the tests in capstone-rs/src/test.rs
.
Let me know if you have any questions.
Capstone's C types
cs_arm_op
andcs_x86_op
etc. have a memberuint8_t access
, that provides info about the operand being read or written to by the instruction. In the rust world, the related structX86Operand
has the memberpub access: Option<RegAccessType>,
. Howevery, forArmOperand
the member is missing.Unfortunately, I am not familiar with the semi-automated translation process of c types to rust types in capstone-rust. With some guidance I am happy to help where I can to get this fixed.