Steward
分享是一種喜悅、更是一種幸福
驅動程式 - Linux Device Driver(LDD) - 如何定位Crash的副程式
問題如下:
[ 2.929235] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020 [ 2.940103] Oops [#1] [ 2.943239] Modules linked in: [ 2.947374] CPU: 0 PID: 1 Comm: swapper Not tainted 5.4.61 #53 [ 2.954404] sepc: ffffffe000202500 ra : ffffffe0001f5eb0 sp : ffffffe0028539a0 [ 2.963619] gp : ffffffe00050d410 tp : ffffffe002848000 t0 : 0000000000000000 [ 2.972826] t1 : 0000000000000000 t2 : 0000000000000006 s0 : ffffffe0028539e0 [ 2.982044] s1 : ffffffe00052b080 a0 : ffffffe00041eb30 a1 : ffffffe00039ac68 [ 2.991253] a2 : ffffffe0002024cc a3 : 0000000000000140 a4 : 0000000000000000 [ 3.000456] a5 : 0000000000000000 a6 : 0000000000000000 a7 : 00000000000000f0 [ 3.009675] s2 : ffffffe002b8f850 s3 : ffffffe002b8f800 s4 : ffffffe002b8f850 [ 3.018888] s5 : ffffffe002b8fb20 s6 : 0000000000000000 s7 : ffffffe0004c0bb0 [ 3.028101] s8 : 0000000000000100 s9 : ffffffe0004c0b50 s10: ffffffe000000280 [ 3.037308] s11: 0000000000000000 t3 : 0000000500000000 t4 : 0000000000000000 [ 3.046495] t5 : 0000000000000000 t6 : ffffffe002b8f8f0 [ 3.052969] sstatus: 0000000200000120 sbadaddr: 0000000000000020 scause: 000000000000000d [ 3.063247] ---[ end trace 008a775de4a17d6a ]--- [ 3.069000] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b [ 3.078714] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]---
定位方式:
$ riscv64-unknown-linux-gnu-addr2line -e vmlinux -fip 0xffffffe000202500
myfb_pan_display at st7789.c:?