Hi Mikael,

> Le 16/09/2025 à 21:07, Harald Anlauf a écrit :
> > Hi All,
> > 
> > when trying to debug the gfortran frontend, I often get lost in the
> > forest: too much forest, trees everywhere, leaves, ...
> > 
> > OK, seriously, what is an efficient way to debug under e.g. gdb,
> > when there is code that uses macros on trees, like TREE_TYPE ()
> > etc., without losing your sanity?
> > 
> > I do know that there exists e.g. debug_tree, but this can dump a lot
> > of stuff on me.  And the comment at the top of gcc/print-tree.cc:
> > 
> > /* Prints out tree in human readable form - GCC
> > 
> > makes me feel non-human.  :-(
> > 
> > I was now thinking of writing helper functions, like:
> > 
> I tend to use debug_generic_expr which is enough in the majority of cases.
> There is a .gdbinit file in build/gcc that you can source in your gdb 
> session.  It loads many shortcuts most of them coming from the template 
> gcc/gdbinit.in (have a look there, you may find some useful).

Ah, I missed these.  There are indeed some useful ones among them.
Though not those I was hoping for.

> Otherwise I use the full data references which I pick from the macro 
> definitions.  Not human-enough may be.

Yes, that's why I asked here.  But I got at least some help and hints.

Reply via email to