Skip to content

Function inlining makes HLIL and Disassembly sync hard to use #6763

Open
@WeiN76LQh

Description

@WeiN76LQh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions