Vector35 / Vector35/binaryninja-api

Option for hiding `enum`, `struct` and `union` keywords in decompilation

Open
#3,963 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Suppose I've this structure in a bndb:

struct std_string __packed
{
    char s[0x10];
    int32_t size;
    int32_t max_size;
};

When I use this structure, I see it like this in decompiler:

struct std_string test

or like this in function prototypes:

void __stdcall set_str(struct std_string* dst, struct std_string* src)

Most of the time I find that struct keyword unnecessary. Of course this is some kind of personal preference, but it also have some advantages I guess. Is it possible to add an option for hiding that kind of keywords? I think hiding enum, uniıon and struct would be enough.

Currently I can get rid of it by creating a new typedef for that structure, but it takes time.

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

No file, test, or entry point is named in the issue. Start with the decompiler output examples and determine where formatting options for enum, struct, and union keywords are handled; done means those keywords can be hidden in declarations and function prototypes while the existing structure remains usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
reverse-engineering
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.