Question on path from C parser to DECL_INITIAL

Martin Jambor mjambor@suse.cz
Wed Mar 23 12:46:50 GMT 2022


Hi,

On Wed, Mar 23 2022, Erick Ochoa via Gcc wrote:
> Hi,
>
> I am trying to understand what path is executed in GCC from parsing a C
> expression (in a global variable declaration) to the value in DECL_INITIAL.
> At the moment, I have annotated a tree during parsing. I have another
> debugging pass that looks for this tree in subsequent passes. The
> annotation persists if the tree is inside a function body. However, if the
> tree is in a global variable initialization (i.e., DECL_INITIAL), then I am
> unable to see the annotation even when placing the debugging pass at the
> beginning of passes.def.
>
> Can someone provide a little bit of guidance?

Sounds like a gdb watchpoint should help here.

Martin



More information about the Gcc mailing list