diff options
| author | KyleMiles <krm504@nyu.edu> | 2023-05-10 10:47:48 -0400 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2023-07-10 12:58:34 -0400 |
| commit | 83d041e4cfd64179f8bbc60752ded78c6f037b85 (patch) | |
| tree | 5b9368f65884feba6e3efd3f3b33d6249a45d01c /rust/examples | |
| parent | 04bc6f11ae0289aae57d63d4cd32f4ef305d1a7a (diff) | |
Move DWARF Export in to DWARF folder in Rust API examples folder
Diffstat (limited to 'rust/examples')
| -rw-r--r-- | rust/examples/dwarf/dwarf_export/CMakeLists.txt (renamed from rust/examples/dwarfexport/CMakeLists.txt) | 8 | ||||
| -rw-r--r-- | rust/examples/dwarf/dwarf_export/Cargo.toml (renamed from rust/examples/dwarfexport/Cargo.toml) | 4 | ||||
| -rw-r--r-- | rust/examples/dwarf/dwarf_export/README.md (renamed from rust/examples/dwarfexport/README.md) | 0 | ||||
| -rw-r--r-- | rust/examples/dwarf/dwarf_export/build.rs (renamed from rust/examples/dwarfexport/build.rs) | 0 | ||||
| -rw-r--r-- | rust/examples/dwarf/dwarf_export/src/lib.rs (renamed from rust/examples/dwarfexport/src/lib.rs) | 21 |
5 files changed, 10 insertions, 23 deletions
diff --git a/rust/examples/dwarfexport/CMakeLists.txt b/rust/examples/dwarf/dwarf_export/CMakeLists.txt index cb4d5790..aa4631dc 100644 --- a/rust/examples/dwarfexport/CMakeLists.txt +++ b/rust/examples/dwarf/dwarf_export/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.9 FATAL_ERROR) -project(dwarfexport) +project(dwarf_export) file(GLOB PLUGIN_SOURCES ${PROJECT_SOURCE_DIR}/Cargo.toml @@ -22,11 +22,11 @@ else() set(CARGO_OPTS --target-dir=${PROJECT_BINARY_DIR}/target --release) endif() -set(OUTPUT_FILE ${CMAKE_STATIC_LIBRARY_PREFIX}dwarfexport${CMAKE_SHARED_LIBRARY_SUFFIX}) +set(OUTPUT_FILE ${CMAKE_STATIC_LIBRARY_PREFIX}dwarf_export${CMAKE_SHARED_LIBRARY_SUFFIX}) set(PLUGIN_PATH ${TARGET_DIR}/${OUTPUT_FILE}) -add_custom_target(dwarfexport ALL DEPENDS ${PLUGIN_PATH}) -add_dependencies(dwarfexport binaryninjaapi) +add_custom_target(dwarf_export ALL DEPENDS ${PLUGIN_PATH}) +add_dependencies(dwarf_export binaryninjaapi) find_program(RUSTUP_PATH rustup REQUIRED HINTS ~/.cargo/bin) if(CARGO_API_VERSION) diff --git a/rust/examples/dwarfexport/Cargo.toml b/rust/examples/dwarf/dwarf_export/Cargo.toml index a95bc4e6..022d3e00 100644 --- a/rust/examples/dwarfexport/Cargo.toml +++ b/rust/examples/dwarf/dwarf_export/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "dwarfexport" +name = "dwarf_export" version = "0.1.0" edition = "2021" @@ -7,7 +7,7 @@ edition = "2021" crate-type = ["cdylib"] [dependencies] -binaryninja = {path="../../"} +binaryninja = {path="../../../"} gimli = "^0.27" log = "^0.4" object = { version = "0.30.3", features = ["write"] } diff --git a/rust/examples/dwarfexport/README.md b/rust/examples/dwarf/dwarf_export/README.md index cea8e3b4..cea8e3b4 100644 --- a/rust/examples/dwarfexport/README.md +++ b/rust/examples/dwarf/dwarf_export/README.md diff --git a/rust/examples/dwarfexport/build.rs b/rust/examples/dwarf/dwarf_export/build.rs index 5ba9bcde..5ba9bcde 100644 --- a/rust/examples/dwarfexport/build.rs +++ b/rust/examples/dwarf/dwarf_export/build.rs diff --git a/rust/examples/dwarfexport/src/lib.rs b/rust/examples/dwarf/dwarf_export/src/lib.rs index 8090f1b3..c47be66c 100644 --- a/rust/examples/dwarfexport/src/lib.rs +++ b/rust/examples/dwarf/dwarf_export/src/lib.rs @@ -15,7 +15,6 @@ use binaryninja::{ interaction::{FormResponses, FormResponses::Index}, logger::init, rc::Ref, - settings::Settings, symbol::SymbolType, types::{Conf, MemberAccess, StructureType, Type, TypeClass}, }; @@ -681,23 +680,11 @@ impl Command for MyCommand { pub extern "C" fn CorePluginInit() -> bool { init(LevelFilter::Info).expect("Unable to initialize logger"); - 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." - }"#, + register( + "Export as DWARF", + "Export current analysis state and annotations as DWARF for import into other tools", + MyCommand {}, ); - 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 } |
