* aa-010-show_stack
@ 2002-03-20 3:54 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2002-03-20 3:54 UTC (permalink / raw)
To: lkml
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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-03-20 3:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-20 3:54 aa-010-show_stack Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox