Skip to content

Finish HLIL rewriting support #7499

@comex

Description

@comex

What is the feature you'd like to have?
As mentioned at https://docs.binary.ninja/dev/bnil-modifying.html, support for modifying HLIL in workflows is incomplete.

Looking at the C API, these functions that exist for both LLIL and MLIL seem to lack HLIL equivalents:

  • BNPrepareToCopyLowLevelILFunction
  • BNPrepareToCopyLowLevelILBasicBlock
  • BNLowLevelILAddInstruction

Therefore it seems impossible to copy HLIL functions in order to add new expressions/instructions. I've only been able to patch existing HLIL expressions.

Also, I don't see any way to establish MLIL-HLIL mappings. The documentation mentions this as a limitation, although it also claims that LLIL-MLIL doesn't work and I think that might be out of date? Or at least, the MLIL manipulation APIs allow passing LLIL-MLIL mapping info…

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: APIIssue needs changes to the APIComponent: CoreIssue needs changes to the coreComponent: Python APIIssue needs changes to the python APIComponent: Rust APIIssue needs changes to the Rust APICore: HLILIssue involves High Level ILEffort: HighIssues require > 1 month of workImpact: HighIssue adds or blocks important functionality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions