From 6662b774b37840380c2e2274a4ca01680b72ba90 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Sat, 28 Jun 2025 18:39:09 -0400 Subject: [Rust] Misc things for WARP - Make LowLevelILFunction::from_raw public" - Add a helper to get lifted il from flow graph --- rust/src/flowgraph.rs | 4 ++++ rust/src/low_level_il/function.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'rust/src') diff --git a/rust/src/flowgraph.rs b/rust/src/flowgraph.rs index 2d1d986c..4489d950 100644 --- a/rust/src/flowgraph.rs +++ b/rust/src/flowgraph.rs @@ -124,6 +124,10 @@ impl FlowGraph { unsafe { BNSetViewForFlowGraph(self.handle, view_ptr) } } + pub fn lifted_il(&self) -> Option> { + self.function()?.lifted_il().ok() + } + pub fn low_level_il(&self) -> Option> { unsafe { let llil_ptr = BNGetFlowGraphLowLevelILFunction(self.handle); diff --git a/rust/src/low_level_il/function.rs b/rust/src/low_level_il/function.rs index 2eaf7f11..f5fcf25f 100644 --- a/rust/src/low_level_il/function.rs +++ b/rust/src/low_level_il/function.rs @@ -70,7 +70,7 @@ where } } - pub(crate) unsafe fn from_raw(handle: *mut BNLowLevelILFunction) -> Self { + pub unsafe fn from_raw(handle: *mut BNLowLevelILFunction) -> Self { Self::from_raw_with_arch(handle, None) } -- cgit v1.3.1