summaryrefslogtreecommitdiff
path: root/plugins/warp/src/plugin.rs
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2024-11-04 01:39:55 -0500
committerMason Reed <mason@vector35.com>2024-11-04 01:39:55 -0500
commit393c7fb508b465b0cb096d46eaaefc08030e9fed (patch)
tree1b3e3c3c47af1172707366f423c6f7e21da8d6a5 /plugins/warp/src/plugin.rs
parente6a0cb470745e09721f28ba2ad62f5ea71d63599 (diff)
WARP: Fix analysis updates not being correctly marked
We are running at the end of analysis now so we must invoke reanalysis
Diffstat (limited to 'plugins/warp/src/plugin.rs')
-rw-r--r--plugins/warp/src/plugin.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/warp/src/plugin.rs b/plugins/warp/src/plugin.rs
index b6e21578..ee9c633b 100644
--- a/plugins/warp/src/plugin.rs
+++ b/plugins/warp/src/plugin.rs
@@ -8,7 +8,7 @@ use crate::convert::{to_bn_symbol_at_address, to_bn_type};
use crate::matcher::{invalidate_function_matcher_cache, Matcher, PlatformID, PLAT_MATCHER_CACHE};
use binaryninja::binaryview::{BinaryView, BinaryViewExt};
use binaryninja::command::{Command, FunctionCommand};
-use binaryninja::function::Function;
+use binaryninja::function::{Function, FunctionUpdateType};
use binaryninja::rc::Ref;
use binaryninja::tags::TagType;
use warp::signature::function::Function as WarpFunction;
@@ -35,12 +35,12 @@ fn get_warp_tag_type(view: &BinaryView) -> Ref<TagType> {
// TODO: Rename to markup_function or something.
pub fn on_matched_function(function: &Function, matched: &WarpFunction) {
let view = function.view();
- view.define_auto_symbol(&to_bn_symbol_at_address(
+ view.define_user_symbol(&to_bn_symbol_at_address(
&view,
&matched.symbol,
function.symbol().address(),
));
- function.set_auto_type(&to_bn_type(&function.arch(), &matched.ty));
+ function.set_user_type(&to_bn_type(&function.arch(), &matched.ty));
// TODO: Add metadata. (both binja metadata and warp metadata)
function.add_tag(
&get_warp_tag_type(&view),
@@ -49,6 +49,8 @@ pub fn on_matched_function(function: &Function, matched: &WarpFunction) {
true,
None,
);
+ // Seems to be the only way to get the analysis update to work correctly.
+ function.mark_updates_required(FunctionUpdateType::FullAutoFunctionUpdate);
}
struct DebugFunction;