summaryrefslogtreecommitdiff
path: root/rust/src/architecture.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/architecture.rs')
-rw-r--r--rust/src/architecture.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/rust/src/architecture.rs b/rust/src/architecture.rs
index 2c9843d9..edc16209 100644
--- a/rust/src/architecture.rs
+++ b/rust/src/architecture.rs
@@ -175,6 +175,7 @@ impl InstructionInfo {
}
}
+use crate::functionrecognizer::FunctionRecognizer;
use crate::relocation::{CustomRelocationHandlerHandle, RelocationHandler};
pub use binaryninjacore_sys::BNFlagRole as FlagRole;
pub use binaryninjacore_sys::BNImplicitRegisterExtend as ImplicitRegisterExtend;
@@ -1646,6 +1647,13 @@ pub trait ArchitectureExt: Architecture {
{
crate::relocation::register_relocation_handler(self.as_ref(), name, func);
}
+
+ fn register_function_recognizer<R>(&self, recognizer: R)
+ where
+ R: 'static + FunctionRecognizer + Send + Sync + Sized,
+ {
+ crate::functionrecognizer::register_arch_function_recognizer(self.as_ref(), recognizer);
+ }
}
impl<T: Architecture> ArchitectureExt for T {}