From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAOHw-0007D3-8b for qemu-devel@nongnu.org; Thu, 14 Apr 2011 11:16:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QAOHv-0006mq-4n for qemu-devel@nongnu.org; Thu, 14 Apr 2011 11:16:56 -0400 Received: from mail-bw0-f45.google.com ([209.85.214.45]:63229) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAOHu-0006lg-RH for qemu-devel@nongnu.org; Thu, 14 Apr 2011 11:16:54 -0400 Received: by bwz16 with SMTP id 16so1651442bwz.4 for ; Thu, 14 Apr 2011 08:16:52 -0700 (PDT) MIME-Version: 1.0 From: Amirali Shambayati Date: Thu, 14 Apr 2011 19:46:32 +0430 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Subject: [Qemu-devel] Problem in setting breakpoints at kernel code using "qemu and gdb" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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