summaryrefslogtreecommitdiff
path: root/plugins/warp/src/plugin.rs
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2024-11-08 03:11:54 -0500
committerMason Reed <mason@vector35.com>2024-11-08 03:13:53 -0500
commit921569f7ea03e83f01c233289833b84daf0cddbf (patch)
tree0568f84b74c1e495f299aadb919078aadb0c9d42 /plugins/warp/src/plugin.rs
parent17199424a9abe241bedeaa089f2ca2231f3f5a2f (diff)
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
Diffstat (limited to 'plugins/warp/src/plugin.rs')
-rw-r--r--plugins/warp/src/plugin.rs8
1 files changed, 7 insertions, 1 deletions
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();