From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20191 invoked by alias); 1 Jun 2012 18:21:54 -0000 Received: (qmail 20176 invoked by uid 22791); 1 Jun 2012 18:21:53 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Jun 2012 18:21:40 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q51ILebr012571 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 1 Jun 2012 14:21:40 -0400 Received: from host2.jankratochvil.net (ovpn-116-47.ams2.redhat.com [10.36.116.47]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q51ILZne019470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 1 Jun 2012 14:21:38 -0400 Date: Fri, 01 Jun 2012 18:21:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: gdb-patches@sourceware.org, binutils@sourceware.org Subject: [gdb commit] [RFC patch] non-release srctrees: --enable-targets=all & 64bit & -lmcheck Message-ID: <20120601182135.GA8348@host2.jankratochvil.net> References: <20120518211410.GA32107@host2.jankratochvil.net> <87396fqaf4.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87396fqaf4.fsf@fleche.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-06/txt/msg00032.txt.bz2 On Fri, 01 Jun 2012 18:11:43 +0200, Tom Tromey wrote: > >>>>> "Jan" == Jan Kratochvil writes: > Jan> -lmcheck is cheap enough to never be noticed and it also finds checked in > Jan> regressions: > > I'm in favor of this part. Could you separate out just the gdb part and > put it in? Checked in only the gdb/ part. Thanks, Jan http://sourceware.org/ml/gdb-cvs/2012-06/msg00005.html --- src/gdb/ChangeLog 2012/06/01 16:37:56 1.14309 +++ src/gdb/ChangeLog 2012/06/01 18:20:16 1.14310 @@ -1,3 +1,11 @@ +2012-06-01 Jan Kratochvil + + * configure.ac (development): Define new variable. + Call AC_CHECK_LIB for mcheck if $development. + (ERROR_ON_WARNING): Enable it by default only if $development. + * config.in: Regenerate. + * configure: Regenerate. + 2012-06-01 Siddhesh Poyarekar * target.c (target_read_memory): Make LEN argument as size_t. --- src/gdb/config.in 2012/05/11 18:20:26 1.143 +++ src/gdb/config.in 2012/06/01 18:20:18 1.144 --- src/gdb/configure 2012/05/20 20:35:18 1.365 +++ src/gdb/configure 2012/06/01 18:20:18 1.366 --- src/gdb/configure.ac 2012/05/20 20:35:19 1.176 +++ src/gdb/configure.ac 2012/06/01 18:20:18 1.177 @@ -18,6 +18,11 @@ dnl Process this file with autoconf to produce a configure script. +dnl Provide more thorough testing by -lmcheck. +dnl Set it to 'true' for development snapshots, 'false' for releases or +dnl pre-releases. +development=true + AC_PREREQ(2.59)dnl AC_INIT(main.c) AC_CONFIG_HEADER(config.h:config.in) @@ -640,6 +645,11 @@ AC_SUBST(READLINE_CFLAGS) AC_SUBST(READLINE_TEXI_INCFLAG) +dnl -lmcheck provides cheap enough memory mangling for debugging purposes. +if $development; then + AC_CHECK_LIB(mcheck, main) +fi + # Generate jit-reader.h # This is typedeffed to GDB_CORE_ADDR in jit-reader.h @@ -1822,8 +1832,8 @@ *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;; esac]) -# Enable -Werror by default when using gcc -if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then +# Enable -Werror by default when using gcc. Turn it off for releases. +if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then ERROR_ON_WARNING=yes fi