summaryrefslogtreecommitdiff
path: root/rust/src/function.rs
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2025-06-10 01:37:39 -0400
committerGlenn Smith <glenn@vector35.com>2025-06-11 17:37:30 -0400
commit4559573522332364873709280012593875935285 (patch)
tree145dcf6b2c070554ac1c377f94bcc4f860f8e900 /rust/src/function.rs
parent4677622997632557385187477331110706520731 (diff)
Expose Function::CheckForDebugReport
Diffstat (limited to 'rust/src/function.rs')
-rw-r--r--rust/src/function.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/rust/src/function.rs b/rust/src/function.rs
index 89ade8f8..e7e269dc 100644
--- a/rust/src/function.rs
+++ b/rust/src/function.rs
@@ -2235,6 +2235,19 @@ impl Function {
self.view().update_analysis()
}
+ ///Checks if a function has had a debug report requested with the given name, and then,
+ /// if one has been requested, clears the request internally so that future calls
+ /// to this function for that report will return False.
+ ///
+ /// If a function has had a debug report requested, it is the caller of this function's
+ /// responsibility to actually generate and show the debug report.
+ /// You can use [crate::interaction::report::ReportCollection::show]
+ /// for showing a debug report from a workflow activity.
+ pub fn check_for_debug_report(&self, name: &str) -> bool {
+ let name = std::ffi::CString::new(name.to_string()).unwrap();
+ unsafe { BNFunctionCheckForDebugReport(self.handle, name.as_ptr()) }
+ }
+
/// Whether function was automatically discovered s a result of some creation of a 'user' function.
/// 'user' functions may or may not have been created by a user through the or API. For instance the entry point
/// into a function is always created a 'user' function. 'user' functions should be considered the root of auto