You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I am using capstone to disassemble arm based binaries.
I noticed that I can use CS_GRP_JUMP to check whether a instruction is a jump instruction. Where I can get all the instructions name that belong to this group. I am sorry I didn't find the related code. Besides, does CS_GRP_JUMP consider the case like ldr pc, [addr]
Furthermore, is there an API to check whether a jump instruction is direct jump or indirect jump. If it is a direct jump. Is there an API to get the jump target. Many Thanks.
The text was updated successfully, but these errors were encountered:
Where I can get all the instructions name that belong to this group.
you need to look into the mapping files. Here for master and here for next. Not all mappings are explicitly stated there though.
does CS_GRP_JUMP consider the case like ldr pc, [addr]
No. the mappings identify instructions that are definitely jumps based on the instruction id rather than the affected operands . That is, ARM_INS_B is always a jump instruction regardless of its operands. In contrast, ldrmight be a jump depending on its operands. Therefore, you need to examine the operands to see if pc is modified.
is there an API to check whether a jump instruction is direct jump or indirect jump
You need to check the operands also here. If the instruction is branching based on an immediate, then it is a direct branch. Otherwise, it is an indirect branch.
Hi. I am using capstone to disassemble arm based binaries.
I noticed that I can use CS_GRP_JUMP to check whether a instruction is a jump instruction. Where I can get all the instructions name that belong to this group. I am sorry I didn't find the related code. Besides, does CS_GRP_JUMP consider the case like
ldr pc, [addr]
Furthermore, is there an API to check whether a jump instruction is direct jump or indirect jump. If it is a direct jump. Is there an API to get the jump target. Many Thanks.
The text was updated successfully, but these errors were encountered: