qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: 64-bit Qemu and remote GDB to Kernel Error


From: Jan Kiszka
Subject: [Qemu-devel] Re: 64-bit Qemu and remote GDB to Kernel Error
Date: Tue, 05 Oct 2010 09:36:24 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

Am 04.10.2010 23:32, Matt Davis wrote:
> On Mon, Oct 4, 2010 at 8:00 PM, Jan Kiszka <address@hidden> 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:
>>> address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]