Function inlining makes HLIL and Disassembly sync hard to use
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- reverse-engineering
Research direction
Start by reproducing the synced HLIL and disassembly views described in issue #6763, especially with DYLD Shared Cache stub functions and inlining. Review related issues #6601 and #6737, then determine and document an expected synchronization behavior; the issue names no source files or tests, so completion requires an agreed design before implementation.
Written by the indexing model from the issue text.
Description
Version and Platform (required):
- Binary Ninja Version: 5.1.7320-dev (aa12054b)
- OS: macOS
- OS Version: 15.2
- CPU Architecture: M1
Bug Description:
I commonly have HLIL and disassembly linear view panes side by side and synced. Due to function inlining the disassembly view can end up being in a different function than the HLIL view. DYLD Shared Cache has lots of stub functions, which get inlined by the DSC plugin function workflow, so its very common in DSC binary views for there to be function inlining.
Due to the stub functions just being calls to other functions, this makes function calls in the HLIL almost always an inlined function. It can be the case that many lines in a row in the HLIL can just be inlined functions where a given function is making many function calls using function stubs. Therefore if you want to figure out what arguments are being passed to the function by looking at the disassembly, there's essentially nowhere you can click in the HLIL nearby to the call to see the disassembly for that call.
Binary Ninja has its issues so sometimes the disassembly is required for the source of truth. When I can't find a non-inlined location nearby in the HLIL, I end up having to go much further away from the call site to get the disassembly view to sync with the HLIL in the same function and then manually path my way through the disassembly to find the call. Which is not always a trivial process. Its not a show stopper but it does make life harder than it needs to be.
Expected Behavior:
To be honest I don't actually know. I created this issue to bring to light the problem but I don't have a solution to it at this moment in time. It makes sense what is happening but as a user it can be frustrating because its not what I want.
Maybe there could be some kind of setting, on a per-function basis, or just a global setting, to sync the disassembly view location with the location where the inlined function was inlined. So if in HLIL a call is highlighted that occurs in an inlined function, the disassembly view will be at the call instruction to the inlined function, not the function the inlined function calls.
Additional Information:
This is somewhat of a broader issue with function inlining. Its not the only problem as I also created issue #6601 and there is also #6737. I know these aren't quite related issues but it seems as great as function inlining is, its also causing a number of issues.
- 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
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gazebosim/gz-sensors#662 · 1 comment ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LadybirdBrowser/ladybird#12123 ·