| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Also implements the new calling convention APIs in Rust
|
|
|
|
|
|
- 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
|
|
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.
|
|
|
|
function symbol is not warranted
|
|
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.
|
|
Use `Location` instead, `arch` can be a nullptr
|
|
Forgot to call `BNFreeArchitectureAndAddressList`, also use `Location` instead of `ArchAndAddr`.
|
|
Now that we have more duplicate API's we need to clarify and cross link between them to help alleviate the confusion for readers.
|
|
|
|
Required for implementing guided analysis mode in custom
implementations of analyze_basic_blocks
|
|
|
|
|
|
implementations
|
|
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.
|
|
|
|
|
|
|
|
|
|
This is a requirement if we want rust plugins to expose sane FFIs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
|
|
`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.
|
|
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>
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
How did we not have this before?
|
|
Fixes #6397
|
|
|
|
|