Vector35 / Vector35/binaryninja-api
Aggressive use of inline function calls as parameters makes reading the code more difficult
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 298
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 19
Description
Version and Platform (required):
- Binary Ninja Version: 4.2.6455-dev, 2c8da1e
- OS: macos
- OS Version: 15.1
- CPU Architecture: arm64
I frequently encounter long lines in decompilation of C++ binaries due to the aggressive inlining of function calls as parameters to other functions. This practice not only makes the code harder to read aesthetically, but it also complicates comprehension, as it becomes difficult to determine what one function returns when it is passed as a parameter to another function.
I believe that, aside from a few edge cases, this practice should generally be avoided.
This is likely not a bug and may be related to issue #3289.
Here is another perfect example:
BN:
TFormatString(TFormatString::arg(TFormatString::arg(TFormatString::arg(TFormatString::TFormatString(&var_108, u"%1.%2%3"), sub_18056e670(arg3), 4, 0xa, 0x30), sub_18056e650(arg3), 2, 0xa, 0x30), sub_18056e5f8(arg3), 2, 0xa, 0x30))
IDA:
v11 = TFormatString::TFormatString((TFormatString *)v69, L"%1.%2%3");
v12 = sub_18056E670(a3);
v13 = TFormatString::arg(v11, v12, 4, 10, 0x30u);
v14 = sub_18056E650(a3);
v15 = TFormatString::arg(v13, v14, 2, 10, 0x30u);
v16 = sub_18056E5F8(a3);
v17 = TFormatString::arg(v15, v16, 2, 10, 0x30u);
TFormatString::operator TString(v17, v61);
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
No source files, tests, or entry points are identified. Start by reading issue #3289 and comparing the Binary Ninja and IDA decompilation examples to clarify the desired behavior. Done means the decompiler avoids unnecessary nested inline calls while preserving the intended output for edge cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- reverse-engineering
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100