aa-010-show_stack

Andrew Morton (akpm@zip.com.au)
Tue, 19 Mar 2002 19:54:26 -0800


Lamely provides a generic interface to show_stack() for those
architectures which have an appropriate implementation.

The alternative of course is to just take out Andrea's debug calls to
show_stack(). But it would be nice to have an arch-independent way of
spitting out a stack trace.

=====================================

--- 2.4.19-pre3/include/linux/kernel.h~aa-010-show_stack Tue Mar 19 19:48:52 2002
+++ 2.4.19-pre3-akpm/include/linux/kernel.h Tue Mar 19 19:48:52 2002
@@ -106,6 +106,17 @@ extern int oops_in_progress; /* If set,
extern int tainted;
extern const char *print_tainted(void);

+/*
+ * show_stack() differs across architectures. If it exists, and takes
+ * an unsigned long * then it can be used here.
+ */
+#if defined(CONFIG_X86) || defined(CONFIG_MIPS) || defined(CONFIG_ARCH_S390)
+extern void show_stack(unsigned long *);
+#define arch_show_stack(p) show_stack(p)
+#else
+#define arch_show_stack(p) printk("show_stack() unsupported\n");
+#endif
+
#if DEBUG
#define pr_debug(fmt,arg...) \
printk(KERN_DEBUG fmt,##arg)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/