Vector35 / Vector35/binaryninja-api
No obvious way to retrieve on IL instruction given an IL basic block from the C++ API
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 298
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 19
Description
There is no obvious way to retrieve on IL instruction given an IL basic block from the C++ API. It is easy in Python, that we can either directly index the IL basic block or iterate over it.
By looking at the Python source code, I noticed that a viable is to first retrieve the IL function and then index into it. https://github.com/Vector35/binaryninja-api/blob/2f415e3da3a417160c07928cc8b91f42eddbac3f/python/lowlevelil.py#L5289C1-L5290. It would be better if there is an API to do it directly.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Python implementation in lowlevelil.py around the linked lines, then inspect the corresponding C++ IL basic-block and function API. Determine how direct instruction lookup should be exposed consistently with existing indexing or iteration, and verify that callers can retrieve an instruction from a basic block through the C++ API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- api, reverse-engineering
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100