[cfe-dev] I want to find the Result of the AST Parsing

Journeyer J. Joh oosaprogrammer at gmail.com
Thu Aug 16 07:14:10 PDT 2012


Hello list,

I am recently reading the source code of the Clang/LLVM with gdb.
Among others I read about the AST Parsing these days. But finding the
result of this parsing is difficult for me.

I'd like to know where I can find the result of AST Parsing.

I found where the AST Parsing is commited. It's shown below.

break clang::ParseAST
break clang::Parser::ParseTopLevelDecl
break clang::Parser::ParseExternalDeclaration
break clang::Parser::ParseDeclarationOrFunctionDefinition
break clang::Parser::ParseDeclOrFunctionDefInternal
break clang::Parser::ParseDeclarationSpecifiers
break clang::Parser::ConsumeToken
break clang::Parser::ParseDeclGroup
break clang::Parser::ParseDeclarator
break clang::Parser::ParseDeclaratorInternal
break clang::Parser::ParseDirectDeclarator
break clang::Parser::ParseFunctionDeclarator
break clang::Sema::ActOnStartFunctionDeclarator
break clang::Parser::ParseParameterDeclarationClause
break clang::Parser::ParseDeclarationSpecifiers
break clang::Parser::ParseDeclarator
break clang::Parser::ParseFunctionDefinition
break clang::Parser::ParseCompoundStatementBody
break clang::Parser::ParseStatementOrDeclaration
break clang::Parser::ParseDeclaration
break clang::Parser::ParseExprStatement

This is my break points used in gdb.

I was able to trace the parsing of the C source code,
BUT I couldn't find the result of this AST Parsing.

I'd like to know where I can find the result of this AST Parsing.
I'd like to find it using gdb.

Or, I wonder if there is any way for me to print out the Parsed AST.
Any utility or compiler options?

Thank you very much in advance.

Have a good day!
-- 
----------------------------------------
Journeyer J. Joh
o o s a p r o g r a m m e r
a t
g m a i l  d o t  c o m
----------------------------------------



More information about the cfe-dev mailing list