This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: external declaration of dominance debug functions


Le Mon, 23 May 2011 11:30:34 +0200,
Richard Guenther <richard.guenther@gmail.com> a écrit :

> On Mon, May 23, 2011 at 10:33 AM, Piervit <piervit@pvittet.com> 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.
> 
> debug_* functions are supposed to be used from interactive gdb
> sessions. They should not be advertised in public headers.
> 
> Richard.
> 
> > ChangeLog:
> >
> > 2011-05-23 ?Pierre Vittet ?<piervit@pvittet.com>
> >
> > ? ? ? ?* basic-block.h (debug_dominance_info, debug_dominance_tree):
> > ? ? ? ? ?Add 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]