From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Eu6AV-0003iZ-7s for qemu-devel@nongnu.org; Wed, 04 Jan 2006 05:47:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Eu66B-00039p-FH for qemu-devel@nongnu.org; Wed, 04 Jan 2006 05:42:34 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Eu646-0002z1-Pz for qemu-devel@nongnu.org; Wed, 04 Jan 2006 05:40:23 -0500 Received: from [66.54.152.27] (helo=jive.SoftHome.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1Eu65U-00022E-CP for qemu-devel@nongnu.org; Wed, 04 Jan 2006 05:41:48 -0500 From: Mulyadi Santosa Subject: Re: Re: Re: [Qemu-devel] [PATCH] Fix to gdb - wrong translation block invalidated when setting gdb breakpoints Date: Wed, 4 Jan 2006 17:29:40 +0700 References: <16af12af0512231157n4efb01eemd4afbca65dea9d4@mail.gmail.com> <200601011510.20548.a_mulyadi@softhome.net> <16af12af0601031212g2ffb9fa0xc1c154aaf8eb46cf@mail.gmail.com> In-Reply-To: <16af12af0601031212g2ffb9fa0xc1c154aaf8eb46cf@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601041729.40750.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 Hi Andre... > The problem that you are running into here is that sys_uname has been > replaced by sys_newuname in kernel/sys.c. When I put a breakpoint in > this function, everything works correctly when I run uname in the > virtual machine. yes, you're right. sys_newuname is the system call handler that handles "uname" in kernel space, as it is confirmed with eax=122 when we reach system_call entry in arch/i386/kernel/entry.S. Thanks for pointing me into the correct handler. > I'm not sure I exactly understand your concern that breakpoints could > be missed. When you set the breakpoint, tb_invalidate_phys_page_range > is called, invalidating the translation block block for the address > where you are placing the breakpoint. At this point, the next time > that the address is hit, translate.c:gen_intermediate_code will have > to be called, and the breakpoint will be hit. Let me know if I've > missed something here. I'm not 100% sure too, but maybe I need to confirm what I understand about "translation block" in Qemu. Suppose we have following asm snippet: <....> mov eax,8 mov ebx,10 move ecx,16 ret <....> When qemu check the above codes, I learn that it is converted into a single translation block ("ret" is the end mark of the translation block). Do I get something wrong here? Please CMIIW. regards Mulyadi