diff options
Diffstat (limited to 'rust/src/function.rs')
| -rw-r--r-- | rust/src/function.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rust/src/function.rs b/rust/src/function.rs index 48f02205..bfd8b587 100644 --- a/rust/src/function.rs +++ b/rust/src/function.rs @@ -19,6 +19,7 @@ use crate::{ basicblock::{BasicBlock, BlockContext}, binaryview::{BinaryView, BinaryViewExt}, callingconvention::CallingConvention, + component::Component, disassembly::{DisassemblySettings, DisassemblyTextLine}, flowgraph::FlowGraph, hlil, llil, @@ -2138,6 +2139,13 @@ impl Function { let result = unsafe { BNCreateFunctionGraph(self.handle, graph_type, settings_raw) }; unsafe { Ref::new(FlowGraph::from_raw(result)) } } + + pub fn parent_components(&self) -> Array<Component> { + let mut count = 0; + let result = unsafe{ BNGetFunctionParentComponents(self.view().handle, self.handle, &mut count) }; + assert!(!result.is_null()); + unsafe{ Array::new(result, count, ()) } + } } impl fmt::Debug for Function { |
