GCC C语言处理主要函数之dbxout_init
来源:互联网 发布:电视连网络怎么看电视 编辑:程序博客网 时间:2024/06/05 08:24
/* At the beginning of compilation, start writing the symbol table. Initialize `typevec' and output the standard data types of C. */
static voiddbxout_init (const char *input_file_name){ char ltext_label_name[100]; bool used_ltext_label_name = false; tree syms = lang_hooks.decls.getdecls (); const char *mapped_name;
typevec_len = 100; typevec = ggc_cleared_vec_alloc<typeinfo> (typevec_len);
/* stabstr_ob contains one string, which will be just fine with 1-byte alignment. */ obstack_specify_allocation (&stabstr_ob, 0, 1, xmalloc, free);
/* Convert Ltext into the appropriate format for local labels in case the system doesn't insert underscores in front of user generated labels. */ ASM_GENERATE_INTERNAL_LABEL (ltext_label_name, "Ltext", 0);
/* Put the current working directory in an N_SO symbol. */ if (use_gnu_debug_info_extensions && !NO_DBX_MAIN_SOURCE_DIRECTORY) { static const char *cwd;
if (!cwd) { cwd = get_src_pwd (); if (cwd[0] == '\0') cwd = "/"; else if (!IS_DIR_SEPARATOR (cwd[strlen (cwd) - 1])) cwd = concat (cwd, "/", NULL); cwd = remap_debug_filename (cwd); }#ifdef DBX_OUTPUT_MAIN_SOURCE_DIRECTORY DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (asm_out_file, cwd);#else /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */ dbxout_begin_simple_stabs_desc (cwd, N_SO, get_lang_number ()); dbxout_stab_value_label (ltext_label_name); used_ltext_label_name = true;#endif /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */ }
mapped_name = remap_debug_filename (input_file_name);#ifdef DBX_OUTPUT_MAIN_SOURCE_FILENAME DBX_OUTPUT_MAIN_SOURCE_FILENAME (asm_out_file, mapped_name);#else dbxout_begin_simple_stabs_desc (mapped_name, N_SO, get_lang_number ()); dbxout_stab_value_label (ltext_label_name); used_ltext_label_name = true;#endif
if (used_ltext_label_name) { switch_to_section (text_section); targetm.asm_out.internal_label (asm_out_file, "Ltext", 0); }
/* Emit an N_OPT stab to indicate that this file was compiled by GCC. The string used is historical. */#ifndef NO_DBX_GCC_MARKER dbxout_begin_simple_stabs ("gcc2_compiled.", N_OPT); dbxout_stab_value_zero ();#endif
base_input_file = lastfile = input_file_name;
next_type_number = 1;
#ifdef DBX_USE_BINCL current_file = XNEW (struct dbx_file); current_file->next = NULL; current_file->file_number = 0; current_file->next_type_number = 1; next_file_number = 1; current_file->prev = NULL; current_file->bincl_status = BINCL_NOT_REQUIRED; current_file->pending_bincl_name = NULL;#endif
/* Get all permanent types that have typedef names, and output them all, except for those already output. Some language front ends put these declarations in the top-level scope; some do not; the latter are responsible for calling debug_hooks->type_decl from their record_builtin_type function. */ dbxout_typedefs (syms);
if (preinit_symbols) { tree t; for (t = nreverse (preinit_symbols); t; t = TREE_CHAIN (t)) dbxout_symbol (TREE_VALUE (t), 0); preinit_symbols = 0; }}
- GCC C语言处理主要函数之dbxout_init
- GCC C语言处理主要函数之c_parse_init
- GCC C语言处理主要函数之c_init_decl_processing
- GCC C语言处理主要函数之c_objc_common_init
- GCC C语言处理主要函数之c_common_init
- GCC C语言处理主要函数之init_pragma
- GCC C语言处理主要函数之c_register_pragma
- GCC C语言处理主要函数之c_common_init_ts
- GCC主要数据结构之C lang_type
- C语言之文件处理函数总结
- C语言之字符串处理函数
- GCC C语言处理hooks实现
- C语言学习笔记之常用的字符串处理函数
- c语言之字符串处理函数(三)
- C 语言之字符串处理函数一 -2016.01.01
- C语言之常用字符串处理函数(非调用)
- GCC之C 语言编译过程
- GCC之C 语言编译过程
- 回炉重造,第三话:PHP顺序控制
- 写文档注意事项
- Android scheduleWithFixedDelay延迟混乱
- stl全排列next_permutation()与prev_permutation()函数用法
- [leetcode] 107. Binary Tree Level Order Traversal II
- GCC C语言处理主要函数之dbxout_init
- MySQL数据表简单的导出excel和导入文件
- js三种弹框模式
- 虚拟机中Centos7安装完毕后无法联网显示Server not found的解决方法
- h5移动端知识要点
- 安卓使用emoji表情
- Android---重新认识view--Visiable\Invisiable\Gone属性
- 根据body的内容 查找ul标签的@class="subtitle"的值
- lintcode(30)插入区间