From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19343 invoked by alias); 15 Jul 2014 15:21:18 -0000 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 Received: (qmail 19329 invoked by uid 89); 15 Jul 2014 15:21:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 15 Jul 2014 15:21:16 +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 s6FFLEG3027209 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Jul 2014 11:21:14 -0400 Received: from blade.nx (ovpn-116-92.ams2.redhat.com [10.36.116.92]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s6FFLD6b029805; Tue, 15 Jul 2014 11:21:14 -0400 Received: by blade.nx (Postfix, from userid 1000) id 27A432640C7; Tue, 15 Jul 2014 16:21:13 +0100 (BST) Date: Tue, 15 Jul 2014 15:21:00 -0000 From: Gary Benson To: Doug Evans Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 05/15] Introduce and use debug_printf and debug_vprintf Message-ID: <20140715152113.GA32326@blade.nx> References: <1404902255-11101-1-git-send-email-gbenson@redhat.com> <1404902255-11101-6-git-send-email-gbenson@redhat.com> <21440.16038.443276.765473@ruffy.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <21440.16038.443276.765473@ruffy.mtv.corp.google.com> X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00387.txt.bz2 Doug Evans wrote: > Gary Benson writes: > > 2014-07-09 Tom Tromey > > Gary Benson > > > > * common/common-debug.h: New file. > > * utils.h: Include common-debug.h. > > * utils.c (debug_vprintf): New function. > > (debug_printf): Likewise. > > * common/agent.c (debug_agent_print): New function. > > (DEBUG_AGENT): Redefine. > > * nat/i386-dregs.c (debug_printf): Undefine. > > > > gdb/gdbserver/ > > 2014-07-09 Tom Tromey > > Gary Benson > > > > * utils.h: Include common-debug.h. > > * debug.h (debug_printf): Don't declare. > > * debug.c (debug_vprintf): New function. > > (debug_printf): Use the above. > > IWBN if there was more file naming consistency. > As a general rule, how objectionable is it to have gdb/foo.c > and gdbserver/foo.c for every shared foo.h header? I like it. > [Or common-foo.h header in the case of, e.g., common/common-debug.h.] > An alternative would be to move common-debug.h to a new directory, > e.g., shared, and call it shared/debug.h. I'm only mentioning this > for discussion sake, it's not a requisite for this patch. I have a script to automate the changes required so we can remove "-I/path/to/gdb/common" from $CFLAGS. This would allow GDB and/or gdbserver to have their own "foo.h" that could include "common/foo.h". The script also removes all the "common-" and "gdb_" prefixes from header files in common. I plan to submit a patch after this series is in. This means this series is creating files that will almost immediately be moved, but the alternative is I end up having to extensively fix this series (and I already did that once already!) > In this case, any objection to putting the gdb implementation > in gdb/debug.c instead of utils.c? No objection from me, I'll do it. Thanks, Gary -- http://gbenson.net/