diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-01-26 12:26:22 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-01-26 14:12:08 +0100 |
commit | 79c2f03aeed7b232592495f6af5fd94fbd102d25 (patch) | |
tree | 6ae59701dd9b70a838da5bf97745ee61fb316b26 /arch/arm/cpu/interrupts.c | |
parent | 641dfaa3a8a7c0b5cb2ba9fa8943ea2ff680e70f (diff) | |
download | barebox-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 'arch/arm/cpu/interrupts.c')
-rw-r--r-- | arch/arm/cpu/interrupts.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/cpu/interrupts.c b/arch/arm/cpu/interrupts.c index 3d2077f491..c4f911392a 100644 --- a/arch/arm/cpu/interrupts.c +++ b/arch/arm/cpu/interrupts.c @@ -73,6 +73,11 @@ void show_regs (struct pt_regs *regs) #endif } +void dump_stack(void) +{ + unwind_backtrace(NULL); +} + static void __noreturn do_exception(struct pt_regs *pt_regs) { show_regs(pt_regs); |