This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Standard scheme for maintainer-only debugging code?
- From: Geoff Keating <geoffk at geoffk dot org>
- To: Nathanael Nerode <neroden at twcny dot rr dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 10 Jun 2003 12:38:18 -0700
- Subject: Re: Standard scheme for maintainer-only debugging code?
- References: <20030610192730.GA6638@doctormoo>
Nathanael Nerode <neroden@twcny.rr.com> writes:
> Geert said:
> >For debugging code, I'd like to propose using a single header
> >file that has simple boolean constants of the form debug_XYZ.
> >Then use "if (debug_XYZ) do_this;" code for these cases.
> >A maintainer who wants to enable the debugging code can do so by
> >changing the constant to true, or by making it a variable so
> >debugging can be enabled/disabled from a debugger.
>
> Youre idea is better than mine. :-)
>
> Let's push forward on this. What should the header be called?
> maintainer_debug_flags.h?
>
> It should clearly be included via something which everyone includes,
> like system.h or config.h.
I don't think making this a single header is a good idea; it would
mean that whenever you changed one debugging flag, the dependencies
would cause the whole compiler to be rebuilt, which would be annoying.
--
- Geoffrey Keating <geoffk@geoffk.org>