From 139dbe149ec18e5e680f6294e865adc2aaf937a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Thu, 29 Aug 2024 16:35:44 +0200 Subject: [PATCH] Only enable for exception-handler --- esp-backtrace/src/riscv.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esp-backtrace/src/riscv.rs b/esp-backtrace/src/riscv.rs index 56e713fca9a..9c20924849f 100644 --- a/esp-backtrace/src/riscv.rs +++ b/esp-backtrace/src/riscv.rs @@ -15,7 +15,7 @@ pub(super) const RA_OFFSET: usize = 4; #[derive(Default, Clone, Copy)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] #[repr(C)] -#[cfg(any(feature = "panic-handler", feature = "exception-handler"))] +#[cfg(feature = "exception-handler")] pub(crate) struct TrapFrame { /// Return address, stores the address to return to after a function call or /// interrupt. @@ -103,7 +103,7 @@ pub(crate) struct TrapFrame { pub mtval: usize, } -#[cfg(any(feature = "panic-handler", feature = "exception-handler"))] +#[cfg(feature = "exception-handler")] impl core::fmt::Debug for TrapFrame { fn fmt(&self, fmt: &mut core::fmt::Formatter<'_>) -> Result<(), core::fmt::Error> { write!(