From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lt8IJ-0006u2-QO for qemu-devel@nongnu.org; Sun, 12 Apr 2009 18:36:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lt8IF-0006sJ-AU for qemu-devel@nongnu.org; Sun, 12 Apr 2009 18:36:55 -0400 Received: from [199.232.76.173] (port=55910 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lt8IF-0006sF-3N for qemu-devel@nongnu.org; Sun, 12 Apr 2009 18:36:51 -0400 Received: from mtaout02-winn.ispmail.ntl.com ([81.103.221.48]:3705) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lt8IE-0000xV-LX for qemu-devel@nongnu.org; Sun, 12 Apr 2009 18:36:50 -0400 Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20090412223649.WJZS4080.mtaout02-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com> for ; Sun, 12 Apr 2009 23:36:49 +0100 Received: from miranda.arrow ([213.107.22.181]) by aamtaout02-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20090412223649.GRTH21638.aamtaout02-winn.ispmail.ntl.com@miranda.arrow> for ; Sun, 12 Apr 2009 23:36:49 +0100 Received: from sdb by miranda.arrow with local (Exim 4.63) (envelope-from ) id 1Lt8Ib-0003CR-Qx for qemu-devel@nongnu.org; Sun, 12 Apr 2009 23:37:13 +0100 Date: Sun, 12 Apr 2009 23:37:13 +0100 From: Stuart Brady Message-ID: <20090412223713.GA12258@miranda.arrow> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] Add a --enable-debug-tcgv option to configure 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 This patch allows DEBUG_TCGV to be defined by passing an option to the configure script. This should help to prevent any accidental changes that enable DEBUG_TCGV in tcg/tcg.h from being committed in future, and may help to encourage testing with DEBUG_TCGV enabled. (My thinking being that it would often be handy to use two build directories, one for building with DEBUG_TCGV enabled and one for building without DEBUG_TCGV enabled, as this would avoid the need to edit tcg/tcg.h.) Signed-off-by: Stuart Brady Index: tcg/tcg.h =================================================================== --- tcg/tcg.h (revision 7095) +++ tcg/tcg.h (working copy) @@ -21,6 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ +#include "qemu-common.h" #include "tcg-target.h" #if TCG_TARGET_REG_BITS == 32 @@ -120,8 +121,6 @@ are aliases for target_ulong and host pointer sized values respectively. */ -//#define DEBUG_TCGV 1 - #ifdef DEBUG_TCGV typedef struct Index: configure =================================================================== --- configure (revision 7095) +++ configure (working copy) @@ -153,6 +153,7 @@ ;; esac gprof="no" +debug_tcgv="no" sparse="no" strip_opt="yes" bigendian="no" @@ -394,6 +395,10 @@ ;; --audio-drv-list=*) audio_drv_list="$optarg" ;; + --enable-debug-tcgv) debug_tcgv="yes" + ;; + --disable-debug-tcgv) debug_tcgv="no" + ;; --enable-sparse) sparse="yes" ;; --disable-sparse) sparse="no" @@ -562,6 +567,8 @@ echo " --make=MAKE use specified make [$make]" echo " --install=INSTALL use specified install [$install]" echo " --static enable static build [$static]" +echo " --enable-debug-tcgv enable TCGv debugging" +echo " --disable-debug-tcgv disable TCGv debugging (default)" echo " --enable-sparse enable sparse checker" echo " --disable-sparse disable sparse checker (default)" echo " --disable-strip disable stripping binaries" @@ -1359,6 +1366,9 @@ exit 1 ;; esac +if test "$debug_tcgv" = "yes" ; then + echo "#define DEBUG_TCGV 1" >> $config_h +fi if test "$sparse" = "yes" ; then echo "CC := REAL_CC=\"\$(CC)\" cgcc" >> $config_mak echo "HOST_CC := REAL_CC=\"\$(HOST_CC)\" cgcc" >> $config_mak -- Stuart Brady