diff options
| author | KyleMiles <krm504@nyu.edu> | 2023-04-07 20:18:10 -0400 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2023-04-07 20:18:10 -0400 |
| commit | 4882cfed1a66d96c4f3ff94865a03409a22bb8bd (patch) | |
| tree | 7ad7f317ee3dbecf12c04361f9f768fbc6a0a0fb | |
| parent | 1c149ea85298f99db4e07ee804aeefff91d37584 (diff) | |
Disable DWARF Export by default for stable
| -rw-r--r-- | rust/examples/dwarfexport/src/lib.rs | 22 |
1 files changed, 18 insertions, 4 deletions
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 } |
