Skip to content

feat: add navigation-parity extensions for Function/BasicBlock/BinaryView#16

Merged
tinysec merged 1 commit into
masterfrom
feat/navigation-parity-extensions
Jul 7, 2026
Merged

feat: add navigation-parity extensions for Function/BasicBlock/BinaryView#16
tinysec merged 1 commit into
masterfrom
feat/navigation-parity-extensions

Conversation

@tinysec

@tinysec tinysec commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Mirrors the object-navigation surface of the official Python binding on the durable hand-written layer, closing the most-used ergonomics gaps the generated binding leaves open (GetFunctionByAddress requires an explicit platform; no __contains__/__getitem__/get_ascii_string_at analogs).

  • Function (function.py): __contains__(int) by block span, __contains__(BasicBlock) by owning-function identity, instructions generator over basic blocks.
  • BasicBlock (basicblock.py): __contains__ half-open [Start,End), __getitem__ returns null on miss instead of raising.
  • BinaryView (binaryview.py): get_function_at (platform match + first-at-address fallback), __contains__ via segment lookup, get_ascii_string_at (raw-byte scan, minLength-gated), and view-level instructions/llil_instructions/mlil_instructions/hlil_instructions lazy generators.

All generators are lazy (yield); comments cite the Python source line each member mirrors.

Verification: 1:1 parity E2E tests in the external harness (9 BinaryView + 5 Function + 4 BasicBlock cases) — 18 green.

…View

Mirrors the object-navigation surface of the official Python binding on the
durable hand-written layer, closing the most-used ergonomics gaps the generated
binding leaves open (GetFunctionByAddress requires an explicit platform; the
generated layer exposes no __contains__/__getitem__/get_ascii_string_at analogs).

Function (function.py): __contains__(int) by block span, __contains__(BasicBlock)
  by owning-function identity, instructions generator over basic blocks.
BasicBlock (basicblock.py): __contains__ half-open [Start,End), __getitem__ returns
  null on miss instead of raising.
BinaryView (binaryview.py): get_function_at (platform match + first-at-address
  fallback), __contains__ via segment lookup, get_ascii_string_at (raw-byte scan,
  minLength-gated), and view-level instructions/llil_instructions/mlil_instructions/
  hlil_instructions lazy generators.

All generators are lazy (yield); English comments cite the Python source line each
member mirrors.
@tinysec tinysec merged commit 2b03aa2 into master Jul 7, 2026
1 check passed
@tinysec tinysec deleted the feat/navigation-parity-extensions branch July 7, 2026 09:58
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