Skip to content

[codex] Use bounded Binary Ninja indexes for type xrefs - #85

Open
farvend wants to merge 5 commits into
fosdickio:mainfrom
farvend:codex/fix-bounded-type-xrefs
Open

farvend wants to merge 5 commits into
fosdickio:mainfrom
farvend:codex/fix-bounded-type-xrefs

Conversation

@farvend

@farvend farvend commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Use Binary Ninja's bounded indexes for field, enum, struct, union, and named-type xrefs.
  • Add max_results support with a maximum of 1000.
  • Preserve compatible result fields while returning typed code/data references.
  • Remove whole-program function, IL, symbol, type, and data-variable scans.

Why

The previous heuristics could perform large global scans and matched enum constants without requiring real type references.

Impact

Type xref requests are bounded, faster, and based on Binary Ninja's actual type indexes.

Validation

  • python -B -m unittest discover -s tests -p "test_*.py" (5 tests)
  • npm run build

@farvend
farvend marked this pull request as ready for review August 26, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant