JonathanSalwan / Triton

Triton is a dynamic binary analysis library. Build your own program analysis tools, automate your reverse engineering, perform software verification or just emulate code.
https://triton-library.github.io
Apache License 2.0
3.4k stars 525 forks source link

Add capstone ARM64_INS_SUBS to capstoneInstructionToTritonInstruction #1157

Closed Antwy closed 2 years ago

Antwy commented 2 years ago

In capstone ARM64_INS_SUBS key (809) differs from ARM64_INS_SUB (805), so capstoneInstructionToTritonInstruction sets invalid instruction type for subs instructions

upd: found the same for adds

SweetVishnya commented 2 years ago

@JonathanSalwan, could you run CI, please?

JonathanSalwan commented 2 years ago

Is it something that can differ from capstone v4 and v5?

JonathanSalwan commented 2 years ago

Is it something that can differ from capstone v4 and v5?

According to CI, I've my answer. Maybe you should add ifdef to add the enum only on capstone v5. For example: https://github.com/JonathanSalwan/Triton/blob/master/src/libtriton/arch/x86/x86Specifications.cpp#L158-L162

JonathanSalwan commented 2 years ago

I've updated the Linux CI to test capstone v4 and v5 otherwise with such #if ... #endif we can't test the new code. Once CIs are finished to process I will merge your MR, then the new CI will test your code once merged.

JonathanSalwan commented 2 years ago

I've pushed on dev-v1.0 fixes to support Capstone v4 and v5 as well as updated CIs to test both versions.

Antwy commented 2 years ago

Thanks :)