Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DqXgi-0004bK-77 for qemu-devel@nongnu.org; Thu, 07 Jul 2005 10:49:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DqXgf-0004Zj-Fw for qemu-devel@nongnu.org; Thu, 07 Jul 2005 10:49:14 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DqXge-0004Yx-R5 for qemu-devel@nongnu.org; Thu, 07 Jul 2005 10:49:12 -0400 Received: from [81.103.221.47] (helo=mta07-winn.ispmail.ntl.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DqXlI-0003LJ-8l for qemu-devel@nongnu.org; Thu, 07 Jul 2005 10:54:00 -0400 Received: from aamta09-winn.ispmail.ntl.com ([81.103.221.35]) by mta07-winn.ispmail.ntl.com with ESMTP id <20050707144717.BNNA481.mta07-winn.ispmail.ntl.com@aamta09-winn.ispmail.ntl.com> for ; Thu, 7 Jul 2005 15:47:17 +0100 Received: from phoenix.frop.org ([80.4.6.170]) by aamta09-winn.ispmail.ntl.com with ESMTP id <20050707144717.XKMX5558.aamta09-winn.ispmail.ntl.com@phoenix.frop.org> for ; Thu, 7 Jul 2005 15:47:17 +0100 From: Julian Seward Date: Thu, 7 Jul 2005 15:47:23 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200507071547.24045.julian@valgrind.org> Subject: [Qemu-devel] Valgrinding QEMU 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 As of today, the Valgrind 3 development line supports applications which use self-modifying code on x86 and amd64. So it may now be possible to use Valgrind to debug/profile an unmodified build of QEMU (at least the softmmu variants). See http://www.valgrind.org/devel/cvs_svn.html for details of how to check out and build the 3 line -- it's easy. If anybody tries this I would be interested to hear the results. J ---------- Forwarded Message ---------- Subject: [Valgrind-developers] valgrind: r4122 - trunk/coregrind Date: Thursday 07 July 2005 11:05 From: svn@valgrind.org To: valgrind-developers@lists.sourceforge.net Author: sewardj Date: 2005-07-07 11:05:05 +0100 (Thu, 07 Jul 2005) New Revision: 4122 Log: Support for self modifying code on unfriendly platforms (x86, amd64) via the use of self-checking translations. (Friendly platforms which have icache-invalidation instructions we can observe, such as ppc32, are already handled correctly.) This should finally fix the longstanding problem of V incorrectly handling calls of statically nested functions (a gcc extension), and more generally make it a lot easier to use V to debug dynamic code generation systems. Since self-checking is a large performance overhead, there is some control via a command line flag: --smc-support=none Don't make any translations self-checking. --smc-support=stack Add checking code for translations taken from segments which have the SF_GROWDOWN flag set -- stacks, basically. This is the default. It should make gcc nested functions and GNU Ada work correctly with no intervention from the user. --smc-support=all Make all translations self-checking. This is expensive and you want to do this if you're debugging a JIT compiler or some such. Modified: trunk/coregrind/m_main.c trunk/coregrind/m_options.c trunk/coregrind/m_translate.c trunk/coregrind/m_transtab.c trunk/coregrind/pub_core_options.h trunk/coregrind/pub_core_transtab.h [... diff deleted ...]