Vector35 / Vector35/binaryninja-api

Low discoverability of both get_mlil_var_refs and get_hlil_var_refs

Open
#3,318 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Effort: Trivial Impact: Low
Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Description

The two methods to get xrefs to variables are hard to figure out by the user. One user reached out to ask how he can get all xrefs to a variable. He said he browsed the API docs for a while and cannot find a clue. I -- the author of this code -- cannot remember the name and had to eventually read our code to figure out the name of the two functions. It is kinda problematic to be that hard to find out.

We should consider making a get_var_refs that is better to discover. It should check whether the incoming function is a HLIL function or not, and decide to use the underlying get_mlil_var_refs or get_hlil_var_refs accordingly.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating get_mlil_var_refs and get_hlil_var_refs in the Binary Ninja API and inspect how their function arguments distinguish MLIL from HLIL. Add the discoverable get_var_refs entry point with the stated dispatch behavior, then verify that both existing paths remain reachable and documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, reverse-engineering
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.