From 80b07dfa158bb093cc93e602363655b62ae595f8 Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Fri, 22 Dec 2023 13:46:10 -0700 Subject: Support function recognizers in Rust architecture plugins --- rust/src/function.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'rust/src/function.rs') diff --git a/rust/src/function.rs b/rust/src/function.rs index 0a01f337..7af9ee02 100644 --- a/rust/src/function.rs +++ b/rust/src/function.rs @@ -287,6 +287,20 @@ impl Function { Array::new(variables, count, ()) } } + + pub fn apply_imported_types(&self, sym: &Symbol, t: Option<&Type>) { + unsafe { + BNApplyImportedTypes( + self.handle, + sym.handle, + if let Some(t) = t { + t.handle + } else { + core::ptr::null_mut() + }, + ); + } + } } impl fmt::Debug for Function { -- cgit v1.3.1