summaryrefslogtreecommitdiff
path: root/rust/src/function.rs
AgeCommit message (Collapse)Author
2026-06-02Add support for multiple global pointer registersBrandon Miller
2026-05-26[Rust] Fix misc clippy lintsMason Reed
2026-05-26[Rust] Misc formattingMason Reed
2026-05-22Refactor calling convention Rust API to allow default implementationsRusty Wagner
Also implements the new calling convention APIs in Rust
2026-05-22Refactor calling conventions to support correct representation of structuresRusty Wagner
2026-05-20Sort switch blocks in graph view by case numberGlenn Smith
2026-05-10[Rust] Refactor `binary_view` moduleMason Reed
- Remove the "viral" `BinaryViewExt` trait and its blanket impl - Split up the binary view type from the custom trait impl - Simplify and fix bugs regarding custom binary view initialization - Rewrite Minidump binary view example, parses the PE headers to create proper sections now - Add some extra documentation - Add unit test for custom binary view
2026-01-14Allow controlling which address is used for instructions created when ↵Mark Rowe
inlining during analysis Previously the address of the instruction in the function being inlined was used as the new instruction's address when copying it during inlining. Now there is an additional option: use the address of the call instruction that is being replaced as the new instruction's address. This new mode is useful when inlining thunks or stub functions, but care must be taken if using it beyond that. The benefit is that it ensures that when a function contains multiple calls to the same stub function, each inlined copy ends up with distinct addresses. This ensures that call type adjustments and other overrides that are stored on the function and keyed by address can be applied independently to each callsite that was inlined. The trade-off is that if the function being inlined contains non-trivial logic, all of the inlined instructions sharing an address will limit what type of adjustments can be applied to them. The Objective-C and shared cache workflows are updated to take advantage of this new mode when they enable inlining of stub functions. This will make it possible for multiple calls to the same runtime function within a single function to have separate call type adjustments applied in the future.
2026-01-01update copyrights for 2026Jordan Wiens
2025-12-15[Rust] Add `Function::defined_symbol` to use when getting the default ↵Mason Reed
function symbol is not warranted
2025-12-10[Rust] Move architecture module code into more reasonable filesMason Reed
To keep backwards compatibility for commonly referenced code we re-export them within the architecture module. Also does some light refactoring of some newly added APIs to keep them more consistent with other parts of the codebase.
2025-12-10[Rust] Remove redundant `ArchAndAddr` typeMason Reed
Use `Location` instead, `arch` can be a nullptr
2025-12-10[Rust] Fix leaking list in `Function::guided_source_blocks`Mason Reed
Forgot to call `BNFreeArchitectureAndAddressList`, also use `Location` instead of `ArchAndAddr`.
2025-11-23[Rust] Clarify and expand on the current set of queryable offset propertiesMason Reed
Now that we have more duplicate API's we need to clarify and cross link between them to help alleviate the confusion for readers.
2025-11-03Add helpers for whether a function is exported.Alexander Taylor
2025-09-29Rust APIs needed for guided analysis modeBrandon Miller
Required for implementing guided analysis mode in custom implementations of analyze_basic_blocks
2025-09-29Rust bindings for custom basic block analysisBrandon Miller
2025-09-17Fix a Rust formatting issueMark Rowe
2025-09-15Deprecate some Rust MediumLevelILFunction methods in favor of Function ↵Josh Ferrell
implementations
2025-07-03[Rust] Fix clippy + rustfmt complaintsMark Rowe
The clippy complaint was a real issue: the doc comment intended for the commented-out `unresolved_indirect_branches` was being interpreted as the start of the doc comment for the following function.
2025-07-03api: indirect branch inlining supportRyan Snyder
2025-07-02[Rust] Misc cleanupMason Reed
2025-07-02[Rust] Add note for `Function::has_explicitly_defined_type`Mason Reed
2025-07-02[Rust] Remove duplicate `(&str, Variable, &Type)` named variable type implMason Reed
2025-07-02[Rust] Make some core handles publicMason Reed
This is a requirement if we want rust plugins to expose sane FFIs
2025-06-13[Rust] Misc API additions/docs and formatting fixesMason Reed
2025-06-11API to create immediate function graphsGlenn Smith
2025-06-11Expose Function::CheckForDebugReportGlenn Smith
2025-05-19Implement function level metadataBrandon Miller
2025-05-12[Rust] Misc cleanup regarding c stringsMason Reed
2025-05-12[Rust] Remove useless alias functionMason Reed
2025-05-12[Rust] Remove `NonSSAVariant` bound from `LowLevelILFunction`Mason Reed
We don't do enough with the lifted il != non lifted il to justify the bound. This makes modifying IL much less work as the historical lifted il bound is gone.
2025-05-12[Rust] Misc cleanupMason Reed
2025-05-12[Rust] Implement custom interactive handlerrbran
2025-05-12[Rust] Implement `LanguageRepresentation` and `LineFormatter`rbran
2025-05-12[Rust] Reduce usage of `IntoCStr` in function signaturesMason Reed
This is being done to reduce complexity in function signatures, specifically many of the strings we are passing ultimately should be new types themselves instead of "just strings", things such as type ids. Another place which was confusing was dealing with filesystem related APIs, this commit turns most of those params into a stricter `Path` type. This is bringing the rust api more inline with both python and C++, where the wrapper eagerly converts the string into the languages standard string type. Special consideration must be made for symbols or other possible non utf-8 objects. This commit will be followed up with one that adds the `IntoCStr` bound on API's we want to keep as invalid utf-8 so we can for example, get section by name on a section with invalid utf-8.
2025-05-12[Rust] Rename `AsCStr` to `IntoCStr`Mason Reed
2025-05-12[Rust] Simplify usage surrounding c stringsMason Reed
`cstring.as_ref().as_ptr() as *const c_char` -> `cstring.as_ptr()` `cstring.as_ref().as_ptr() as *mut _` -> `cstring.as_ptr()` `cstring.as_ptr() as *const c_char` -> `cstring.as_ptr()` With a few fixes for cstrings that might be dropped prematurely.
2025-05-12[Rust] Simplify `BnStrCompatible` traitMason Reed
Followup to https://github.com/Vector35/binaryninja-api/pull/5897/ This simplifies usage of the trait in user code, should just be able to `to_cstr` to get the cstr repr and then call `as_ptr`. Co-authored-by: Michael Krasnitski <michael.krasnitski@gmail.com>
2025-05-12[Rust] Misc clippy lintsMason Reed
2025-05-12[Rust] More cleanupMason Reed
2025-05-12[Rust] Return `String` instead of `BnString` for cases where lossy ↵Mason Reed
conversion can be tolerated Still need to go and audit all usage, but realistically the most important places to give the user control are with symbols, where the data can come from non utf8 sources This is still incomplete, I just looked for usage of -> BnString so any other variant was omitted.
2025-05-12[Rust] Remove Architecture trait bound on LLIL related structuresMason Reed
2025-05-07[Rust] Add Function::variable_typeMark Rowe
2025-04-23Add Function::Analyze API to perform on-demand function analysis.Brian Potchik
2025-03-28belated copyright year updateJordan Wiens
2025-02-24Add `BinaryViewExt::comment_at` and `BinaryViewExt::set_comment_at`Mason Reed
How did we not have this before?
2025-02-06Add After variants for looking up variables at instructionsGlenn Smith
Fixes #6397
2025-01-31Fix misc clippy lintsMason Reed
2025-01-30Render LayersGlenn Smith