From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IV2qd-000745-4F for qemu-devel@nongnu.org; Tue, 11 Sep 2007 06:19:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IV2qa-0006z3-CH for qemu-devel@nongnu.org; Tue, 11 Sep 2007 06:19:57 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IV2qa-0006yr-64 for qemu-devel@nongnu.org; Tue, 11 Sep 2007 06:19:56 -0400 Received: from phoenix.bawue.net ([193.7.176.60] helo=mail.bawue.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IV2qZ-0001ao-Nk for qemu-devel@nongnu.org; Tue, 11 Sep 2007 06:19:56 -0400 Date: Tue, 11 Sep 2007 11:03:06 +0100 From: Thiemo Seufer Subject: Re: [Qemu-devel] Problems with MIPS full system emulation and breakpoints Message-ID: <20070911100306.GD10713@networkno.de> References: <4629005B.7030301@windriver.com> <20070420182209.GA18563@caradoc.them.org> <20070910153448.GA2747@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070910153448.GA2747@caradoc.them.org> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Daniel Jacobowitz Cc: qemu-devel@nongnu.org Daniel Jacobowitz wrote: > On Fri, Apr 20, 2007 at 02:22:09PM -0400, Daniel Jacobowitz wrote: > > 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? > > It won't help because that problem related to "hardware" breakpoints > through QEMU's gdb stub. > > The attached patch fixes that, and Jason's issue, and probably the > FPU emulation issue also. It fixes the FPU emulation problem. > The real problem was "tb->size = 0" in the > search_pc case. Alpha, ARM, m68k, mips, ppc, sh4, and sparc all > did this. But it can't be right - the tb passed when searching for a > pc is in the cache, and clearing its size prevents it from being > flushed properly. > > I got a couple of strange oopses after this, and one unidentified > lockup. I don't think they are related, though. Works fine for me. Thiemo