From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6h7V-00037T-UL for qemu-devel@nongnu.org; Tue, 27 Apr 2010 05:30:22 -0400 Received: from [140.186.70.92] (port=49742 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6h7R-00036g-1p for qemu-devel@nongnu.org; Tue, 27 Apr 2010 05:30:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6h7J-0004gn-5p for qemu-devel@nongnu.org; Tue, 27 Apr 2010 05:30:16 -0400 Received: from david.siemens.de ([192.35.17.14]:17290) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6h7I-0004gS-QG for qemu-devel@nongnu.org; Tue, 27 Apr 2010 05:30:09 -0400 Message-ID: <4BD6AE9C.2060704@siemens.com> Date: Tue, 27 Apr 2010 11:30:04 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <4BD69C10.50606@siemens.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: Problem with watchpoint in gdbstub List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jun Koi Cc: "qemu-devel@nongnu.org" Jun Koi wrote: > On Tue, Apr 27, 2010 at 5:10 PM, Jan Kiszka 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? > >> 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. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux