From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10065 invoked by alias); 23 May 2011 09:56:51 -0000 Received: (qmail 10054 invoked by uid 22791); 23 May 2011 09:56:50 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_RP_RNBL X-Spam-Check-By: sourceware.org Received: from 29.mail-out.ovh.net (HELO 29.mail-out.ovh.net) (87.98.216.213) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Mon, 23 May 2011 09:56:35 +0000 Received: (qmail 26926 invoked by uid 503); 23 May 2011 10:04:07 -0000 Received: from b6.ovh.net (HELO mail170.ha.ovh.net) (213.186.33.56) by 29.mail-out.ovh.net with SMTP; 23 May 2011 10:04:07 -0000 Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 23 May 2011 11:56:34 +0200 Received: from unknown (HELO zenwalk.local) (193.52.208.97) by ns0.ovh.net with SMTP; 23 May 2011 11:56:32 +0200 Date: Mon, 23 May 2011 10:53:00 -0000 From: Piervit To: gcc-patches@gcc.gnu.org, richard.guenther@gmail.com Subject: Re: external declaration of dominance debug functions Message-ID: <20110523115632.5abb6956@zenwalk.local> In-Reply-To: References: <20110523103355.71528d09@zenwalk.local> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Ovh-Tracer-Id: 3409224919495868574 X-Ovh-Remote: 193.52.208.97 () X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-05/txt/msg01608.txt.bz2 Le Mon, 23 May 2011 11:30:34 +0200, Richard Guenther a =E9crit : > On Mon, May 23, 2011 at 10:33 AM, Piervit wrote: > > Hello, > > > > Here is a two lines patch, allowing to use debug_dominance_info and > > debug_dominance_tree functions outside of gcc/dominance.c. For the > > moment, those functions are not declared in any gcc/*.h files (as > > far as I know after trying a grep). I have added them as external > > functions into gcc/basic-block.h. I feel this is useful to be able > > to call those functions from others files, for exemple from plugins. >=20 > debug_* functions are supposed to be used from interactive gdb > sessions. They should not be advertised in public headers. >=20 > Richard. >=20 > > ChangeLog: > > > > 2011-05-23 =A0Pierre Vittet =A0 > > > > =A0 =A0 =A0 =A0* basic-block.h (debug_dominance_info, debug_dominance_t= ree): > > =A0 =A0 =A0 =A0 =A0Add declaration. Thank you for your answer. I am sorry I was not aware of this rule. However I have try the following command in the gcc/ directory: pierre@zenwalk gcc %grep " debug_*" *.h | wc -l 231 And the majority of the result are debug_* functions in header file, such as extern void debug_tree (tree); in tree.h, extern void debug_pass (void); in tree-pass.h and many others.