From: Amirali Shambayati <amirali.shambayati@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Problem in setting breakpoints at kernel code using "qemu and gdb"
Date: Thu, 14 Apr 2011 19:46:32 +0430 [thread overview]
Message-ID: <BANLkTi=FsjMyeV29Pq3bLZ7uhuiBTKtV_A@mail.gmail.com> (raw)
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
next reply other threads:[~2011-04-14 15:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-14 15:16 Amirali Shambayati [this message]
2011-04-15 5:38 ` [Qemu-devel] Problem in setting breakpoints at kernel code using "qemu and gdb" Craig Brozefsky
2011-04-15 10:39 ` Amirali Shambayati
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTi=FsjMyeV29Pq3bLZ7uhuiBTKtV_A@mail.gmail.com' \
--to=amirali.shambayati@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).