From 921569f7ea03e83f01c233289833b84daf0cddbf Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Fri, 8 Nov 2024 03:11:54 -0500 Subject: WARP: Refactor matcher - Add configurable matcher settings - Apply adjacent constraints now that were in a module workflow at the end of analysis - Set required number of constraints for more accuracy --- plugins/warp/src/plugin.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'plugins/warp/src/plugin.rs') diff --git a/plugins/warp/src/plugin.rs b/plugins/warp/src/plugin.rs index 66f5c99d..f250f104 100644 --- a/plugins/warp/src/plugin.rs +++ b/plugins/warp/src/plugin.rs @@ -4,7 +4,9 @@ use crate::cache::{ register_cache_destructor, ViewID, FUNCTION_CACHE, GUID_CACHE, MATCHED_FUNCTION_CACHE, }; use crate::convert::{to_bn_symbol_at_address, to_bn_type}; -use crate::matcher::{invalidate_function_matcher_cache, Matcher, PlatformID, PLAT_MATCHER_CACHE}; +use crate::matcher::{ + invalidate_function_matcher_cache, Matcher, MatcherSettings, PlatformID, PLAT_MATCHER_CACHE, +}; use crate::{build_function, cache}; use binaryninja::binaryview::{BinaryView, BinaryViewExt}; use binaryninja::command::{Command, FunctionCommand}; @@ -120,6 +122,7 @@ impl Command for DebugCache { if let Some(cache) = plat_cache.get(&platform_id) { log::info!("Platform functions: {}", cache.functions.len()); log::info!("Platform types: {}", cache.types.len()); + log::info!("Platform settings: {:?}", cache.settings); } } } @@ -149,6 +152,9 @@ impl Command for DebugInvalidateCache { pub extern "C" fn CorePluginInit() -> bool { binaryninja::logger::init(LevelFilter::Debug); + // Register our matcher settings. + MatcherSettings::register(); + // Make sure caches are flushed when the views get destructed. register_cache_destructor(); -- cgit v1.3.1