summaryrefslogtreecommitdiff
path: root/rust/src/debuginfo.rs
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2023-03-21 17:29:10 -0400
committerGlenn Smith <glenn@vector35.com>2023-03-22 15:37:59 -0400
commit3098871098535217641117052875831268461095 (patch)
treee5a680674ed639c9e666a76271466f05f0f96f93 /rust/src/debuginfo.rs
parentb5ae0b5262c5337bc9a949d176883550c924fb90 (diff)
DebugInfo: Make datavar types have confidence
Diffstat (limited to 'rust/src/debuginfo.rs')
-rw-r--r--rust/src/debuginfo.rs16
1 files changed, 16 insertions, 0 deletions
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<S: BnStrCompatible>(&self, var: DataVariableAndName<S>) -> 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 {