gcc源代码分析,在expand_call ()函数 和expand_expr_stmt ()函数的开始处加入debug_tree ()函数
来源:互联网 发布:js数组复制extend 编辑:程序博客网 时间:2024/06/07 02:47
对于expand_call函数来说最主要的参数就是exp这个tree树,
打印出来之后我们终于看到了printf和Hello,world!
expand_call
<call_expr 840f0type <integer_type 824d0 int permanent SI
size <integer_cst 8254c literal permanent 4
align 32 size_unit 8 sep_unit 32 symtab 0
sep <integer_cst 8251c literal permanent -2147483648 precision 32 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 32 size_unit 8 sep_unit 32 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)
下面是在 函数开始处加入debug_tree ()函数的结果
expand_expr_stmt
<call_expr 840f0
type <integer_type 824d0 int permanent SI
size <integer_cst 8254c literal permanent 4
align 32 size_unit 8 sep_unit 32 symtab 0
sep <integer_cst 8251c literal permanent -2147483648 precision 32 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 32 size_unit 8 sep_unit 32 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)
在c-parse.tab.c文件里面的stmt的定义出有对expand_expr_stmt()的调用,调用关系终于明朗了!
stmt:
compstmt {}
| expr ';'
{ emit_line_note (input_filename, lineno);
/* Do default conversion if safe and possibly important,
in case within ({...}). */
if ((TREE_CODE (TREE_TYPE ($1)) == ARRAY_TYPE
&& lvalue_p ($1))
|| TREE_CODE (TREE_TYPE ($1)) == FUNCTION_TYPE)
$1 = default_conversion ($1);
expand_expr_stmt ($1);
clear_momentary (); }
- gcc源代码分析,在expand_call ()函数 和expand_expr_stmt ()函数的开始处加入debug_tree ()函数
- gcc源代码分析,expand_expr_stmt()函数
- gcc源代码分析,debug_tree()函数的利用
- gcc源代码分析,expand_call()函数第三部分
- gcc源代码分析,expand_call ()函数分析第五部分,store_one_arg ()函数
- gcc源代码分析,expand_call()函数和printf("Hello, world!\n");的关系
- gcc源代码分析,expand_call ()函数第四部分,emit_call_1 ()函数
- gcc源代码分析,debug_tree()函数,又一利器啊
- gcc源代码分析,finish_decl ()函数和rest_of_decl_compilation ()函数分析
- gcc源代码分析,finish_decl ()函数和push_parm_decl ()函数分析
- gcc源代码分析,insn_extract()函数和recog_operand[]数组的关系
- gcc源代码分析,函数定义和finish_function()函数
- gcc源代码分析gen_push_operand ()函数和emit_move_insn ()函数
- gcc源代码分析 gen_rtx()函数
- gcc源代码分析emit_call_insn()函数
- GCC源代码分析,recog_memoized()函数
- gcc源代码分析,output_asm_insn()函数
- gcc源代码分析,rtx_alloc函数分析
- codeforces--Theatre Square
- About slotland All R
- easyUI
- MAC本上网慢解决方案
- leetcode
- gcc源代码分析,在expand_call ()函数 和expand_expr_stmt ()函数的开始处加入debug_tree ()函数
- VIM插件NERDTree
- jquery easyui datagrid 获取Checked选择行(勾选行)数据 .
- iOS工具下载网址
- 为什么 构造函数、内联函数、静态函数和友元函数不能是虚函数
- Fragment+FragmentTabHost实现仿新浪微博底部菜单栏
- datagrid 小结
- Hadoop、Spark、HBase与Redis的适用性讨论(全文)
- Jquery easyUi 数据表格(DataGrid)的特性