diff options
| author | Mason Reed <mason@vector35.com> | 2025-12-18 17:14:06 -0500 |
|---|---|---|
| committer | Mason Reed <35282038+emesare@users.noreply.github.com> | 2026-01-11 10:36:01 -0800 |
| commit | 6f75ca031aa7e8f7e1c706d1880b202137b1996f (patch) | |
| tree | 1fe8e778f98e4390a1075fc402047e23f2128934 /rust/src/custom_binary_view.rs | |
| parent | 168a3fd34824adc9c6a606cd144219701f15cccf (diff) | |
[Rust] Enter more session scoped tracing spans for debug info and binary view callbacks
Diffstat (limited to 'rust/src/custom_binary_view.rs')
| -rw-r--r-- | rust/src/custom_binary_view.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/rust/src/custom_binary_view.rs b/rust/src/custom_binary_view.rs index 8e070b15..13a124e9 100644 --- a/rust/src/custom_binary_view.rs +++ b/rust/src/custom_binary_view.rs @@ -48,12 +48,10 @@ where where T: CustomBinaryViewType, { - ffi_wrap!("BinaryViewTypeBase::is_valid_for", unsafe { - let view_type = &*(ctxt as *mut T); - let data = BinaryView::ref_from_raw(BNNewViewReference(data)); - - view_type.is_valid_for(&data) - }) + let view_type = unsafe { &*(ctxt as *mut T) }; + let data = unsafe { BinaryView::ref_from_raw(BNNewViewReference(data)) }; + let _span = ffi_span!("BinaryViewTypeBase::is_valid_for", data); + view_type.is_valid_for(&data) } extern "C" fn cb_deprecated<T>(ctxt: *mut c_void) -> bool @@ -89,6 +87,7 @@ where actual_parent: &data, }; + let _span = ffi_span!("BinaryViewTypeBase::create", data); match view_type.create_custom_view(&data, builder) { Ok(bv) => { // force a leak of the Ref; failure to do this would result @@ -114,6 +113,7 @@ where actual_parent: &data, }; + let _span = ffi_span!("BinaryViewTypeBase::parse", data); match view_type.parse_custom_view(&data, builder) { Ok(bv) => { // force a leak of the Ref; failure to do this would result @@ -134,6 +134,7 @@ where let view_type = &*(ctxt as *mut T); let data = BinaryView::ref_from_raw(BNNewViewReference(data)); + let _span = ffi_span!("BinaryViewTypeBase::load_settings", data); match view_type.load_settings_for_data(&data) { Some(settings) => Ref::into_raw(settings).handle, None => ptr::null_mut() as *mut _, |
