Vector35 / Vector35/binaryninja-api

Display tokens from an enum even when the enum does not represent a bitfield

Open
#8,209 1 comment 0 reactions 1 assignee View on GitHub

@plafosse is already working on this.

Since Jul 28, 2026.

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

Description

Version and Platform (required):

  • Binary Ninja Version: 5.4.9700-dev Ultimate, be5fbbd5
  • OS: macos
  • OS Version: 26.5.0
  • CPU Architecture: arm64

What is the feature you'd like to have?
Try to display tokens from an enum even when the enum does not represent a bitfield.

Is your feature request related to a problem?
I would like have the library enum displayed correctly and hopefully automatically for the TOKEN_ACCESS_MASK enum used in the source code here:
Image

It looks like this by default:
Image

Here is the type for that parameter:
Image

Here is that type in its default form as shipped with Binary Ninja:

Image

Are any alternative solutions acceptable?
If I change that type so that any conflicting entries are removed, the tokens appear correctly with no other changes needed. But this leaves that type as non-standard.

enum TOKEN_ACCESS_MASK : uint32_t
{
    TOKEN_ASSIGN_PRIMARY         = 0x1,
    TOKEN_DUPLICATE              = 0x2,
    TOKEN_IMPERSONATE            = 0x4,
    TOKEN_QUERY                  = 0x8,
    TOKEN_QUERY_SOURCE           = 0x10,
    TOKEN_ADJUST_PRIVILEGES      = 0x20,
    TOKEN_ADJUST_GROUPS          = 0x40,
    TOKEN_ADJUST_DEFAULT         = 0x80,
    TOKEN_ADJUST_SESSIONID       = 0x100,
    TOKEN_DELETE                 = 0x10000,
    TOKEN_READ_CONTROL           = 0x20000,
    TOKEN_WRITE_DAC              = 0x40000,
    TOKEN_WRITE_OWNER            = 0x80000,
    TOKEN_ACCESS_SYSTEM_SECURITY = 0x1000000
};
Image

Additional Information:

Database: insight rock builds magnificently

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.