aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md5
-rw-r--r--src/exception.rs5
2 files changed, 9 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ab28447..8f95aba 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
+### Changed
+
+- The default exception handler now identifies the exception that's being
+ serviced.
+
## [v0.2.0] - 2017-03-11
### Added
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 {}