Skip to content

[Rust] Add find_all_* searches and the missing single-function IL linear views - #8725

Closed
jrozner wants to merge 2 commits into
Vector35:devfrom
jrozner:rust-find-all-and-single-function-il
Closed

jrozner wants to merge 2 commits into
Vector35:devfrom
jrozner:rust-find-all-and-single-function-il

Conversation

@jrozner

@jrozner jrozner commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

BinaryView gains find_all_data, find_all_constant and find_all_text
(plus _with_opts variants taking a progress callback), wrapping
BNFindAll
WithProgress. Each reports every match through a callback
that returns false to stop, as the C++ and Python APIs do.

LinearViewObject gains single_function_llil, single_function_llil_ssa,
single_function_mapped_mlil and single_function_mapped_mlil_ssa, the
single-function views the C++ and Python APIs already expose.

…ear views

BinaryView gains find_all_data, find_all_constant and find_all_text
(plus *_with_opts variants taking a progress callback), wrapping
BNFindAll*WithProgress. Each reports every match through a callback
that returns false to stop, as the C++ and Python APIs do.

LinearViewObject gains single_function_llil, single_function_llil_ssa,
single_function_mapped_mlil and single_function_mapped_mlil_ssa, the
single-function views the C++ and Python APIs already expose.
Comment thread rust/src/binary_view.rs Resolved
Comment thread rust/src/binary_view.rs Resolved
Comment thread rust/src/binary_view.rs Resolved
The core hands ownership of each BNLinearDisassemblyLine to the
find_all_constant and find_all_text match callbacks, so free it after
copying, as the C++ API does. Previously every match leaked a line.

The find_all_constant and find_all_text convenience wrappers now use
the Python API's default disassembly settings, including WaitForIL so
IL-level searches see complete results.

Add a test covering find_all_text, find_all_data and find_all_constant.
@ElykDeer ElykDeer added the Ready for Review PR is ready for internal review/merging label Nov 20, 2026
@ElykDeer

Copy link
Copy Markdown
Member

Merged in 7246dc0 and ef96c08

@ElykDeer ElykDeer closed this Nov 20, 2026
@jrozner
jrozner deleted the rust-find-all-and-single-function-il branch November 21, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready for Review PR is ready for internal review/merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants