diff options
| author | Mark Rowe <mrowe@bdash.net.nz> | 2025-05-03 07:42:51 -0700 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-05-06 21:03:51 -0400 |
| commit | b0965fa2a5c703214f60a6c5af01f6ddf21e6f42 (patch) | |
| tree | 0f20808e2882efef0b6f0ec870e76a587c6dc39e /view/sharedcache/workflow/ObjCActivity.cpp | |
| parent | 17ac386193ea105dec3c1161943fd7da6563b95c (diff) | |
[SharedCache] Add activities to core.function.metaAnalysis rather than a new 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.
Diffstat (limited to 'view/sharedcache/workflow/ObjCActivity.cpp')
| -rw-r--r-- | view/sharedcache/workflow/ObjCActivity.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/view/sharedcache/workflow/ObjCActivity.cpp b/view/sharedcache/workflow/ObjCActivity.cpp index cc1b2256..f3efbccd 100644 --- a/view/sharedcache/workflow/ObjCActivity.cpp +++ b/view/sharedcache/workflow/ObjCActivity.cpp @@ -7,8 +7,21 @@ using namespace BinaryNinja; void ObjCActivity::Register(Workflow &workflow) { - workflow.RegisterActivity(new Activity("core.analysis.objc.adjustCallType", &AdjustCallType)); - workflow.Insert("core.function.analyzeTailCalls", "core.analysis.objc.adjustCallType"); + workflow.RegisterActivity(new Activity(R"({ + "name": "core.analysis.sharedCache.objc.adjustCallType", + "eligibility": { + "predicates": [ + { + "type": "viewType", + "operator": "in", + "value": [ + "DSCView" + ] + } + ] + } + })", &AdjustCallType)); + workflow.Insert("core.function.analyzeTailCalls", "core.analysis.sharedCache.objc.adjustCallType"); } std::vector<std::string> splitSelector(const std::string& selector) { |
