summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-01-08Prevent crash when Mach-O view doesn't existJosh Ferrell
2025-01-07Add setting to limit maximum recursion depth for computing an expression ↵Josh Ferrell
value in an mlil dataflow query
2025-01-07Verbiage change in Getting Started doc.fosdick.io
2025-01-07Add information on the Portal to the Getting Started guide.fosdick.io
2025-01-07Bump UI ABI version due to previous commit.Alexander Taylor
2025-01-03Delete ViewNavigationModeMason Reed
Does not seem to do anything other than cause a crash!
2024-12-30Move Changelog filtering to UIMason Reed
2024-12-30add note to UI plugin bullet about the qt-build repoJordan Wiens
2024-12-27Fix trying to construct a FunctionViewType from a FunctionViewTypeGlenn Smith
2024-12-27Add default implementations to Python TypePrinter to dual C++Glenn Smith
2024-12-27One case of needing the type printer in pseudo rustGlenn Smith
2024-12-27Make pseudo-c use the default type printerGlenn Smith
2024-12-27Clean up langreps' opcode print switchGlenn Smith
2024-12-26[SharedCache] Add the ability to manually trigger Objective-C processingWeiN76LQh
A problem with processing Objective-C sections at the time a library is loaded is that some of the references within those sections may refer to unload sections. This results in things like selectors not being correctly typed and named. This commit provides a way for users to manually trigger Objective-C parsing against sections for a specific library or all libraries, via the API. Combined with the previous commit a user can use the API to batch load a number of libraries and skip Objective-C processing for each one and then run it across the entire of the DSC once they are all loaded. Further improvement would be to provide a way to trigger Objective-C processing through the UI.
2024-12-26[SharedCache] Add the ability to skip Objective-C processing when loading a ↵WeiN76LQh
library This is useful when batch loading libraries to avoid extra processing (once the next commit has landed).
2024-12-26[SharedCache] Fix post-processing of Objective-C sectionsWeiN76LQh
Prior to this commit the function `DSCObjCProcessor::PostProcessObjCSections` never does anything because it doesn't use the correct names to get the Objective-C sections of the recently loaded library. In fact it never does anything because the DSC never has sections with the names its searching for. This commit passes the `baseName` (the name of the library that was loaded), which is what other Objective-C section processing code does. Combining the base name with the section names it will now find them and process them as intended. This was resulting in alot of Objective-C related stuff being missed. There is however still an issue of the fact that the way this DSC plugin works means it only analyzes Objective-C sections once. This catches alot of things but there are a number of cases where other libraries need to be loaded first due to information being referenced in another library. For instance errors like `Failed to determine base classname for category` can be caused by the class reference in the category being to a class outside of the loaded library. Once the library containing the class has been loaded, the section containing the category should be re-proccessed.
2024-12-25[SharedCache] Remove unnecessary lock in `SharedCache` destructorWeiN76LQh
From what I can tell the lock being taken in `SharedCache::~SharedCache` was purely for the decrement of `sharedCacheReferences`, however its an atomic so a lock isn't necessary. The lock being taken is extremely contentious and therefore often slow to be acquired. This resulted in a surprising amount of execution time spent in the `SharedCache` destructor. Nothing hugely significant but a quick and easy win to remove this single line of code.
2024-12-24Fix Shared Cache Plugin out-of-tree buildVisual Ehrmanntraut
2024-12-23Update metadata version to prevent v2 loader incorrectly trying to load v3 ↵kat
symbol list We should think through a better way of handling upgrades, as v3 can load v2 dbs just fine, but there is no clean way to upgrade the info currently. We need SharedCache ser/des functions in DSCView.cpp
2024-12-23[SharedCache] Serialize `SharedCache::m_symbolInfos`WeiN76LQh
`SharedCache::m_symbolInfos` isn't being serialized but there is an attempt to deserialize it. This commit adds in the code to serialize it. I slightly modified the format because I didn't really understand how it was expected to be serialized based on the deserialization code. The deserialization code looked wrong to me but its likely a misunderstanding on my part. I kept it similar to how `m_exportInfos` is serialized.
2024-12-20Linear View: Persist highlight during renamesGlenn Smith
2024-12-18Fix crash when demangling certain namesGlenn Smith
Fixes #6261
2024-12-17Small doc fixJosh Ferrell
2024-12-17better docs on headless license managementJordan Wiens
2024-12-16Disable fmt unicode support on windowsJosh Ferrell
It wasn't supported before and having it enabled means needing to change charset to utf-8
2024-12-16Update dependencies and fix compilation errors/warnings for g++14 and c++20Josh Ferrell
2024-12-16[ppc] merges PR Vector35/binaryninja-api#5176 (adds support for "psq" ↵Galen Williamson
Quantized Floating Point instructions, fixes/completes 64-bit instruction/register support)
2024-12-14Pass length to free flag conditions list callback and remove libc from rust apiMason Reed
Allows language bindings like rust to free conditions lists sanely
2024-12-14Pass length to free register list callbackMason Reed
Allows language bindings like rust to free register lists sanely
2024-12-14WARP: Update readme to reflect correct env varMason Reed
DEP_BINARYNINJACORE_PATH is an artifact from the branch `rust_break_everything`
2024-12-14WARP: Run `cargo clippy`Mason Reed
2024-12-14WARP: Run `cargo fmt`Mason Reed
2024-12-14WARP: Attempt auto linking to coreMason Reed
This was missing as apparently some of this was written against the `rust_break_everything` branch.
2024-12-13WARP: Misc clippy lintMason Reed
Add safety doc comment to explain why this is allowed
2024-12-13Bump supported rust version to 1.83.0Mason Reed
2024-12-13WARP: Misc bench fixMason Reed
2024-12-13WARP: User friendly file pickerMason Reed
Instead of using the interaction api or text input just use a rust crate to manage the file picker dialog
2024-12-13Update the linear view when segments/sections change. Fix ↵Xusheng
https://github.com/Vector35/binaryninja-api/issues/6132
2024-12-11WARP: Run `cargo fmt`Mason Reed
2024-12-11WARP: Add ability to save single function to fileMason Reed
This command will update or create a signature file with the selected function
2024-12-11Fix incorrectly named argument for `get_open_filename_input`Mason Reed
2024-12-11Support setting a function type using a typedef-ed function type. FixXusheng
2024-12-10[SharedCache] Fix slide info parsing and complete v2 supportWeiN76LQh
There seem to be a number of issues with slide info parsing. I decided the simplest fix was to largely mimick what `dyld` is doing. Part of this process was to remove creating a vector of page starts and processing them in another loop below the one where they were read out. It wasn't clear to me the original design decision to separate it into 2 loops like that. I think this was part of the problem that was causing issues. By adding rewrites in the same loop where page starts are being read out, it was much easier to mimick the code in `dyld` which I assume has to be correct. So as long as my copying was correct then I believe this should work as intended. Not everything has been thoroughly tested but I'm pretty confident v3 and v5 are now working as intended. v2 should be but less testing of it has been done.
2024-12-10[SharedCache] Fix padding issue with v5 slide infoWeiN76LQh
The issue this commit fixes was causing `SharedCache::ParseAndApplySlideInfoForFile` to completely fail to work with v5 slide info, which had a lot of knock on effects, i.e. lots of Objective-C analysis was failing due to invalid pointers which hadn't been fixed up. `dyld_cache_slide_info5` has 4 bytes of padding before `value_add`. Whilst `value_add` is not actually being read from, `SharedCache::ParseAndApplySlideInfoForFile` will read at a location in the file based on the size of the structure `dyld_cache_slide_info5`. This being off by 4 bytes basically broke v5 slide info fixups. With this fix many more Objective-C functions have names and a lot more `msgSend` calls are fixed up.
2024-12-10Fix a compilation error on Windowskat
2024-12-10[SharedCache] Use basic copy-on-write for viewStateCacheMark Rowe
Copying the state from the cache into a new `SharedCache` object is done with a global lock held and is so expensive that it results in much of the shared cache analysis running on a single thread, with others blocked waiting to acquire the lock. The cache now holds a `std::shared_ptr` to the state. New `SharedCache` objects take a reference to the cached state and only create their own copy of it the first time they perform an operation that would mutate it. The cached copy is never mutated, only replaced, so there is no danger of modifying the state out from under a `SharedCache` object. Since the copy happens at first mutation, it is performed without any global locks held. This avoids blocking other threads. This cuts the initial load time of a macOS shared cache from 3 minutes to 70 seconds, and cuts the time taken to load and analyze AppKit from multiple hours to around 14 minutes.
2024-12-10[SharedCache] Preserve flags when splitting a memory regionMark Rowe
The flags field was being left uninitialized which could result in the region being mishandled during later analysis.
2024-12-10[SharedCache] Have VM track ranges rather than pagesMark Rowe
There are typically only a few dozen mappings, while there can be millions of pages. This reduces the amount of time spent populating the mapping from region to file accessor along with the memory usage of the same.
2024-12-10[SharedCache] Switch to SAX-based writer API for JSON serializationAuthor: Mark Rowe
2024-12-10[SharedCache] Rework metadata serialization to reduce memory overheadMark Rowe
api/MetadataSerializable.hpp is removed in favor of including core/MetadataSerializable.hpp. Both headers defined types with the same name leading to One Definition Rule violations and surprising behavior. The serialization and deserialization context are now created on-demand during serialization rather than being a member of `MetadataSerializable`. This reduces the size of every serializable object by ~220 bytes. The context is passed explicitly as an argument to `Serialize` / `Deserialize`. As a result, `Serialize` / `Deserialize` can now be free functions rather than member functions. Since `MetadataSerializable` is not used for dynamic dispatch, the virtual methods are removed and the class is updated to be a class template using CRTP. This allows delegating to the derived class's `Load` and `Store` methods without the additional size overhead of the vtable pointer in every serializable object. These changes reduce the memory footprint of Binary Ninja after loading the macOS shared cache and loading a single dylib from it from 8.3GB to 4.6GB.