summaryrefslogtreecommitdiff
path: root/rust/examples/minidump/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/examples/minidump/src/lib.rs')
-rw-r--r--rust/examples/minidump/src/lib.rs38
1 files changed, 0 insertions, 38 deletions
diff --git a/rust/examples/minidump/src/lib.rs b/rust/examples/minidump/src/lib.rs
deleted file mode 100644
index 62898301..00000000
--- a/rust/examples/minidump/src/lib.rs
+++ /dev/null
@@ -1,38 +0,0 @@
-use binaryninja::binaryview::BinaryView;
-use binaryninja::command::{register, Command};
-use binaryninja::custombinaryview::register_view_type;
-use log::{debug, LevelFilter};
-use binaryninja::logger::Logger;
-
-mod command;
-mod view;
-
-struct PrintMemoryInformationCommand;
-
-impl Command for PrintMemoryInformationCommand {
- fn action(&self, binary_view: &BinaryView) {
- command::print_memory_information(binary_view);
- }
-
- fn valid(&self, _binary_view: &BinaryView) -> bool {
- true // TODO: Of course, the command will not always be valid!
- }
-}
-
-#[no_mangle]
-#[allow(non_snake_case)]
-pub extern "C" fn CorePluginInit() -> bool {
- Logger::new("Minidump").with_level(LevelFilter::Trace).init();
-
- debug!("Registering minidump binary view type");
- register_view_type("Minidump", "Minidump", view::MinidumpBinaryViewType::new);
-
- debug!("Registering minidump plugin commands");
- register(
- "Minidump\\[DEBUG] Print Minidump Memory Information",
- "Print a human-readable description of the contents of the MinidumpMemoryInfoList stream in the loaded minidump",
- PrintMemoryInformationCommand {},
- );
-
- true
-}