From 3098871098535217641117052875831268461095 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Tue, 21 Mar 2023 17:29:10 -0400 Subject: DebugInfo: Make datavar types have confidence --- rust/src/debuginfo.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'rust/src/debuginfo.rs') diff --git a/rust/src/debuginfo.rs b/rust/src/debuginfo.rs index 36cbc5b7..fb108a21 100644 --- a/rust/src/debuginfo.rs +++ b/rust/src/debuginfo.rs @@ -791,6 +791,22 @@ impl DebugInfo { }, } } + + pub fn add_data_variable_info(&self, var: DataVariableAndName) -> bool { + let name = var.name.into_bytes_with_nul(); + unsafe { + BNAddDebugDataVariableInfo( + self.handle, + &mut BNDataVariableAndName { + address: var.address, + type_: var.t.contents.handle, + name: name.as_ref().as_ptr() as *mut _, + autoDiscovered: var.auto_discovered, + typeConfidence: var.t.confidence, + }, + ) + } + } } unsafe impl RefCountable for DebugInfo { -- cgit v1.3.1