oops調試

當kernel oops後

$ objdump -d blk-core.o | head
$ grep blk_queue_congestion_threshold /boot/System.map-2.6.39
$ objdump --source -d --adjust-vma=0xc11ac9d4 blk-core.o > /tmp/log

或者這樣

# gdb vmlinux
(gdb) disassemble blk_run_queue
Dump of assembler code for function blk_run_queue:
0xc1242270 : push %ebp
0xc1242271 : mov %esp,%ebp
0xc1242273 : sub $0x8,%esp
0xc1242276 : mov %ebx,(%esp)
0xc1242279 : mov %eax,%ebx
0xc124227b : mov %esi,0x4(%esp)
0xc124227f : mov 0x220(%eax),%eax
0xc1242285 : call 0xc1661b60 <_raw_spin_lock_irqsave>
0xc124228a : mov %eax,%esi
0xc124228c : mov %ebx,%eax
0xc124228e : call 0xc123f890 <__blk_run_queue>
0xc1242293 : mov 0x220(%ebx),%eax
0xc1242299 : mov %esi,%edx
0xc124229b : call 0xc1661ba0 <_raw_spin_unlock_irqrestore>
0xc12422a0 : mov (%esp),%ebx
0xc12422a3 : mov 0x4(%esp),%esi
0xc12422a7 : mov %ebp,%esp
0xc12422a9 : pop %ebp
0xc12422aa : ret
End of assembler dump.
(gdb)

另外~/git/home/source/linux/linux-3.1/Documentation/oops-tracing.txt還有建議:

cat /proc/kmsg #無限輸出
vga=791
# make block/blk-core.s
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CC block/blk-core.s
#

我的建議有: gnome-terminal滾動設成無限

# echo 3 > /sys/devices/virtual/graphics/fbcon/rotate