blob: 53bad099ebd6310cf5dfac7dc7ae44fc85df82c8 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Provide a default dump_stack() function for architectures
3 * which don't implement their own.
4 */
5
6#include <linux/kernel.h>
Paul Gortmaker8bc3bcc2011-11-16 21:29:17 -05007#include <linux/export.h>
Tejun Heo196779b2013-04-30 15:27:12 -07008#include <linux/sched.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07009
Tejun Heo196779b2013-04-30 15:27:12 -070010/**
11 * dump_stack - dump the current task information and its stack trace
12 *
13 * Architectures can override this implementation by implementing its own.
14 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070015void dump_stack(void)
16{
Tejun Heo196779b2013-04-30 15:27:12 -070017 dump_stack_print_info(KERN_DEFAULT);
18 show_stack(NULL, NULL);
Linus Torvalds1da177e2005-04-16 15:20:36 -070019}
Linus Torvalds1da177e2005-04-16 15:20:36 -070020EXPORT_SYMBOL(dump_stack);