From 84eecdfdfd8b972cd9fcafb35da81ed62d9698f9 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Tue, 15 Apr 2025 22:49:05 -0400 Subject: Include SVD loader in free version --- plugins/svd/src/lib.rs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'plugins/svd/src') diff --git a/plugins/svd/src/lib.rs b/plugins/svd/src/lib.rs index aa7f372e..e59e7ab3 100644 --- a/plugins/svd/src/lib.rs +++ b/plugins/svd/src/lib.rs @@ -60,7 +60,21 @@ impl Command for LoadSVDFile { #[no_mangle] #[allow(non_snake_case)] +#[cfg(not(feature = "demo"))] pub extern "C" fn CorePluginInit() -> bool { + plugin_init(); + true +} + +#[no_mangle] +#[allow(non_snake_case)] +#[cfg(feature = "demo")] +pub extern "C" fn SVDPluginInit() -> bool { + plugin_init(); + true +} + +fn plugin_init() { Logger::new("SVD").with_level(LevelFilter::Debug).init(); binaryninja::command::register_command( @@ -107,6 +121,4 @@ pub extern "C" fn CorePluginInit() -> bool { .unwrap(); module_meta_workflow.insert("core.module.loadDebugInfo", [LOADER_ACTIVITY_NAME]); module_meta_workflow.register().unwrap(); - - true -} +} \ No newline at end of file -- cgit v1.3.1