From: Jan Kiszka <jan.kiszka@siemens.com>
To: Matt Davis <mattdavis9@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: 64-bit Qemu and remote GDB to Kernel Error
Date: Tue, 05 Oct 2010 09:36:24 +0200 [thread overview]
Message-ID: <4CAAD578.2040706@siemens.com> (raw)
In-Reply-To: <AANLkTikvdTGmQsD944AUj-6ztvrdCqGQjD8Qs9mgrUXE@mail.gmail.com>
Am 04.10.2010 23:32, Matt Davis wrote:
> On Mon, Oct 4, 2010 at 8:00 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>> Am 04.10.2010 04:47, Matt Davis wrote:
>>> Hello,
>>> I am trying to debug a 32-bit linux kernel with gdb and qemu. My qemu
>>> runs the 64-bit kernel as:
>>> user@host> qemu -kernel vmlinuz -S -s (not using kvm). If I try with
>>> kvm the breakpoint does not even seem to get tripped.
>>
>> Which qemu version is affected by this issue?
>
> Jan,
> The version of qemu I am running is:
> QEMU PC emulator version 0.12.5 (qemu-kvm-0.12.5), Copyright (c)
> 2003-2008 Fabrice Bellard
>
> The version of gdb is: 7.2
>
OK, now I realize the reason of this effect: KVM uses software
breakpoints by default, i.e. it injects int3 into the guest code. If you
do this before the kernel was loaded, they will be overwritten by the
actual code later on. Use hardware breakpoints in case you want to trap
the guest early. Otherwise activate the breakpoints after the kernel was
loaded into RAM.
You don't have this limitation in emulation mode as, here, you can
modify the guest code transparently (effectively, all breakpoints are
hardware breakpoints then, and they are not limited in amount).
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
prev parent reply other threads:[~2010-10-05 7:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-04 2:47 [Qemu-devel] 64-bit Qemu and remote GDB to Kernel Error Matt Davis
2010-10-04 9:00 ` [Qemu-devel] " Jan Kiszka
2010-10-04 21:32 ` Matt Davis
2010-10-05 7:36 ` Jan Kiszka [this message]
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=4CAAD578.2040706@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=mattdavis9@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).