diff options
author | 2017-03-12 11:46:33 -0500 | |
---|---|---|
committer | 2017-03-12 11:47:15 -0500 | |
commit | 83945819af5a724ba9175fdc5e22b7c854a0fc14 (patch) | |
tree | 468db2846c873d880a870162a2c46abd1e340b47 /src/exception.rs | |
parent | 8fd028a8d68975d801ce01bfde5f76733c5be7a0 (diff) | |
download | cortex-m-83945819af5a724ba9175fdc5e22b7c854a0fc14.tar.gz cortex-m-83945819af5a724ba9175fdc5e22b7c854a0fc14.tar.zst cortex-m-83945819af5a724ba9175fdc5e22b7c854a0fc14.zip |
default exception handler: identify the exception that's being serviced
Diffstat (limited to 'src/exception.rs')
-rw-r--r-- | src/exception.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/exception.rs b/src/exception.rs index f5c8c28..f5b52f6 100644 --- a/src/exception.rs +++ b/src/exception.rs @@ -156,10 +156,13 @@ pub extern "C" fn default_handler<T>(_token: T) where T: Context, { - // This is the actual exception handler. `_sf` is a pointer to the previous + // This is the actual exception handler. `_sr` is a pointer to the previous // stack frame #[cfg(target_arch = "arm")] extern "C" fn handler(_sr: &StackedRegisters) -> ! { + // What exception is currently being serviced + let _e = Exception::current(); + ::asm::bkpt(); loop {} |