Skip to content
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

Basic Blocks #1143

Open
fred26 opened this issue May 27, 2018 · 5 comments
Open

Basic Blocks #1143

fred26 opened this issue May 27, 2018 · 5 comments

Comments

@fred26
Copy link

fred26 commented May 27, 2018

Trying to create basic blocks in x86 x64 mode.

Using modified version of:

https://github.com/aquynh/capstone/blob/master/tests/test_x86.c

Is there away to ask cs_disasm to stop disassembling when an instruction belongs to a jump group (CALL/JNZ/CMOVNE)?

Thanks

@fred26 fred26 changed the title Not retrieving Group Names Basic Blocks May 27, 2018
@aquynh
Copy link
Collaborator

aquynh commented May 28, 2018

no.

@pfalcon
Copy link

pfalcon commented May 28, 2018

Of course there's a way - you disassemble instructions one by one, check groups, and stop when groups match what you want. The issue, Capstone's group support across architectures leaves much to be desired, e.g. #1072

@r4dr3fr4d
Copy link

@fred26, were you able to implement a solution for this? If not, I may have some code that can help; I've had to do the same thing.

@niucool
Copy link

niucool commented Oct 21, 2023

@r4dr3fr4d can you show some code to get basic blocks with the help of capstone?

@r4dr3fr4d
Copy link

@niucool I no longer have it handy, but it's going to entail looking for the branching instructions manually. This feature is out of scope for capstone, I imagine. Recommend this issue be closed @aquynh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants