The main parameter for the Expand_call function is the exp tree,
After printing it, we finally saw printf and hello,world! .
Expand_call
<call_expr 840f0
Type <integer_type 824d0 int permanent SI
Size <INTEGER_CST 8254c literal permanent 4
Align Size_unit 8 sep_unit symtab 0
Sep <integer_cst 8251c literal permanent-2147483648 precision min <integer_cst 8251c-2147483648>
Max <INTEGER_CST 82534 literal permanent 2147483647
Pointer_to_this <pointer_type 88b4c> chain <integer_type 825bc* char>
Volatile
Arg 0 <addr_expr 84090
Type <pointer_type 98f48 type <function_type 956e8>
Permanent unsigned SI size <INTEGER_CST 8254c 4>
Align Size_unit 8 sep_unit symtab 0
Arg 0 <function_decl 95740printfType <function_type 956e8>
External public permanent used QI file/usr/include/stdio.h line 214
Align 1 Size_unit 1 offset 0 chain <function_decl 954d8 ungetc>
Arg 1 <tree_list 83270
Value <nop_expr 840d8 type <pointer_type 9117c>
Literal
Arg 0 <nop_expr 840c0 type <pointer_type 88a44>
Literal
Arg 0 <addr_expr 840a8 type <pointer_type 94f58>
Literal
Arg 0 <string_cst 84014 type <array_type 94ef4>
static literal "Hello, world!.
"(nil)
The following is the result of adding the Debug_tree () function at the beginning of the function
Expand_expr_stmt
<call_expr 840f0
Type <integer_type 824d0 int permanent SI
Size <INTEGER_CST 8254c literal permanent 4
Align Size_unit 8 sep_unit symtab 0
Sep <integer_cst 8251c literal permanent-2147483648 precision min <integer_cst 8251c-2147483648>
Max <INTEGER_CST 82534 literal permanent 2147483647
Pointer_to_this <pointer_type 88b4c> chain <integer_type 825bc* char>
Volatile
Arg 0 <addr_expr 84090
Type <pointer_type 98f48 type <function_type 956e8>
Permanent unsigned SI size <INTEGER_CST 8254c 4>
Align Size_unit 8 sep_unit symtab 0
Arg 0 <function_decl 95740 printf type <function_type 956e8>
External public permanent used QI file/usr/include/stdio.h line 214
Align 1 Size_unit 1 offset 0 chain <function_decl 954d8 ungetc>
Arg 1 <tree_list 83270
Value <nop_expr 840d8 type <pointer_type 9117c>
Literal
Arg 0 <nop_expr 840c0 type <pointer_type 88a44>
Literal
Arg 0 <addr_expr 840a8 type <pointer_type 94f58>
Literal
Arg 0 <string_cst 84014 type <array_type 94ef4>
static literal "Hello, world!
"(nil)
The definition of stmt in the C-PARSE.TAB.C file has a call to Expand_expr_stmt (), and the call relationship is finally clear!
stmt:
compstmt {}
| expr '; '
{emit_line_note (Input_filename, Lineno);
/* Do default conversion if safe and possibly important,
&nbs p; in case within ({...}). */
if ((Tree_code (tree_type) = = Array_type
&& lvalue_p ($)
| | Tree_code (Tree_type ($)) = = Function_type)
$ = default_ conversion ($);
expand_expr_stmt ($);
clear_momentary ();}
GCC source code Analysis, add the Debug_tree () function at the beginning of the Expand_call () function and the expand_expr_stmt () function