Dear all, I want to use combination of qemu and gdb to debug my modified linux kernel code. First I tried this link:http://issaris.blogspot.com/2007/12/download-linux-kernel-sourcecode-from.html to configure eclipse CDT and qemu to achieve my goal.
According to the tutorial, I tried following command to run qemu: sudo qemu -s -S -hda linux-0.2.img -append "root=/dev/sda" -kernel /mnt/build/linux-2.6/arch/x86/boot/bzImage As I used my modified kernel code, I encountered with kernel oops; So I tried to find the related code line which causes problem, using breakpoints. Now my problem is, when I set breakpoints before start debugging in eclipse, it seems that it ignores breakpoints and kernel goes to oops condition again. Also I tried combination of gdb and qemu using following commands: #gdb (gdb) symbol-file vmlinux.o (gdb) target remote localhost:1234 (gdb) break scsi_lib.c 1420 (gdb) c I tried above commands to check if stops at breakpoint or not. I put a printk after breakpoint line. It printed it and it means that it has ignored breakpoint. Would you guide me what is wrong with what I have done? It's related to my thesis project, and I need to pass this step as soon as possible. Thanks in advance, -- Amirali Shambayati Bachelor Student Computer Engineering Department Sharif University of Technology Tehran, Iran