From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HexpT-0006ZA-Mt for qemu-devel@nongnu.org; Fri, 20 Apr 2007 14:27:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HexpR-0006X4-RL for qemu-devel@nongnu.org; Fri, 20 Apr 2007 14:27:30 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HexpR-0006Wi-E1 for qemu-devel@nongnu.org; Fri, 20 Apr 2007 14:27:29 -0400 Received: from return.false.org ([66.207.162.98]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HexkL-00070c-KV for qemu-devel@nongnu.org; Fri, 20 Apr 2007 14:22:13 -0400 Received: from return.false.org (localhost [127.0.0.1]) by return.false.org (Postfix) with ESMTP id E0DE54B26F for ; Fri, 20 Apr 2007 13:22:10 -0500 (CDT) Received: from caradoc.them.org (dsl093-172-095.pit1.dsl.speakeasy.net [66.93.172.95]) by return.false.org (Postfix) with ESMTP id B80454B26D for ; Fri, 20 Apr 2007 13:22:10 -0500 (CDT) Received: from drow by caradoc.them.org with local (Exim 4.63) (envelope-from ) id 1HexkH-0004py-Di for qemu-devel@nongnu.org; Fri, 20 Apr 2007 14:22:09 -0400 Date: Fri, 20 Apr 2007 14:22:09 -0400 From: Daniel Jacobowitz Subject: Re: [Qemu-devel] Problems with MIPS full system emulation and breakpoints Message-ID: <20070420182209.GA18563@caradoc.them.org> References: <4629005B.7030301@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4629005B.7030301@windriver.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Fri, Apr 20, 2007 at 01:03:07PM -0500, Jason Wessel wrote: > At this point the program is trashed on the second time through the loop > because the translated block with the breakpoint op code was executed instead > of being flushed and translated with the correct original > instruction. I have an idea. When I was talking to Paul about breakpoints recently, I noticed something very strange in the ARM port: it continues to disassemble the instruction under a breakpoint after generating the debug op. This is a waste of CPU and memory, so I tried taking it out - but he told me that if I did that, things would go wrong because the size of the tb would be too small. We'd try to flush the tb at the breakpoint location, but it wouldn't seem to cover there. MIPS doesn't do that extra disassembly because it has a goto instead of a break from the nested loop. What happens if you add an extra +1 to the translation block size if there's a breakpoint, in target-mips/translate.c? -- Daniel Jacobowitz CodeSourcery