thruput_sdk/diagnostics/
mod.rs1#[cfg(not(target_arch = "riscv32"))]
2pub use ::thiserror::Error;
3
4#[cfg(not(target_arch = "riscv32"))]
5mod debug_context;
6
7#[cfg(not(target_arch = "riscv32"))]
8pub use debug_context::*;
9
10#[cfg(not(target_arch = "riscv32"))]
11#[macro_export]
12macro_rules! with_debug_context {
13 { $call_info:expr, $body:block } => {
14 $crate::with_debug_context(&$call_info, || $body)
15 };
16}
17
18#[cfg(target_arch = "riscv32")]
19#[macro_export]
21macro_rules! with_debug_context {
22 { $call_info:expr, $body:block } => {
23 $body
24 };
25}
26
27#[cfg(not(target_arch = "riscv32"))]
28#[macro_export]
29macro_rules! with_call_tracking {
30 { $call_info:expr, $body:expr } => {
31 $crate::with_debug_context(&$call_info, || { $body })
32 };
33}
34
35#[cfg(target_arch = "riscv32")]
36#[macro_export]
38macro_rules! with_call_tracking {
39 { $call_info:expr, $body:expr } => {
40 $body
41 };
42}