From 5868caf6dc1c08a70b6b83d6fd420ea2625cb408 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 15 Sep 2002 08:51:02 -0700 Subject: [PATCH] add dump_stack(): cross-arch backtrace From Christoph Hellwig, also present in 2.4. Create an arch-independent `dump_stack()' function. So we don't need to do #ifdef CONFIG_X86 show_stack(0); /* No prototype in scope! */ #endif any more. The whole dump_stack() implementation is delegated to the architecture. If it doesn't provide one, there is a default do-nothing library function. --- lib/dump_stack.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lib/dump_stack.c (limited to 'lib/dump_stack.c') diff --git a/lib/dump_stack.c b/lib/dump_stack.c new file mode 100644 index 000000000000..47c2728ab8c7 --- /dev/null +++ b/lib/dump_stack.c @@ -0,0 +1,13 @@ +/* + * Provide a default dump_stack() function for architectures + * which don't implement their own. + */ + +#include +#include + +void dump_stack(void) +{ + printk(KERN_NOTICE + "This architecture does not implement dump_stack()\n"); +} -- cgit v1.2.3