From 4882cfed1a66d96c4f3ff94865a03409a22bb8bd Mon Sep 17 00:00:00 2001 From: KyleMiles Date: Fri, 7 Apr 2023 20:18:10 -0400 Subject: Disable DWARF Export by default for stable --- rust/examples/dwarfexport/src/lib.rs | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'rust/examples/dwarfexport/src') diff --git a/rust/examples/dwarfexport/src/lib.rs b/rust/examples/dwarfexport/src/lib.rs index 05c36169..3a2f16bd 100644 --- a/rust/examples/dwarfexport/src/lib.rs +++ b/rust/examples/dwarfexport/src/lib.rs @@ -15,6 +15,7 @@ use binaryninja::{ interaction::{FormResponses, FormResponses::Index}, logger::init, rc::Ref, + settings::Settings, symbol::SymbolType, types::{Conf, MemberAccess, StructureType, Type, TypeClass}, }; @@ -676,10 +677,23 @@ impl Command for MyCommand { pub extern "C" fn CorePluginInit() -> bool { init(LevelFilter::Info).expect("Unable to initialize logger"); - register( - "Export as DWARF", - "Export current analysis state and annotations as DWARF for import into other tools", - MyCommand {}, + let settings = Settings::new(""); + settings.register_setting_json( + "analysis.experimental.dwarfExport", + r#"{ + "title" : "Enable the DWARF Export Plugin", + "type" : "boolean", + "default" : false, + "description" : "Export current analysis state and annotations as DWARF for import into other tools. This is currently an experimental feature as integrations with tools that import DWARF information are limited." + }"#, ); + + if settings.get_bool("analysis.experimental.dwarfExport", None, None) { + register( + "Export as DWARF", + "Export current analysis state and annotations as DWARF for import into other tools", + MyCommand {}, + ); + } true } -- cgit v1.3.1