Vector35 / Vector35/binaryninja-api

Avoid `TEST_BITQ`/`test_bit` intrinsic for flag enums

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

Nobody has claimed this yet.

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

Description

BN has recently gotten much better at handling flag enums, but there is one remaining case that bugs me a bit:

image

The TEST_BITQ intrinsics here are not very helpful as I rarely remember what flag each bit corresponds to, so I have to look that up manually. I wonder if BN could handle this case better?

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 reproducing the flag-enum decompilation shown in the issue and trace how Binary Ninja handles TEST_BITQ/test_bit intrinsics for those enums. Done means the decompiler presents the corresponding flag names in a more useful form, without requiring manual lookup of each bit.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.