我想生成一個堆棧跟蹤報告,就像內核oops生成的報告一樣。如何在自己的內核模塊中生成堆棧跟蹤
------------[ cut here ]------------
kernel BUG at /home/administrator/project/systech/bsp_tan/linux-.2.6/arch/arm/include/asm/dma-mapping.h:325!
Internal error: Oops - undefined instruction: 0 [#1] PREEMPT
Modules linked in:
CPU: 0 Not tainted (3.2.6 #67)
PC is at my_func+0x118/0x230
LR is at vprintk+0x3bc/0x440
在那裏的定義以及如何我可以與模塊中觸發它。
EDIT 1
如何尋找到PC(程序計數器)是當這種錯誤發生的行號。
PC is at my_func + 0x118/0x230
這是什麼意思?
在此先感謝。
嘗試'dump_stack()'函數... – 2013-05-15 14:28:17