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 524 forks source link

update the latest version of capstone #1272

Closed cctv130 closed 6 months ago

cctv130 commented 10 months ago

Hi friends, today I tried to build, using the latest dependencies, and found the error The enum for the arm architecture has been modified in the new capstone version, while the arm64 enum still exists 1692240414466

cctv130 commented 10 months ago

capstone next branch include arm.h: typedef enum CondCodes { // Meaning (integer) Meaning (floating-point) ARMCC_EQ, // Equal Equal ARMCC_NE, // Not equal Not equal, or unordered ARMCC_HS, // Carry set >, ==, or unordered ARMCC_LO, // Carry clear Less than ARMCC_MI, // Minus, negative Less than ARMCC_PL, // Plus, positive or zero >, ==, or unordered ARMCC_VS, // Overflow Unordered ARMCC_VC, // No overflow Not unordered ARMCC_HI, // Unsigned higher Greater than, or unordered ARMCC_LS, // Unsigned lower or same Less than or equal ARMCC_GE, // Greater than or equal Greater than or equal ARMCC_LT, // Less than Less than, or unordered ARMCC_GT, // Greater than Greater than ARMCC_LE, // Less than or equal <, ==, or unordered ARMCC_AL, // Always (unconditional) Always (unconditional) ARMCC_UNDEF = 15, // Undefined } ARMCC_CondCodes;

capstone v4 or v5 branch include arm.h: /// ARM condition code typedef enum arm_cc { ARM_CC_INVALID = 0, ARM_CC_EQ, ///< Equal Equal ARM_CC_NE, ///< Not equal Not equal, or unordered ARM_CC_HS, ///< Carry set >, ==, or unordered ARM_CC_LO, ///< Carry clear Less than ARM_CC_MI, ///< Minus, negative Less than ARM_CC_PL, ///< Plus, positive or zero >, ==, or unordered ARM_CC_VS, ///< Overflow Unordered ARM_CC_VC, ///< No overflow Not unordered ARM_CC_HI, ///< Unsigned higher Greater than, or unordered ARM_CC_LS, ///< Unsigned lower or same Less than or equal ARM_CC_GE, ///< Greater than or equal Greater than or equal ARM_CC_LT, ///< Less than Less than, or unordered ARM_CC_GT, ///< Greater than Greater than ARM_CC_LE, ///< Less than or equal <, ==, or unordered ARM_CC_AL ///< Always (unconditional) Always (unconditional) } arm_cc;

cnheitman commented 10 months ago

I think we can update this but once the new version is released.

JonathanSalwan commented 6 months ago

I've tested with the last version of capstone which has been released on August 2023 (5.0.1) and everything is working fine. As soon as a new release will be pushed, we will update our base code to support it :)

cctv130 commented 6 months ago

I've tested with the last version of capstone which has been released on August 2023 (5.0.1) and everything is working fine. As soon as a new release will be pushed, we will update our base code to support it :)

Thank you very much for your work. Now I have a question, what are the books about the knowledge of symbol execution and stain analysis? I hope you can recommend some.

JonathanSalwan commented 6 months ago

I've no book in mind but I recommend to read academic papers on Google Scholar. The very first paper talking about symbolic execution is Symbolic Execution and Program Testing from James C. King.