summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-01-26 12:26:22 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-01-26 14:12:08 +0100
commit79c2f03aeed7b232592495f6af5fd94fbd102d25 (patch)
tree6ae59701dd9b70a838da5bf97745ee61fb316b26 /lib
parent641dfaa3a8a7c0b5cb2ba9fa8943ea2ff680e70f (diff)
downloadbarebox-79c2f03aeed7b232592495f6af5fd94fbd102d25.tar.gz
barebox-79c2f03aeed7b232592495f6af5fd94fbd102d25.tar.xz
Add dump_stack function
At least ARM allows us to dump the stack, but we currently have no prototype for this. Add a dump_stack prototype and provide a static inline function for architectures without stack dump support. Also, call dump_stack() in panic() to provide more information in the case of a panic. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/vsprintf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 4165f97485..9763515130 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -625,6 +625,8 @@ void __noreturn panic(const char *fmt, ...)
putchar('\n');
va_end(args);
+ dump_stack();
+
led_trigger(LED_TRIGGER_PANIC, TRIGGER_ENABLE);
#if defined (CONFIG_PANIC_HANG)