All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: lkml <linux-kernel@vger.kernel.org>
Subject: aa-010-show_stack
Date: Tue, 19 Mar 2002 19:54:26 -0800	[thread overview]
Message-ID: <3C9807F2.B6A8ACFA@zip.com.au> (raw)



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)

                 reply	other threads:[~2002-03-20  3:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C9807F2.B6A8ACFA@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.