On Sat, 2023-12-02 at 17:41 -0500, Stan Srednyak via Gcc wrote:
> Dear GCC community,
> 
> I am assigned the task to debug the trees as being produced by the
> cp_parser. I was able to print some of the trees using the
> debug_tree()
> function. But I am still confused as to where is the tree object that
> corresponds to the translation unit being parsed. There is no such
> field in
> cp_parser, and in the few tiers of functions calls starting from
> parse_file() function that I followed so far, I was not able to find
> any
> variable remotely similar to the AST of functions/structs etc. that
> must be
> constructed by this great piece of software. I would very much
> appreciate
> any explanation from the great experts in gcc on this mailing list. I
> posted a thread at gcc-help, but apparently it is too obvious of a
> question
> to be addressed there.

Hi Stan

FWIW I've written some notes on debugging GCC:
https://gcc-newbies-guide.readthedocs.io/en/latest/debugging.html

and in particular you might find the following useful:
https://gcc-newbies-guide.readthedocs.io/en/latest/debugging.html#how-do-i-find-where-a-particular-tree-was-created

Hope this is helpful
Dave

Reply via email to