From: Jan Kiszka <jan.kiszka@siemens.com>
To: Jun Koi <junkoi2004@gmail.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: Problem with watchpoint in gdbstub
Date: Tue, 27 Apr 2010 12:22:08 +0200 [thread overview]
Message-ID: <4BD6BAD0.2050903@siemens.com> (raw)
In-Reply-To: <i2hfdaac4d51004270240zc65d1896w2ecd9367afb3c86c@mail.gmail.com>
Jun Koi wrote:
> On Tue, Apr 27, 2010 at 6:30 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>> Jun Koi wrote:
>>> On Tue, Apr 27, 2010 at 5:10 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>>> Jun Koi wrote:
>>>>> Hi,
>>>>>
>>>>> I am trying to debug a VM using gdb. I connected gdb to Qemu (latest
>>>>> code from git repo), and issued below command:
>>>>>
>>>>> ...
>>>>> (gdb) watch *0x77f44cd8
>>>>> (gdb) c
>>>>>
>>>>> The idea is to catch the write access to address 0x77f44cd8.
>>>>>
>>>>> But after the "c" command, I saw that the window title of my VM
>>>>> continuously flip between "QEMU [Stopped]" and "QEMU", non-stop.
>>>>> This makes the VM unusable.
>>>>>
>>>>> Is it a bug? Anybody sees the same problem?
>>>> I would bet your watchpoint was established by gdb as a software
>>>> watchpoint. In that case gdb will step through the target, checking
>>>> after each instruction if the memory changed.
>>> But that is certainly not the reason of the symptom I saw.
>>>
>> So what does "i b" report about your watchpoint? Hard or soft?
>
> It says nothing about hard or soft: it just reports I have one watchpoint.
It would report "hardware watchpoint" for a hard one. Just "watchpoint"
means it's emulated and will cause the stop-and-go you see.
>
>>>> Is that address valid at the time gdb wants to install it? I saw gdb
>>>> choosing a software watchpoint before when it wasn't.
>>> Yes, that address is valid.
>> You could also try "set debug remote 1" to see what gdb does when it
>> stops and resumes the guest continuously.
>
> Ah I dont know this, thanks!
>
> And now I can see that gdb repeatedly sends a lot of commands to Qemu.
> All the repeated messages look like a copy of the below text. Do you
> have any idea?
>
> .....
> Sending packet: $m77f44cd2,4#02...Ack
> Packet received: E14
E14 here means that the memory cannot be read. So it is in fact a
non-visible address at the time you try to set the watchpoint.
> Sending packet: $vCont;s:1;c#c1...Ack
> Packet received: T05thread:01;
> Sending packet: $g#67...Ack
> Packet received:
> 080000002400000015a6517702a6517774e1a902b0e1a902981e11006ba651774b63e877970200001b0000002300000023000000230000003b0000000000000000000000af4e0b0000001a040000405100005c936bca0800864d0000d1e95e8f000000000000ce4bf207000048f807000000000000000000000000000000000000c0e1c71040cd9c99999999c9cc19407f02000000010000000000000000000000000000000000000000000000000000db01917c000000000000000040607a60661b0000820d00000d010000000000001904000000000000000000000000000000000000000000000000000000000000f65c000000000000f7010000e50800000000000075000000000000000a000000380000002f060000050000001e00000000000000000000000000000000000000801f0000
> .....
>
>
> Thanks,
> J
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
prev parent reply other threads:[~2010-04-27 10:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-26 5:31 [Qemu-devel] Problem with watchpoint in gdbstub Jun Koi
2010-04-27 8:10 ` [Qemu-devel] " Jan Kiszka
2010-04-27 9:12 ` Jun Koi
2010-04-27 9:30 ` Jan Kiszka
2010-04-27 9:40 ` Jun Koi
2010-04-27 10:22 ` 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=4BD6BAD0.2050903@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=junkoi2004@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).