-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Python bindings after changes to cs_detail #2041
Conversation
capstone-engine#2034 changed the `regs_read` array size and added a new `writeback` element to the cs_detail struct. Those changes weren't reflected in the Python bindings causing details to be missing.
The structs were out of sync and were missing a few elements. The `update_flags` element wasn't exposed at all.
The structs had changed and the `need_effective_addr` element wasn't exposed.
@imbillow take a look at Tricore changes please |
@peace-maker could you please take a look at #2005 too? Since you are working on Python bindings anyway. |
LGTM |
Thanks a lot! Merged. |
@kabeor I think the same changes to the |
@peace-maker right, problem is because they aren't tested on CI: #1984 (comment) |
Are the changes to the cs_detail struct 100% required for the TriCore architecture @imbillow ? I don't see the |
@peace-maker it was added for compatibility with ARM, AFAIR. It's used in Rizin's RzIL uplifting code, for example: https://github.com/rizinorg/rizin/blob/dev/librz/analysis/arch/arm/arm_il64.c#L1025 |
Those are just changes pulled from the auto-sync branch, and since the auto-sync branch hasn't been merged yet, it may indeed seem redundant for the current version of capstone. |
Ah, that accesses the field in the |
@Rot127 what do you think about that? Is it necessary path in current auto-sync state? |
If it isn't used in TriCore we can remove it for the But for auto-sync it is definitely useful, because:
|
#2034 changed the
regs_read
array size and added a newwriteback
element to the
cs_detail
struct.Those changes weren't reflected in the Python bindings causing details to be missing.
I've included fixes for the RISCV and TriCore bindings as well, since they were related or popped up during testing of this change. I originally looked into the problems while testing the changes to the RISCV instruction groups #2007 in Python.