summaryrefslogtreecommitdiff
path: root/view/sharedcache/workflow/SharedCacheWorkflow.cpp
AgeCommit message (Collapse)Author
2025-08-27Rewrite Obj-C workflow in RustMark Rowe
This is functionally equivalent to the previous workflow_objc, with the following changes: 1. It mutates the `core.function.metaAnalysis` workflow rather than registering a new named workflow. The activities now all check for the presence of the Objective-C metadata added by `ObjCProcessor` to determine whether they should do work, rather than relying on `MachoView` to override the function workflow when Objective-C metadata is present. This fixes https://github.com/Vector35/binaryninja-api/issues/6779. 2. The auto-inlining of `objc_msgSend` selector stub functions is performed in a separate activity from the processing of `objc_msgSend` call sites. The selector stub inlining activity is configured so that it does not run in `DSCView` as the shared cache needs different behavior for stub functions more generally that `SharedCacheWorkflow` already provides. 3. The way that types like `id` and `SEL` are referenced is fixed so that they show up as `id` rather than `objc_struct*`. This also replaces the Objective-C portion of the shared cache's workflow, and incorporates several bug fixes that had been applied to it but not the standalone Objective-C workflow.
2025-08-20Deprecate Workflow::Instance in favor of Workflow::Get and Workflow::GetOrCreateMark Rowe
Calls to `Workflow::Instance` that were looking up a built-in workflow name are updated to use `Workflow::Get`. Others use `Workflow::GetOrCreate`.
2025-05-30Misc shared cache improvementsMason Reed
- Removed last use of user object creation in objective-c - Fixed function type info being omitted from certain images loaded automatically - Add TODO about undo action in view init. This is not critical, just a non-actionable warning because of a design flaw I will restate this again for anyone in the future, until the undo action system is thread-safe avoid calling it from any thread other than the main thread, it is very easy to deadlock or cause other issues. That goes for basically all user analysis object creation.
2025-05-21[SharedCache] Fix .dylddata sections failing to propagate constantsMason Reed
This occurred because prior to the change made in build `7484` we short-circuited when the pointer pointed to a read only segment, now that we consult the section the sections semantics were incorrect and failed, this fixes the dyld data sections to have correct semantics.
2025-05-06[SharedCache] Add activities to core.function.metaAnalysis rather than a new ↵Mark Rowe
named workflow Activities are registered with a `viewType` predicate to ensure they only run in shared cache views. Adding activities to `core.function.metaAnalysis` lets activities registered by plug-ins run in the shared cache without the plug-ins having to be aware of the shared cache. Work towards #6779.
2025-04-28[SharedCache] Improve support for older shared cache versionsMason Reed
Fixed branch island regions being skipped
2025-04-28Misc shared cache performance improvementsMason Reed
2025-04-08[SharedCache] Apply demangled names and types more broadlyMason Reed
Fixes the case of stub functions being applied with mangled names.
2025-04-07[SharedCache] Add symbolizing of all accesses to non-loaded images in functionsMason Reed
2025-04-07[SharedCache] Dont apply invalid symbols in the stub workflowWeiN76LQh
2025-04-03[SharedCache] Identify unloaded symbols that are called in standard functionsMason Reed
Fixes https://github.com/Vector35/binaryninja-api/issues/6550
2025-04-02[SharedCache] Misc fixes and commentsMason Reed
2025-04-02[SharedCache] Fix thrown exception in stub function analysis with mismatched ↵Mason Reed
expression operation
2025-04-02[SharedCache] Misc formattingMason Reed
2025-04-02[SharedCache] Refactor workflowMason Reed
2025-04-02[SharedCache] Improper nesting in workflowMason Reed
oops!
2025-04-02[SharedCache] Fix some of the workflow issuesMason Reed
Still have the issue with newer IOS stubs not having their direct function address taken
2025-04-02[SharedCache] Refactor Shared CacheMason Reed
In absence of a better name, this commit refactors the shared cache code.
2025-04-02[SharedCache] Cleanup SharedCacheWorkflow::FixupStubsMason Reed
Moved some code to a helper function and removed dead code and other oddities
2025-01-10[SharedCache] Fix handling of relative selectors in macOS shared cachesMark Rowe
Find the relative selector base address in the Objective-C optimization data pointed to by the shared cache header, rather than via `__objc_scoffs`. This is only present on iOS, and not for every iOS version that encodes selectors via direct offsets. This also includes some related improvements: 1. Direct selectors get their own pointer type so they're rendered correctly in the view. 2. Method lists encoded as lists of lists are now handled. 3. The `dyld_cache_header` type added to the view is truncated to the length in the loaded cache. This ensures it is applied to the view. 4. A couple of methods that process method IMPs and selectors are updated to check whether the address is valid before attempting to process them. They would otherwise fail by throwing an exception if they proceed, but checking for validity is quicker and makes exception breakpoints usable.
2024-11-25Rename 'defaultAnalysis' to 'baseAnalysis' in the Workflow system.Brian Potchik
2024-11-05[SharedCache] Optimizations for symbol resolution workflowkat
2024-10-28[SharedCache] Optimizations+fixes for SharedCache function workflow.kat
2024-10-23Initial commit of the alpha dyld_shared_cache view API Plugin.kat
This is an early release of our DSC processing plugin. We're still hard at work improving this feature. You should be able to just drop in a dyld_shared_cache and use the 'Shared Cache Triage' view to load and analyze images.