diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2012-01-25 09:57:59 +0100 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2012-02-22 08:33:26 +0100 |
commit | b4eab599513324dcaffa4c5693345ae11f3f9725 (patch) | |
tree | 58d66298269d2cec58102724565b573f250b5153 /firmware/export | |
parent | 680c6fcde1eabb45dd12c59718d708b2cda61f6a (diff) |
Arm stack unwinder
Simplified stack unwinder for ARM. This is port of
http://www.mcternan.me.uk/ArmStackUnwinding/
backtrace() is called from UIE() on native targets
and from panicf() on both native and ARM RaaA.
Change-Id: I8e4b3c02490dd60b30aa372fe842d193b8929ce0
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/panic.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/firmware/export/panic.h b/firmware/export/panic.h index b0325aaeb7..7767c675cf 100644 --- a/firmware/export/panic.h +++ b/firmware/export/panic.h @@ -22,8 +22,12 @@ #ifndef __PANIC_H__ #define __PANIC_H__ +#include "config.h" #include "gcc_extensions.h" +#if defined(CPU_ARM) +void panicf( const char *fmt, ... ) __attribute__ ((naked)) ATTRIBUTE_PRINTF(1, 2); +#else void panicf( const char *fmt, ... ) ATTRIBUTE_PRINTF(1, 2); - +#endif #endif /* __PANIC_H__ */ |