#include <values.h>#include "defs.h"#include "glob.h"#include "config.h"#include "dwarf_DST_producer.h"#include "dwarf_DST_dump.h"#include "file_util.h"#include "srcpos.h"#include "symtab.h"#include "gnu_config.h"#include "gnu/flags.h"#include "gnu/system.h"#include "gnu/tree.h"#include "wfe_misc.h"#include "wfe_dst.h"#include "wfe_expr.h"#include "tree_symtab.h"#include <sys/types.h>#include <sys/stat.h>#include <sys/param.h>#include <unistd.h>#include <string>#include <vector>#include <map>

Go to the source code of this file.
Defines | |
| #define | MAX_CWD_CHARS (256 - (MAXHOSTNAMELEN+1)) |
| #define | DANAME(d) |
Typedefs | |
| typedef std::map< std::string, DST_INFO_IDX > | DST_Type_Map |
Functions/Subroutines | |
| static void | DST_enter_file (const char *, UINT) |
| static DST_INFO_IDX | DST_Create_var (ST *var_st, tree decl) |
| static DST_INFO_IDX | DST_Create_Parmvar (ST *var_st, tree decl) |
| static DST_INFO_IDX | DST_Create_type (ST *typ_decl, tree decl) |
| static int | same_dst_idx (struct mongoose_gcc_DST_IDX s1, struct mongoose_gcc_DST_IDX s2) |
| static void | cp_to_tree_from_dst (struct mongoose_gcc_DST_IDX *dest, DST_INFO_IDX *src) |
| static void | cp_to_dst_from_tree (DST_INFO_IDX *dest, struct mongoose_gcc_DST_IDX *src) |
| static DST_INFO_IDX | DST_get_context (tree intree) |
| static UINT | Get_Dir_Dst_Info (char *name) |
| static UINT | Get_File_Dst_Info (const char *name, UINT dir) |
| static const char * | drop_path (const char *s) |
| static char * | DST_get_command_line_options (INT32 num_copts, char *copts[]) |
| static char * | Get_Name (tree node) |
| static void | DST_enter_struct_union_members (tree parent_tree, DST_INFO_IDX parent_idx) |
| static DST_INFO_IDX | DST_enter_struct_union (tree type_tree, TY_IDX ttidx, TY_IDX idx, INT tsize) |
| static DST_INFO_IDX | DST_enter_enum (tree type_tree, TY_IDX ttidx, TY_IDX idx, INT tsize) |
| static DST_INFO_IDX | DST_enter_array_type (tree type_tree, TY_IDX ttidx, TY_IDX idx, INT tsize) |
| struct mongoose_gcc_DST_IDX | Create_DST_type_For_Tree (tree type_tree, TY_IDX ttidx, TY_IDX idx, bool ignoreconst, bool ignorevolatile) |
| struct mongoose_gcc_DST_IDX | Create_DST_decl_For_Tree (tree decl, ST *var_st) |
| static void | DST_enter_param_vars (tree fndecl, tree parameter_list) |
| DST_INFO_IDX | DST_Create_Subprogram (ST *func_st, tree fndecl) |
| DST_INFO_IDX | DST_Get_Comp_Unit (void) |
| void | DST_build (int num_copts, char *copts[]) |
| void | WFE_Set_Line_And_File (UINT line, const char *file) |
Variables | |
| const char * | dump_base_name |
| FILE * | tree_dump_file |
| static BOOL | dst_initialized = FALSE |
| static char | cwd_buffer [MAX_CWD_CHARS+MAXHOSTNAMELEN+1] |
| static char * | current_working_dir = &cwd_buffer[0] |
| static char * | current_host_dir = &cwd_buffer[0] |
| static DST_INFO_IDX | comp_unit_idx = DST_INVALID_INIT |
| static UINT | last_dir_num = 0 |
| static UINT | current_dir = 1 |
| static UINT | last_file_num = 0 |
| UINT | current_file = 1 |
| static std::vector< std::pair < char *, UINT > > | dir_dst_list |
| static DST_Type_Map | basetypes |
| static std::vector< std::pair < const char *, UINT > > | file_dst_list |
| #define DANAME | ( | d | ) |
Value:
((TREE_CODE_CLASS(TREE_CODE(d)) =='d')? \ ((DECL_NAME(d))?IDENTIFIER_POINTER(DECL_NAME(d)):"?"):\ "?2")
| #define MAX_CWD_CHARS (256 - (MAXHOSTNAMELEN+1)) |
Definition at line 126 of file wfe_dst.cxx.
| typedef std::map< std::string, DST_INFO_IDX > DST_Type_Map |
Definition at line 154 of file wfe_dst.cxx.
| static void cp_to_dst_from_tree | ( | DST_INFO_IDX * | dest, | |
| struct mongoose_gcc_DST_IDX * | src | |||
| ) | [inline, static] |
Definition at line 180 of file wfe_dst.cxx.
References DST_idx::block_idx, and DST_idx::byte_idx.
Referenced by Create_DST_type_For_Tree(), DST_Create_Parmvar(), DST_Create_Subprogram(), DST_Create_type(), DST_Create_var(), DST_enter_array_type(), DST_enter_enum(), DST_enter_param_vars(), DST_enter_struct_union(), DST_enter_struct_union_members(), DST_get_context(), and WFE_Start_Function().
| static void cp_to_tree_from_dst | ( | struct mongoose_gcc_DST_IDX * | dest, | |
| DST_INFO_IDX * | src | |||
| ) | [inline, static] |
Definition at line 166 of file wfe_dst.cxx.
References DST_idx::block_idx, and DST_idx::byte_idx.
Referenced by Create_DST_decl_For_Tree(), Create_DST_type_For_Tree(), DST_Create_Subprogram(), DST_Create_type(), DST_enter_array_type(), DST_enter_enum(), DST_enter_param_vars(), DST_enter_struct_union(), and WFE_Start_Function().
Definition at line 1577 of file wfe_dst.cxx.
References cp_to_tree_from_dst(), DECL_COMMON, DECL_DST_IDX(), DECL_EXTERNAL, DECL_IGNORED_P, DST_Create_Parmvar(), DST_Create_Subprogram(), DST_Create_type(), DST_Create_var(), DST_INVALID_INIT, same_dst_idx(), TREE_CODE, and TREE_STATIC.
| struct mongoose_gcc_DST_IDX Create_DST_type_For_Tree | ( | tree | type_tree, | |
| TY_IDX | ttidx, | |||
| TY_IDX | idx, | |||
| bool | ignoreconst, | |||
| bool | ignorevolatile | |||
| ) | [read] |
Definition at line 1130 of file wfe_dst.cxx.
References align, basetypes, Be_Type_Tbl, BOOL, COMPLEX_TYPE, cp_to_dst_from_tree(), cp_to_tree_from_dst(), Create_DST_type_For_Tree(), DevWarn, DST_append_child(), DST_Create_type(), DST_enter_array_type(), DST_enter_enum(), DST_enter_struct_union(), DST_get_context(), DST_INFO_flag, DST_INFO_IDX_TO_PTR, DST_INVALID_INIT, DST_IS_NULL, DST_mk_basetype(), DST_mk_const_type(), DST_mk_pointer_type(), DST_mk_reference_type(), DST_mk_volatile_type(), DW_ADDR_none, DW_ATE_boolean, DW_ATE_complex_float, DW_ATE_float, DW_ATE_signed, DW_ATE_signed_char, DW_ATE_unsigned, DW_ATE_unsigned_char, Fail_FmtAssertion(), FALSE, FmtAssert, Get_Integer_Value(), Get_Name(), Get_TY(), idx, INT, INT32, KIND_FUNCTION, lineno, mtype, MTYPE_M, MTYPE_UNKNOWN, names, New_TY(), New_TYLIST(), NULL, p, Set_TY_align, Set_TY_has_prototype, Set_TY_is_varargs, Set_TY_tylist(), Set_TYLIST_type(), strcmp(), string, TREE_CHAIN, TREE_CODE, TREE_CODE_CLASS, TREE_TYPE, TREE_UNSIGNED, TREE_VALUE, TRUE, TY_Init(), TY_mtype, TY_size, Tylist_Table, TYPE_ALIGN, TYPE_ARG_TYPES, TYPE_CONTEXT, TYPE_DEBUG_REPRESENTATION_TYPE, TYPE_DST_IDX(), TYPE_FIELDS, TYPE_ID, TYPE_MAIN_VARIANT, TYPE_NAME, TYPE_READONLY, TYPE_SIZE, TYPE_TY_IDX(), TYPE_VOLATILE, UINT, variable_size(), and WFE_Keep_Zero_Length_Structs.
| static const char* drop_path | ( | const char * | s | ) | [static] |
| void DST_build | ( | int | num_copts, | |
| char * | copts[] | |||
| ) |
Definition at line 2034 of file wfe_dst.cxx.
References current_host_dir, current_working_dir, cwd_buffer, Debug_Level, DST_get_command_line_options(), DST_Init(), dst_initialized, DST_mk_compile_unit(), dump_base_name, DW_ID_case_sensitive, DW_LANG_C89, exit(), free(), Get_Current_Working_Directory(), getdomainname(), gethostname(), INCLUDE_STAMP, malloc, NULL, Orig_Src_File_Name, perror(), strcat(), strcpy, strlen(), TRUE, and WFE_Set_Line_And_File().
| static DST_INFO_IDX DST_Create_Parmvar | ( | ST * | var_st, | |
| tree | decl | |||
| ) | [static] |
Definition at line 1755 of file wfe_dst.cxx.
References cp_to_dst_from_tree(), DECL_DST_IDX(), Get_ST, Get_TY(), TREE_TYPE, and USRCPOS_clear.
| DST_INFO_IDX DST_Create_Subprogram | ( | ST * | func_st, | |
| tree | fndecl | |||
| ) |
Definition at line 1917 of file wfe_dst.cxx.
References arg_types, BOOL, cp_to_dst_from_tree(), cp_to_tree_from_dst(), Debug_Level, DECL_ARGUMENTS, DECL_CONTEXT, DECL_DST_IDX(), DECL_RESULT, DevWarn, dst, DST_append_child(), DST_enter_param_vars(), DST_get_context(), DST_INFO_flag, DST_INFO_IDX_TO_PTR, DST_INVALID_IDX, DST_mk_subprogram(), DST_RESET_assoc_fe, DW_INL_not_inlined, DW_VIRTUALITY_none, FALSE, Get_TY(), ST_is_export_local(), ST_name, ST_st_idx, TREE_TYPE, TRUE, TYPE_ARG_TYPES, TYPE_DST_IDX(), and USRCPOS_srcpos.
| static DST_INFO_IDX DST_Create_type | ( | ST * | typ_decl, | |
| tree | decl | |||
| ) | [static] |
Definition at line 1672 of file wfe_dst.cxx.
References base, basetypes, cp_to_dst_from_tree(), cp_to_tree_from_dst(), Create_DST_type_For_Tree(), DECL_CONTEXT, DECL_ORIGINAL_TYPE, DECL_RESULT, DevWarn, DST_append_child(), DST_get_context(), DST_INVALID_IDX, DST_mk_typedef(), Get_Name(), Get_TY(), names, p, string, TREE_TYPE, TYPE_DST_IDX(), and USRCPOS_clear.
| static DST_INFO_IDX DST_Create_var | ( | ST * | var_st, | |
| tree | decl | |||
| ) | [static] |
Definition at line 1784 of file wfe_dst.cxx.
References cp_to_dst_from_tree(), DECL_CONTEXT, dst, DST_append_child(), DST_get_context(), DST_INVALID_IDX, DST_mk_const_type(), DST_mk_variable(), DST_mk_volatile_type(), FALSE, NULL, SCLASS_AUTO, ST_name, ST_sclass, ST_st_idx, TREE_PUBLIC, TREE_TYPE, TYPE_DST_IDX(), TYPE_READONLY, TYPE_VOLATILE, and USRCPOS_clear.
| static DST_INFO_IDX DST_enter_array_type | ( | tree | type_tree, | |
| TY_IDX | ttidx, | |||
| TY_IDX | idx, | |||
| INT | tsize | |||
| ) | [static] |
Definition at line 1026 of file wfe_dst.cxx.
References ARB_const_ubnd, ARB_ubnd_var(), cp_to_dst_from_tree(), cp_to_tree_from_dst(), Create_DST_type_For_Tree(), d, DevWarn, DST_append_child(), DST_INVALID_IDX, DST_IS_NULL, DST_mk_array_type(), index(), INT, KIND_INVALID, SCLASS_AUTO, ST_sclass, St_Table, TREE_CODE, TREE_CODE_CLASS, TREE_TYPE, TRUE, TY_AR_ndims, TY_arb(), TY_kind, Ty_Table, TYPE_DST_IDX(), TYPE_TY_IDX(), and USRCPOS_clear.
| static DST_INFO_IDX DST_enter_enum | ( | tree | type_tree, | |
| TY_IDX | ttidx, | |||
| TY_IDX | idx, | |||
| INT | tsize | |||
| ) | [static] |
Definition at line 756 of file wfe_dst.cxx.
References cp_to_dst_from_tree(), cp_to_tree_from_dst(), DevWarn, DST_append_child(), DST_CONST_VALUE_form, DST_CONST_VALUE_form_data4, DST_CONST_VALUE_form_data8, DST_FORM_DATA4, DST_FORM_DATA8, DST_get_context(), DST_INVALID_IDX, DST_IS_NULL, DST_mk_enumeration_type(), DST_mk_enumerator(), Get_Integer_Value(), Get_Name(), IDENTIFIER_POINTER, NULL_TREE, src, TREE_CHAIN, TREE_CODE, TREE_CODE_CLASS, TREE_PURPOSE, TREE_VALUE, TYPE_CONTEXT, TYPE_DST_IDX(), TYPE_VALUES, and USRCPOS_clear.
Definition at line 384 of file wfe_dst.cxx.
References DST_mk_file_name(), file_size, stat::st_mtime, stat::st_size, stat, and UINT64.
Definition at line 1854 of file wfe_dst.cxx.
References BOOL, cp_to_dst_from_tree(), cp_to_tree_from_dst(), DECL_DST_IDX(), DevWarn, DST_append_child(), DST_INVALID_IDX, DST_mk_formal_parameter(), FALSE, Get_Name(), Get_ST, Get_TY(), ST_st_idx, TREE_CHAIN, TREE_CODE, TREE_CODE_CLASS, TREE_TYPE, TYPE_DST_IDX(), and USRCPOS_srcpos.
| static DST_INFO_IDX DST_enter_struct_union | ( | tree | type_tree, | |
| TY_IDX | ttidx, | |||
| TY_IDX | idx, | |||
| INT | tsize | |||
| ) | [static] |
Definition at line 689 of file wfe_dst.cxx.
References cp_to_dst_from_tree(), cp_to_tree_from_dst(), DevWarn, DST_append_child(), DST_enter_struct_union_members(), DST_get_context(), DST_INVALID_IDX, DST_IS_NULL, DST_mk_structure_type(), DST_mk_union_type(), Get_Name(), src, TREE_CODE, TREE_PURPOSE, TYPE_CONTEXT, TYPE_DST_IDX(), and USRCPOS_clear.
| static void DST_enter_struct_union_members | ( | tree | parent_tree, | |
| DST_INFO_IDX | parent_idx | |||
| ) | [static] |
Definition at line 516 of file wfe_dst.cxx.
References align, base, bitoff, BYTES_BIG_ENDIAN, cp_to_dst_from_tree(), Create_DST_type_For_Tree(), DECL_BIT_FIELD, DECL_FIELD_BIT_OFFSET, DECL_FIELD_OFFSET, DECL_SIZE, DST_append_child(), DST_mk_member(), Fail_FmtAssertion(), FALSE, Get_Integer_Value(), Get_Name(), Get_TY(), INT, lineno, NULL, return, src, TREE_CHAIN, TREE_CODE, TREE_PURPOSE, TREE_TYPE, TRUE, TY_size, TYPE_ALIGN, TYPE_SIZE, UINT, and USRCPOS_clear.
| static char* DST_get_command_line_options | ( | INT32 | num_copts, | |
| char * | copts[] | |||
| ) | [static] |
| DST_INFO_IDX DST_Get_Comp_Unit | ( | void | ) |
Definition at line 2025 of file wfe_dst.cxx.
| static DST_INFO_IDX DST_get_context | ( | tree | intree | ) | [static] |
Definition at line 222 of file wfe_dst.cxx.
References BLOCK, cp_to_dst_from_tree(), DECL_CONTEXT, DECL_DST_IDX(), DevWarn, DST_IS_NULL, TREE_CODE, TREE_CODE_CLASS, and TYPE_CONTEXT.
| static UINT Get_Dir_Dst_Info | ( | char * | name | ) | [static] |
Definition at line 306 of file wfe_dst.cxx.
References dir_dst_list, DST_mk_include_dir(), last_dir_num, make_pair(), malloc, NULL, strcmp(), strcpy, and strlen().
Definition at line 339 of file wfe_dst.cxx.
References DST_enter_file(), last_file_num, make_pair(), malloc, strcmp(), strcpy, and strlen().
| static char* Get_Name | ( | tree | node | ) | [static] |
Definition at line 474 of file wfe_dst.cxx.
References buf, DECL_NAME, IDENTIFIER_POINTER, int, NULL, TREE_CODE, TREE_CODE_CLASS, and TYPE_NAME.
Definition at line 2131 of file wfe_dst.cxx.
References buf, current_working_dir, dir, drop_path(), dst_initialized, file_name, and NULL.
DST_Type_Map basetypes [static] |
Definition at line 155 of file wfe_dst.cxx.
DST_INFO_IDX comp_unit_idx = DST_INVALID_INIT [static] |
Definition at line 136 of file wfe_dst.cxx.
UINT current_dir = 1 [static] |
Definition at line 141 of file wfe_dst.cxx.
| UINT current_file = 1 |
Definition at line 143 of file wfe_dst.cxx.
char* current_host_dir = &cwd_buffer[0] [static] |
Definition at line 130 of file wfe_dst.cxx.
char* current_working_dir = &cwd_buffer[0] [static] |
Definition at line 129 of file wfe_dst.cxx.
char cwd_buffer[MAX_CWD_CHARS+MAXHOSTNAMELEN+1] [static] |
Definition at line 127 of file wfe_dst.cxx.
std::vector< std::pair< char *, UINT > > dir_dst_list [static] |
Definition at line 153 of file wfe_dst.cxx.
BOOL dst_initialized = FALSE [static] |
Definition at line 121 of file wfe_dst.cxx.
| const char* dump_base_name |
std::vector< std::pair< const char *, UINT > > file_dst_list [static] |
Definition at line 334 of file wfe_dst.cxx.
UINT last_dir_num = 0 [static] |
Definition at line 140 of file wfe_dst.cxx.
UINT last_file_num = 0 [static] |
Definition at line 142 of file wfe_dst.cxx.
1.5.6