Linux 内核堆栈打印函数
2013-11-11 23:09
423 查看
linux kernel 里面打印堆栈的函数
调用dump_stack()就会打印当前cpu的堆栈的调用函数了。参考内核源代码arch/x86_64/kernel/traps.c
/*
* The architecture-independent dump_stack generator
*/
void dump_stack(void)
{
unsigned long dummy;
show_trace(&dummy);
}
/*
* When in-kernel, we also print out the stack and code at the
* time of the fault..
*/
if (in_kernel) {
printk("Stack: ");
show_stack(NULL, (unsigned long*)rsp);
相关文章推荐
- 在linux代码中打印函数调用的堆栈的方法
- Linux内核打印函数printk的使用说明
- linux打印函数调用堆栈
- Linux中打印函数堆栈
- Linux调用backtrack函数打印程序崩溃时的调用堆栈
- 在Linux中打印函数调用堆栈【原创】
- Linux0.11 由进程睡眠函数sleep_on()中的堆栈变量tmp引发的思考 关于进程内核堆栈
- 如何打印内核调用堆栈及函数名
- Linux调用backtrack函数打印程序崩溃时的调用堆栈
- Linux下使用函数打印程序堆栈错误的方法
- Linux调用backtrack函数打印程序崩溃时的调用堆栈
- 在linux代码中打印函数调用的堆栈的方法
- 在Linux中打印函数调用堆栈(一)
- Linux调用backtrack函数打印程序崩溃时的调用堆栈
- 在linux代码中打印函数调用的堆栈的方法
- 在Linux中打印函数调用堆栈(一)
- Linux调用backtrack函数打印程序崩溃时的调用堆栈
- linux 用户空间 和 内核空间 延时函数
- 一步一步学习 Linux 驱动之内核中断函数 request_irq
- Linux程序异常退出打印调用堆栈