我正在调试我的 linux 内核模块。它会导致死锁,我正试图弄清楚如何。我正在使用vmware
+ gdb
。这个想法是挂钩函数并将回溯记录到文件中。我正在尝试以下操作:
(gdb) br _raw_spin_lock
Breakpoint 5 at 0xffffffff815eb700: file kernel/spinlock.c, line 136.
(gdb) commands 5
Type commands for breakpoint(s) 5, one per line.
End with a line saying just "end".
>silent
>bt
>continue
>end
但continue
在这里不起作用。如果我bt
用它代替echo 1
它。每次调用函数时有没有办法记录信息?
谢谢你。