summaryrefslogtreecommitdiff
path: root/plugins/bntl_utils/src/command/dump.rs
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2026-02-22 22:42:35 -0800
committerMason Reed <35282038+emesare@users.noreply.github.com>2026-02-23 00:09:44 -0800
commitd0eec62d6df0edbbb76dfeac58879797e90a8594 (patch)
tree03cf8d04eb7d33ac0785f2eede92ecbd552a48b0 /plugins/bntl_utils/src/command/dump.rs
parentf3e0bf4ab35d50b11b2dbde41a699ab7497208d1 (diff)
Add global plugin command type
Register plugins which are available outside the context of a binary view
Diffstat (limited to 'plugins/bntl_utils/src/command/dump.rs')
-rw-r--r--plugins/bntl_utils/src/command/dump.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/bntl_utils/src/command/dump.rs b/plugins/bntl_utils/src/command/dump.rs
index 96c3b264..7b48900d 100644
--- a/plugins/bntl_utils/src/command/dump.rs
+++ b/plugins/bntl_utils/src/command/dump.rs
@@ -2,8 +2,7 @@ use crate::command::{InputDirectoryField, OutputDirectoryField};
use crate::dump::TILDump;
use crate::helper::path_to_type_libraries;
use binaryninja::background_task::BackgroundTask;
-use binaryninja::binary_view::BinaryView;
-use binaryninja::command::Command;
+use binaryninja::command::GlobalCommand;
use binaryninja::interaction::Form;
pub struct Dump;
@@ -48,15 +47,14 @@ impl Dump {
}
}
-impl Command for Dump {
- // TODO: We need a command type that does not require a binary view.
- fn action(&self, _view: &BinaryView) {
+impl GlobalCommand for Dump {
+ fn action(&self) {
std::thread::spawn(move || {
Dump::execute();
});
}
- fn valid(&self, _view: &BinaryView) -> bool {
+ fn valid(&self) -> bool {
true
}
}