Vector35 / Vector35/binaryninja-api
Confusing behavior of get_type_by_name with NamedTypeReference
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 298
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 19
Description
Describe the bug
BinaryView.get_type_by_name sometimes return underlying type of NamedTypeReference instead of itself
To Reproduce
Steps to reproduce the behavior:
- test_case.zip
- Open any binary (eg. helloworld)
- Import types from test_case.h
- Execute test_case.py content in console
Expected behavior
BinaryView.get_type_by_name should return NamedTypeReference in all such cases
Screenshots

Additional context
Binary Ninja Version: 2.3.2787-dev Personal, 2e6e0ce9
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 supplied test_case.zip, test_case.h, and test_case.py reproduction, then trace BinaryView.get_type_by_name for imported NamedTypeReference types. Compare cases where it returns the reference with cases where it returns the underlying type; done means it consistently returns the NamedTypeReference as described in the expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- api, reverse-engineering
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100