diff options
| author | KyleMiles <krm504@nyu.edu> | 2021-02-10 22:04:29 +0000 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2021-03-18 01:50:19 +0000 |
| commit | 534c3bc85860d2c14a490cf68ea1174cb9edbfde (patch) | |
| tree | f7b21045d0f2ab855c49da8b38440977f971a72e /rust/examples/flowgraph/src | |
| parent | 1515df8e71412787470b27d04ed9b2944fca0fdc (diff) | |
Better type support
Diffstat (limited to 'rust/examples/flowgraph/src')
| -rw-r--r-- | rust/examples/flowgraph/src/lib.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/rust/examples/flowgraph/src/lib.rs b/rust/examples/flowgraph/src/lib.rs index 799b0470..4d5c2241 100644 --- a/rust/examples/flowgraph/src/lib.rs +++ b/rust/examples/flowgraph/src/lib.rs @@ -4,14 +4,15 @@ use binaryninja::{ disassembly::{DisassemblyTextLine, InstructionTextToken, InstructionTextTokenType}, flowgraph::{BranchType, EdgePenStyle, EdgeStyle, FlowGraph, FlowGraphNode, ThemeColor}, }; +use binaryninja::plugin_abi_version; fn test_graph(view: &BinaryView) { let graph = FlowGraph::new(); let disassembly_lines_a = vec![DisassemblyTextLine::from(vec![ - InstructionTextToken::new(InstructionTextTokenType::TextToken, "Li"), - InstructionTextToken::new(InstructionTextTokenType::TextToken, "ne"), - InstructionTextToken::new(InstructionTextTokenType::TextToken, " 1"), + InstructionTextToken::new(InstructionTextTokenType::TextToken, "Li", 0), + InstructionTextToken::new(InstructionTextTokenType::TextToken, "ne", 0), + InstructionTextToken::new(InstructionTextTokenType::TextToken, " 1", 0), ])]; let node_a = FlowGraphNode::new(&graph); @@ -48,3 +49,8 @@ pub extern "C" fn UIPluginInit() -> bool { ); true } + +#[no_mangle] +pub extern "C" fn UIPluginABIVersion() -> u32 { + plugin_abi_version() +} |
