set_int_display_type doesn't work with tokens as expected
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- reverse-engineering
Research direction
Start with the set_int_display_type API and InstructionTextToken operand property, using the linked true.txt reproduction and the provided Python snippet. Compare token.operand with the operand accepted by set_int_display_type; done means the integer display type is set correctly when the token's operand is passed, matching the expected behavior.
Written by the indexing model from the issue text.
Description
Binary Ninja Version
2.4.3074-dev
Describe the bug
set_int_display_type's operand argument doesn't match with InstructionTextToken's operand property
To Reproduce
Steps to reproduce the behavior:
- Open true.txt
- Run
token = current_function.basic_blocks[0][5][0][-1]
print(f"{token=} {token.type=} {token.operand=}")
current_function.set_int_display_type(0x215d, token.value, token.operand, IntegerDisplayType.UnsignedOctalDisplayType)
Expected behavior
The integer display type should be set properly
Screenshots
This doesn't work:

This works though:

Version and Platform (required):
- Binary Ninja: 2.4.3074-dev
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 298
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 19
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.
More from Vector35/binaryninja-api
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Vector35/binaryninja-api#8540 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Vector35/binaryninja-api#8516 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Vector35/binaryninja-api#8503 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Vector35/binaryninja-api#8446 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Vector35/binaryninja-api#8444 ·
All issues in Vector35/binaryninja-api
Similar issues
-
Website Doc Typo Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
autowarefoundation/autoware_universe#13413 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
automated-analysis bug memory-safety
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100