Vector35 / Vector35/binaryninja-api

Allow an array size to use an enum or other symbolic value

Open
#7,179 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

What is the feature you'd like to have?
I'd like to be able to annotate an array declaration with a symbolic constant. For example:

MyStruct array[0x8]
to
MyStruct array[MAX_STRUCTS]

Is your feature request related to a problem?
n/a

Are any alternative solutions acceptable?
Not that I'm aware of.

Additional Information:
I tried creating an enum called MAXIMA to define labels for such values, but even when the array size (e.g. 0x8 above) is highlighted, pressing M assign an enum (a) doesn't show any matches for 0x8 and (b) changes the type of array itself to an enum.

enums may or may not be the best/easiest way to accomplish this, they were just the first thing I tried.

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

Reproduce the array declaration and enum-assignment behavior described in the issue, comparing a literal size such as 0x8 with a symbolic value such as MAX_STRUCTS. Investigate the array-size annotation and the M-based enum assignment entry points; done means array declarations accept symbolic constants without changing the array type.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.