From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23494 invoked by alias); 12 Nov 2012 18:07:31 -0000 Received: (qmail 23480 invoked by uid 22791); 12 Nov 2012 18:07:30 -0000 X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_50,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 12 Nov 2012 18:07:24 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 9DDBE2E029; Mon, 12 Nov 2012 13:07:23 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id TSL45JMWYZEA; Mon, 12 Nov 2012 13:07:23 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 6AFF62E026; Mon, 12 Nov 2012 13:07:23 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 4DD93C49E9; Mon, 12 Nov 2012 10:07:07 -0800 (PST) Date: Mon, 12 Nov 2012 18:07:00 -0000 From: Joel Brobecker To: Pierre Muller Cc: gdb@sourceware.org Subject: Re: New ARI web page, generated using script inside CVS tree in gdb/contrib/ari directory Message-ID: <20121112180707.GQ4847@adacore.com> References: <002701cdc0b9$542d2560$fc877020$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <002701cdc0b9$542d2560$fc877020$@muller@ics-cnrs.unistra.fr> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00009.txt.bz2 > 3) stat.h 1 Do not include stat.h or sys/stat.h, instead include > gdb_stat.h > 4) wait.h 1 Do not include wait.h or sys/wait.h, instead include > gdb_wait.h [...] > 3) and 4) are all related to the fact that gdb_stat.h and gdb_wait.h > headers are still in gdb directory, which force the use of direct > system include headers in sources in gdb/common sub-directory. Those > can probably be solved easily by moving the two headers also to > gdb/common. I had a look at gdb_stat.h and gdb_wait.h, and I think it would be fine to move them over to gdb/common. But perhaps we should also look at possibly importing gnulib's stat and sys_wait modules? Not a trivial change in the sense that it could be not equivalent to what we have now, and thus have unintended consequences; but perhaps worth a shot. I think that gdb_stat.h and all other such headers were GDB's own way of doing what gnulib does in general. > 1) is a little bit more tricky because safe_strerror is declared in utils.h > header, > but implemented in two files: > posix-hdep.c and mingw-hdep.c > > Should I extract the declaration into a > gdb/common/gdb_strerror.h > and extract the two functions > into gdb/common/posix-strerror.c and gdb/common/mingw-strerror.c? This sounds good to me. There is the option of putting all implementation into one single file, the way we do for some of our code, but I don't think it would be particularly simpler to do that way, since the current code has it separated in 2 files. In terms of the name, perhaps we should make it more explicit that this is not strerror, but safe_strerror? > Should we add rules about > gdb_XXX.h headers > stating that if gdb_XXX.h header exists and shadows an existing > system header, no gdb C source file should include XXX.h system header > directly. I would think so - but we should also look at gnulib, to see if it couldn't just be replaced by gnulib's equivalent. > Also, I would find as a logical consequence that also > gdbserver subdirectory should follow the ARI rules. > This is done quite easily by removing the > -name gdbserver -prune -o > line from gdb_find.sh script in gdb/contrib./ari > but is a rather important change that should be discussed fully. Right. I think it would be a helpful, but I'll let Pedro comment on that one. -- Joel