一、内核中
To print the stack contents and a backtrace to the kernel log, use the
#include <linux/kernel.h>
dump_stack();
二、应用
ref:
linux device driver - How to include C backtrace in a kernel module code? - Stack Overflow
To print the stack contents and a backtrace to the kernel log, use the
#include <linux/kernel.h>
dump_stack();
ref:
linux device driver - How to include C backtrace in a kernel module code? - Stack Overflow