From: Jan Kiszka <jan.kiszka@siemens.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: kvm@vger.kernel.org
Subject: Re: kvm guest debug using gdb on x86
Date: Wed, 20 May 2009 11:41:41 +0200 [thread overview]
Message-ID: <4A13D055.5060101@siemens.com> (raw)
In-Reply-To: <20090520090438.GA15275@skywalker>
Aneesh Kumar K.V wrote:
> On Wed, May 20, 2009 at 10:57:21AM +0200, Jan Kiszka wrote:
>> Aneesh Kumar K.V wrote:
>>> On Wed, May 20, 2009 at 10:10:59AM +0200, Jan Kiszka wrote:
>>>> Aneesh Kumar K.V wrote:
>>>>> On Wed, May 20, 2009 at 12:23:12AM +0530, Aneesh Kumar K.V wrote:
>>>>>> Hi,
>>>>>>
>>>>>> With the latest qemu-kvm and 2.6.30-rc6 kernel i am not able to get
>>>>>> the guest debugging with gdb. I get the following error.
>>>>>>
>>>>>> $gdb ./vmlinux
>>>>>> GNU gdb 6.8-debian
>>>>>> Copyright (C) 2008 Free Software Foundation, Inc.
>>>>>> License GPLv3+: GNU GPL version 3 or later
>>>>>> <http://gnu.org/licenses/gpl.html>
>>>>>> This is free software: you are free to change and redistribute it.
>>>>>> There is NO WARRANTY, to the extent permitted by law. Type "show
>>>>>> copying"
>>>>>> and "show warranty" for details.
>>>>>> This GDB was configured as "i486-linux-gnu"...
>>>>>> (gdb) b do_fork
>>>>>> Breakpoint 1 at 0xc106cfc8: file kernel/fork.c, line 1347.
>>>>>> (gdb) target remote localhost:1234
>>>>>> Remote debugging using localhost:1234
>>>>>> [New Thread 1]
>>>>>> Remote 'g' packet reply is too long:
>>>>>> 7fa5000000000000000000000000000057e209c10000000004000000000000000000000000000000c8b3d0c100000000c03fd1c100000000a83fd1c10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000912d03c1000000000202000060000000680000007b0000007b000000d8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f60b801540000000000000000000007f030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
> 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
>> 00
>>>> 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000
>>>>>> (gdb)
>>>>>>
>>>>>> any patches that i can try ?
>>>>> Works better with the four patches found at
>>>>>
>>>>> http://git.kiszka.org/?p=kvm-userspace.git;a=shortlog;h=refs/heads/queues/gdb
>>>>>
>>>>> But a next and continue doesn't get the prompt back on gdb. The guest
>>>>> does stops the execution.
>>>> What arch is host and guest (x86-32 or -64)? What KVM versions are you
>>>> using? Are you sure that guest and vmlinux matches?
>>>>
>>> Both host and guest are x86-32. For kvm user space I did a git clone
>>> from git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git. I tested with
>>> commit 22d239bcee126742df46938ee8ddc7c6b9209e23. That version fails
>>> with the "remote g packet reply is too long" error. Then i applied the
>>> four patches from your git repo. That gets the guest to stop execution
>>> on breakpoint, i can check the stack. but single stepping doesn't work.
>>>
>>> Guest kernel I tried was linux-2.6-tip
>> Does debugging work with -no-kvm, ie. in TCG mode?
>
>
> Yes. debugging works with -no-kvm option. I can do single stepping.
>
Sigh, confirmed, there is a regression in qemu-kvm. Will dig into this.
Older kvm-userspace should be fine (e.g. the last version you can pull
from my tree).
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2009-05-20 9:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-19 18:53 kvm guest debug using gdb on x86 Aneesh Kumar K.V
2009-05-19 19:10 ` Aneesh Kumar K.V
2009-05-20 8:10 ` Jan Kiszka
2009-05-20 8:40 ` Aneesh Kumar K.V
2009-05-20 8:57 ` Jan Kiszka
2009-05-20 9:04 ` Aneesh Kumar K.V
2009-05-20 9:41 ` Jan Kiszka [this message]
2009-05-20 9:46 ` Jan Kiszka
2009-05-20 10:49 ` Avi Kivity
2009-05-21 7:54 ` Jan Kiszka
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=4A13D055.5060101@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=kvm@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.