diff options
| author | Andrew Morton <akpm@digeo.com> | 2002-09-15 08:51:02 -0700 |
|---|---|---|
| committer | Christoph Hellwig <hch@hera.kernel.org> | 2002-09-15 08:51:02 -0700 |
| commit | 5868caf6dc1c08a70b6b83d6fd420ea2625cb408 (patch) | |
| tree | ddced02f234e94683751dc4bd950252afb9916f1 /lib/dump_stack.c | |
| parent | 5045fffee2bc26ae466cba26769be2a989fb0797 (diff) | |
[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.
Diffstat (limited to 'lib/dump_stack.c')
| -rw-r--r-- | lib/dump_stack.c | 13 |
1 files changed, 13 insertions, 0 deletions
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 <linux/kernel.h> +#include <linux/module.h> + +void dump_stack(void) +{ + printk(KERN_NOTICE + "This architecture does not implement dump_stack()\n"); +} |
