This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Unifying the GCC Debugging Interface
On Fri, Nov 16, 2012 at 4:38 AM, Martin Jambor <mjambor@suse.cz> wrote:
> So you do not plan to replace/rename at least some of them? This
> seems like unnecessary and confusing layering just to avoid the work
> to do the right thing.
No, we plan to replace all the existing dumping routines. We are just
not planning to add *new* ones. Duplicating the existing routines
would indeed be useless.
>>
>> dump_raw
>>
>> This function overload set provides the raw oriented dump,
>> e.g. a tuple.
>
> I'm not sure I understand the whole raw thing.
This is to distinguish between:
a = b + c;
from
<modify_expr, plus_expr, a, b, c>
ASTs and RTL have something similar. The raw output gives you a
different view. Not every data structure will have that distinction.
> I'm afraid we can't really always rely on overloading. For example,
> even though I often use debug_tree to examine a tree, probably even
> more often I just use debug_generic_expr. When I write stuff into a
> dump file, I rarely ever use the verbose variants but I certainly want
> them to exist. And there might be other similar cases, like the
> .*_brief dumping functions that are sometimes also used.
Sure. The idea is to provide these variants via symbolic TDF_ style
flags. For combinations that are very popular, we provide alternate
entry names so that you don't have to be specifying the flags all the
time.
> Nevertheless, it would be great if we had fewer and consistent names
> of dumping functions, even though perhaps not just three. It would
> also be nice if all the file variants had an integer indent parameter
> ;-)
Ah, good idea. Thanks.
Diego.