From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EsyRX-0001Nu-IG for qemu-devel@nongnu.org; Sun, 01 Jan 2006 03:19:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EsyRV-0001Mb-9q for qemu-devel@nongnu.org; Sun, 01 Jan 2006 03:19:54 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EsyRU-0001MX-NW for qemu-devel@nongnu.org; Sun, 01 Jan 2006 03:19:52 -0500 Received: from [66.54.152.27] (helo=jive.SoftHome.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1EsySK-0003iY-Jd for qemu-devel@nongnu.org; Sun, 01 Jan 2006 03:20:44 -0500 From: Mulyadi Santosa Subject: Re: Re: [Qemu-devel] [PATCH] Fix to gdb - wrong translation block invalidated when setting gdb breakpoints Date: Sun, 1 Jan 2006 15:10:20 +0700 References: <16af12af0512231157n4efb01eemd4afbca65dea9d4@mail.gmail.com> <200512281522.35505.a_mulyadi@softhome.net> <16af12af0512301218k48fecbdcr6ec41640b303689@mail.gmail.com> In-Reply-To: <16af12af0512301218k48fecbdcr6ec41640b303689@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601011510.20548.a_mulyadi@softhome.net> Reply-To: a_mulyadi@softhome.net, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andre Pech Cc: qemu-devel@nongnu.org Hello Andre... > Not a problem. I only started using qemu a month ago, so it took me a > while to get oriented in the code and understand what was going on. I > must say that I've been really impressed with qemu so far. There was an interesting case I had found recently. In Linux kernel for i386 arch, you will see that sys_uname is placed to return kernel version/name. Funny thing is, even if I use your patch (against qemu 0.7.1) and I put a breakpoint at sys_uname and issue "uname" at bash prompt, the Qemu VM doesn't stop. Can you kindly check it? NB: Please see target-i386/translate.c, there you will see lines like these (around line 6306): if (env->nb_breakpoints > 0) { for(j = 0; j < env->nb_breakpoints; j++) { if (env->breakpoints[j] == pc_ptr) { gen_debug(dc, pc_ptr - dc->cs_base); break; } } } What I understand from this code is, VM is stop if breakpoint address matches with pc_ptr, which tb->pc and AFAIK that is the start address of the translation block. So in other word, in some cases Qemu might still miss the breakpoint (does it explain the sys_uname case?) Please CMIIW regards Mulyadi