From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTOsk-0007gL-7b for qemu-devel@nongnu.org; Tue, 30 Oct 2012 23:22:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTOsj-0001bJ-9t for qemu-devel@nongnu.org; Tue, 30 Oct 2012 23:22:18 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55422 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTOsj-0001bC-48 for qemu-devel@nongnu.org; Tue, 30 Oct 2012 23:22:17 -0400 Message-ID: <50909962.2050009@suse.de> Date: Wed, 31 Oct 2012 04:22:10 +0100 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC] Configure option to turn on all debug printerfy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Stefan Hajnoczi , Igor Mitsyanko , "qemu-devel@nongnu.org Developers" Am 31.10.2012 04:10, schrieb Peter Crosthwaite: > So in a couple of cases now I have done work on mature device models > that include #ifdef'd debug printfery that is broken, and have > submitted (trivial) patches to fix. Whats happening is tree wide or > automated changes (changing types of variables etc) is causing the > debug printfery to break, usually werror issues on %x in printfs due > to types. Issue is, it never gets detected until someone tries to use > the debug mode: ./configure --extra-cflags=3D"-DFOO_DEBUG". Can we have > some sort of alternate symbol "ALL_DEBUG" or something, such that > every debug printf is compiled? Then when developers make tree wide > changes they can at least compile test for breakages in debug printfs > using ./configure --extra-cflags=3D"-DALL_DEBUG"? It would be fairly > trivial to implement. The original idea I thought was to replace all the DPRINTFs by tracing... An alternative might be to change the definition from empty DPRINTF(...) to DPRINTF(...) if (0) { ... }. Then no ALL_DEBUG symbol would be needed. I don't think anyone would like to get flooded with ALL_DEBUG! Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg