Skip to content

Commit

Permalink
Only enable for exception-handler
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Aug 29, 2024
1 parent 2f6b411 commit 139dbe1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions esp-backtrace/src/riscv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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!(
Expand Down

0 comments on commit 139dbe1

Please sign in to comment.