#include <limits.h>#include <sys/stat.h>#include <unistd.h>#include "defs.h"#include "glob.h"#include "errors.h"#include "wn.h"#include "dwarf_DST_producer.h"#include "dwarf_DST_dump.h"#include "config_targ.h"#include "file_util.h"#include "cwh_defines.h"#include "cwh_dst.h"#include "cwh_dst.i"#include "cwh_preg.h"#include "cwh_stab.h"#include "cwh_auxst.h"#include "cwh_types.h"#include "sgi_cmd_line.h"

Go to the source code of this file.
| static DST_INFO_IDX cwh_dst_array_type | ( | TY_IDX | ty | ) | [static] |
Definition at line 1644 of file cwh_dst.cxx.
References cwh_dst_is_character_TY(), cwh_dst_mk_type(), cwh_dst_subrange(), cwh_dst_substring_type(), d, DST_append_child(), DST_INVALID_IDX, DST_mk_array_type(), idx, INT, INT32, TRUE, TY_AR_etype, TY_AR_ndims, TY_arb(), TY_name, Ty_Table, and USRCPOS_clear.
Referenced by cwh_dst_mk_type().
| static DST_INFO_IDX cwh_dst_basetype | ( | TY_IDX | ty | ) | [static] |
Definition at line 1550 of file cwh_dst.cxx.
References comp_unit_idx, DST_append_child(), DST_INVALID_IDX, DST_IS_NULL, DST_mk_basetype(), MTYPE_I1, MTYPE_V, size, TY_is_logical, TY_mtype, Ty_Table, and TYPE_ID.
Referenced by cwh_dst_enter_pu(), cwh_dst_mk_subroutine_type(), and cwh_dst_mk_type().
| static void cwh_dst_dope_bounds | ( | TY_IDX | td, | |
| ST * | st, | |||
| mINT64 | off, | |||
| DST_INFO_IDX | arr, | |||
| DST_INFO_IDX | p, | |||
| BOOL | comp | |||
| ) | [static] |
Definition at line 1898 of file cwh_dst.cxx.
References BOOL, cwh_dst_mk_dope_bound(), cwh_dst_mk_type(), cwh_dst_stride_kind(), DST_append_child(), DST_ATTR_IDX_TO_PTR, DST_INFO_attributes, DST_INFO_flag, DST_INFO_IDX_TO_PTR, DST_mk_subrange_type(), DST_SET_count, DST_SET_stride_1byte, DST_SET_stride_2byte, DST_SUBRANGE_TYPE_stride_ref, FALSE, FLD_next, FLD_ofst, FLD_type, INT32, FLD_HANDLE::Is_Null(), NULL, DST_cval_ref::ref, SCLASS_FORMAL, SCLASS_FORMAL_REF, ST_sclass, str, sz(), tf, TY_AR_etype, TY_AR_ubnd_val, TY_fld, TY_is_f90_pointer, Ty_Table, and x.
Referenced by cwh_dst_dope_type().
| static DST_INFO_IDX cwh_dst_dope_type | ( | TY_IDX | td, | |
| ST * | st, | |||
| mINT64 | off, | |||
| DST_INFO_IDX | parent, | |||
| BOOL | comp, | |||
| DST_INFO_IDX * | dope_ty | |||
| ) | [static] |
Definition at line 1835 of file cwh_dst.cxx.
References cwh_dst_dope_bounds(), cwh_dst_mk_type(), DST_append_child(), DST_INVALID_IDX, DST_mk_array_type(), DST_mk_pointer_type(), DW_ADDR_none, KIND_ARRAY, n, Pointer_Size, TRUE, TY_AR_etype, TY_kind, and USRCPOS_clear.
Referenced by cwh_dst_member(), cwh_dst_mk_common(), cwh_dst_mk_formal(), and cwh_dst_mk_variable().
| mUINT16 cwh_dst_enter_path | ( | char * | fname | ) |
Definition at line 2782 of file cwh_dst.cxx.
References DST_get_ordinal_num(), free(), idx, Make_Absolute_Path(), and mUINT16.
Referenced by cwh_dst_init_file(), cwh_stab_set_linenum(), and cwh_stmt_init_srcpos().
Definition at line 537 of file cwh_dst.cxx.
References Be_Type_Tbl, comp_unit_idx, CURRENT_SYMTAB, cwh_dst_basetype(), cwh_dst_inner_add_DST(), cwh_dst_inner_clear_DSTs(), cwh_dst_inner_read_DSTs(), cwh_dst_mk_func(), cwh_dst_mk_MAIN(), cwh_dst_mk_var(), cwh_dst_process_var(), cwh_dst_struct_clear_DSTs(), Debug_Level, DST_append_child(), DST_begin_PU(), DST_end_PU(), DST_INVALID_IDX, For_all(), i, I_element, MTYPE_I4, MTYPE_I8, NULL, PU_is_mainpu(), PU_is_nested_func(), PU_lexical_level, Pu_Table, ST_pu(), St_Table, and void.
Referenced by PDGCS_do_proc().
| char* cwh_dst_filename_from_filenum | ( | INT | idx | ) |
Definition at line 2955 of file cwh_dst.cxx.
References Is_True.
Referenced by cwh_addr_insert_bounds_check(), and cwh_stmt_insert_conformance_check().
| static char* cwh_dst_get_command_line_options | ( | void | ) | [static] |
Definition at line 2817 of file cwh_dst.cxx.
References BOOL, calloc(), Debug_Level, endcp, fclose(), FE_command_line, fgets(), fileno, fopen, free(), fstat, INT32, malloc, NULL, save_argc, save_argv, stat::st_size, strcpy, and strlen().
Referenced by cwh_dst_init_file().
Definition at line 2454 of file cwh_dst.cxx.
References FALSE, FLD_next, FLD_type, FLD_HANDLE::Is_Null(), KIND_POINTER, KIND_STRUCT, TRUE, TY_fld, TY_kind, TY_pointed, and Ty_Table.
Referenced by cwh_dst_mk_common(), and cwh_dst_mk_var().
| void cwh_dst_init_file | ( | char * | src_path | ) |
Definition at line 140 of file cwh_dst.cxx.
References comp_unit_idx, current_host_dir, current_working_dir, cwd_buffer, cwh_dst_enter_path(), cwh_dst_get_command_line_options(), Debug_Level, DST_Init(), DST_mk_compile_unit(), DW_ID_case_insensitive, DW_LANG_Fortran90, exit(), free(), Get_Current_Working_Directory(), getdomainname(), gethostname(), INCLUDE_STAMP, malloc, NULL, perror(), strcat(), strchr, strcpy, strlen(), strrchr(), and void.
Referenced by PDGCS_initialize().
| static void cwh_dst_inner_add_DST | ( | DST_INFO_IDX | i | ) | [static] |
| static void cwh_dst_inner_read_DSTs | ( | DST_INFO_IDX | parent | ) | [static] |
Definition at line 2281 of file cwh_dst.cxx.
References DST_append_child(), and INT32.
Referenced by cwh_dst_enter_pu().
Definition at line 1796 of file cwh_dst.cxx.
References BOOL, DevAssert, FALSE, KIND_ARRAY, KIND_SCALAR, TRUE, TY_AR_etype, TY_is_character, TY_kind, and Ty_Table.
Referenced by cwh_dst_array_type().
| static DST_INFO_IDX cwh_dst_member | ( | FLD_HANDLE | fld, | |
| DST_INFO_IDX | parent | |||
| ) | [static] |
Definition at line 2043 of file cwh_dst.cxx.
References BOOL, cwh_dst_dope_type(), cwh_dst_mk_type(), DST_append_child(), DST_ATTR_IDX_TO_PTR, DST_INFO_attributes, DST_INFO_flag, DST_INFO_IDX_TO_PTR, DST_MEMBER_dopetype, DST_mk_member(), DST_SET_f90_pointer, FALSE, FLD_bofst, FLD_bsize, FLD_is_bit_field, FLD_name, FLD_ofst, FLD_type, INT, strcpy, strlen(), tolower(), TRUE, and USRCPOS_clear.
Referenced by cwh_dst_struct_type().
| static DST_INFO_IDX cwh_dst_mk_common | ( | ST * | st | ) | [static] |
Definition at line 1369 of file cwh_dst.cxx.
References BOOL, cwh_dst_dope_type(), cwh_dst_has_dope(), cwh_dst_mk_type(), DevAssert, DST_append_child(), DST_ATTR_IDX_TO_PTR, DST_INFO_attributes, DST_INFO_flag, DST_INFO_IDX_TO_PTR, DST_INVALID_IDX, DST_mk_common_block(), DST_mk_variable_comm(), DST_SET_allocatable, DST_SET_assumed_shape, DST_SET_assumed_size, DST_SET_deref, DST_SET_f90_pointer, DST_VARIABLE_comm_dopetype, FALSE, I_element, INT, KIND_STRUCT, NULL, ST_auxst_is_allocatable, ST_auxst_is_assumed_shape, ST_auxst_is_assumed_size, ST_auxst_is_f90_pointer, ST_name, ST_ofst, ST_st_idx, ST_type, strcpy, strlen(), tolower(), and TY_kind.
Referenced by cwh_dst_mk_var().
| static DST_INFO_IDX cwh_dst_mk_common_inclusion | ( | ST * | com, | |
| DST_INFO_IDX | c | |||
| ) | [static] |
Definition at line 1338 of file cwh_dst.cxx.
References DST_mk_common_incl().
Referenced by cwh_dst_mk_var().
| static void cwh_dst_mk_const | ( | ST * | st, | |
| DST_INFO_IDX | parent | |||
| ) | [static] |
Definition at line 301 of file cwh_dst.cxx.
References cwh_auxst_stem_name(), cwh_dst_mk_type(), DST_append_child(), DST_CONST_VALUE_form, DST_CONST_VALUE_form_data1, DST_CONST_VALUE_form_data2, DST_CONST_VALUE_form_data4, DST_CONST_VALUE_form_data8, DST_CONST_VALUE_form_string, DST_FORM_DATA1, DST_FORM_DATA2, DST_FORM_DATA4, DST_FORM_DATA8, DST_FORM_STRING, DST_mk_constant_def(), DST_mk_string(), DST_mk_variable_const(), exit(), FALSE, i, Index_to_char_array(), INT, KIND_ARRAY, memset, MTYPE_C4, MTYPE_C8, MTYPE_F16, MTYPE_F4, MTYPE_F8, MTYPE_FQ, MTYPE_I1, MTYPE_I2, MTYPE_I4, MTYPE_I8, MTYPE_STR, MTYPE_U1, MTYPE_U2, MTYPE_U4, MTYPE_U8, MTYPE_UNKNOWN, NULL, ptr, s, ST_tcon, ST_tcon_val(), ST_type, str, strlen(), strtok(), Tcon_Table, tolower(), TRUE, TY_is_character, TY_kind, TY_mtype, and TYPE_ID.
Referenced by cwh_dst_process_var().
| static DST_INFO_IDX cwh_dst_mk_dope_bound | ( | ST * | dp, | |
| mINT64 | offset, | |||
| DST_INFO_IDX | t, | |||
| DST_INFO_IDX | p, | |||
| BOOL | component | |||
| ) | [static] |
Definition at line 2356 of file cwh_dst.cxx.
References BOOL, DevAssert, DST_append_child(), DST_INFO_flag, DST_INFO_IDX_TO_PTR, DST_INVALID_IDX, DST_mk_member(), DST_mk_variable(), DST_mk_variable_comm(), DST_SET_base_deref, FALSE, KIND_ARRAY, n, NULL, Pointer_Size, SCLASS_AUTO, SCLASS_COMMON, SCLASS_DGLOBAL, SCLASS_FORMAL, SCLASS_FORMAL_REF, ST_auxst_is_f90_pointer, ST_base, ST_base_idx(), ST_sclass, ST_st_idx, ST_type, TRUE, TY_kind, and USRCPOS_clear.
Referenced by cwh_dst_dope_bounds().
| static DST_INFO_IDX cwh_dst_mk_formal | ( | ST * | st | ) | [static] |
Definition at line 1209 of file cwh_dst.cxx.
References BOOL, cwh_dst_dope_type(), cwh_dst_mk_type(), DST_ATTR_IDX_TO_PTR, DST_FORMAL_PARAMETER_dopetype, DST_INFO_attributes, DST_INFO_flag, DST_INFO_IDX_TO_PTR, DST_INVALID_IDX, DST_mk_formal_parameter(), DST_SET_assumed_shape, DST_SET_assumed_size, DST_SET_base_deref, DST_SET_deref, DST_SET_f90_pointer, FALSE, Has_Base_Block, INT, KIND_POINTER, SCLASS_FORMAL, SCLASS_FORMAL_REF, ST_auxst_is_assumed_shape, ST_auxst_is_assumed_size, ST_auxst_is_f90_pointer, ST_base, ST_is_value_parm, ST_name, ST_ofst, ST_sclass, ST_st_idx, ST_type, strcpy, strlen(), tolower(), TRUE, TY_kind, and TY_pointed.
Referenced by cwh_dst_mk_var().
Definition at line 646 of file cwh_dst.cxx.
References cwh_dst_mk_subroutine_type(), DST_add_linkage_name_to_subprogram(), DST_INVALID_IDX, DST_mk_entry_point(), DST_mk_subprogram(), DW_INL_not_inlined, DW_VIRTUALITY_none, FALSE, free(), i, INT32, n, NULL, p, PU_is_mainpu(), PU_prototype(), Pu_Table, r, ST_name, ST_pu(), ST_st_idx, strdup, strlen(), and TRUE.
Referenced by cwh_dst_enter_pu().
| static void cwh_dst_mk_MAIN | ( | ST * | mn, | |
| DST_INFO_IDX | en_idx | |||
| ) | [static] |
Definition at line 751 of file cwh_dst.cxx.
References comp_unit_idx, cwh_dst_mk_subroutine_type(), DST_append_child(), DST_mk_subprogram(), DW_INL_not_inlined, DW_VIRTUALITY_none, FALSE, i, NULL, PU_prototype(), Pu_Table, ST_name, ST_pu(), ST_st_idx, and TRUE.
Referenced by cwh_dst_enter_pu().
| static DST_INFO_IDX cwh_dst_mk_subroutine_type | ( | TY_IDX | ty | ) | [static] |
Definition at line 1608 of file cwh_dst.cxx.
References Be_Type_Tbl, cwh_dst_basetype(), DST_append_child(), DST_INVALID_IDX, DST_IS_NULL, DST_mk_subroutine_type(), FALSE, MTYPE_V, NULL, and USRCPOS_clear.
Referenced by cwh_dst_mk_func(), cwh_dst_mk_MAIN(), and cwh_dst_mk_type().
| static DST_INFO_IDX cwh_dst_mk_type | ( | TY_IDX | ty | ) | [static] |
Definition at line 1503 of file cwh_dst.cxx.
References break, cwh_dst_array_type(), cwh_dst_basetype(), cwh_dst_mk_subroutine_type(), cwh_dst_pointer_type(), cwh_dst_struct_type(), DevAssert, DST_INVALID_IDX, KIND_ARRAY, KIND_FUNCTION, KIND_POINTER, KIND_SCALAR, KIND_STRUCT, KIND_VOID, and TY_kind.
Referenced by cwh_dst_array_type(), cwh_dst_dope_bounds(), cwh_dst_dope_type(), cwh_dst_member(), cwh_dst_mk_common(), cwh_dst_mk_const(), cwh_dst_mk_formal(), cwh_dst_mk_variable(), and cwh_dst_pointer_type().
| static void cwh_dst_mk_var | ( | ST * | st, | |
| DST_INFO_IDX | parent | |||
| ) | [static] |
Definition at line 964 of file cwh_dst.cxx.
References cwh_auxst_get_list(), cwh_dst_has_dope(), cwh_dst_mk_common(), cwh_dst_mk_common_inclusion(), cwh_dst_mk_formal(), cwh_dst_mk_variable(), DST_append_child(), DST_INVALID_IDX, DST_IS_NULL, FALSE, FmtAssert, Has_Base_Block, I_element, I_next, INT, L_first, l_NAMELIST, L_num, SCLASS_COMMON, SCLASS_DGLOBAL, SCLASS_FORMAL, SCLASS_FORMAL_REF, ST_base, ST_is_namelist, ST_is_temp_var, ST_name, ST_sclass, ST_type, strcmp(), strncmp(), and void.
Referenced by cwh_dst_enter_pu(), and cwh_dst_process_var().
| static DST_INFO_IDX cwh_dst_mk_variable | ( | ST * | st | ) | [static] |
Definition at line 1108 of file cwh_dst.cxx.
References BOOL, cwh_dst_dope_type(), cwh_dst_mk_type(), d, DST_ATTR_IDX_TO_PTR, DST_INFO_attributes, DST_INFO_flag, DST_INFO_IDX_TO_PTR, DST_INVALID_IDX, DST_mk_variable(), DST_SET_allocatable, DST_SET_assumed_shape, DST_SET_assumed_size, DST_SET_deref, DST_SET_f90_pointer, DST_VARIABLE_def_dopetype, FALSE, Has_Base_Block, INT, SCLASS_AUTO, ST_auxst_is_allocatable, ST_auxst_is_assumed_shape, ST_auxst_is_assumed_size, ST_auxst_is_auto_or_cpointer, ST_auxst_is_f90_pointer, ST_auxst_is_tmp, ST_name, ST_ofst, ST_sclass, ST_st_idx, ST_type, strcpy, strlen(), tolower(), and TRUE.
Referenced by cwh_dst_mk_var(), cwh_dst_subrange(), and cwh_dst_substring_type().
| static DST_INFO_IDX cwh_dst_pointer_type | ( | TY_IDX | ty | ) | [static] |
Definition at line 1584 of file cwh_dst.cxx.
References cwh_dst_mk_type(), DST_append_child(), DST_mk_pointer_type(), DW_ADDR_none, TY_pointed, and TY_size.
Referenced by cwh_dst_mk_type().
Definition at line 278 of file cwh_dst.cxx.
References CLASS_CONST, CLASS_VAR, cwh_dst_mk_const(), cwh_dst_mk_var(), and ST_class.
Referenced by cwh_dst_enter_pu().
| static enum str_knd cwh_dst_stride_kind | ( | TY_IDX | ty | ) | [static] |
Definition at line 1976 of file cwh_dst.cxx.
References at(), break, cwh_types_is_character(), DevAssert, f, FLD_next, FLD_type, FLD_HANDLE::Is_Null(), KIND_ARRAY, KIND_POINTER, KIND_SCALAR, KIND_STRUCT, MTYPE_I1, MTYPE_I2, MTYPE_U1, MTYPE_U2, TY_AR_etype, TY_fld, TY_kind, TY_mtype, TY_pointed, and Ty_Table.
Referenced by cwh_dst_dope_bounds().
| static DST_INFO_IDX cwh_dst_struct_has_DST | ( | TY_IDX | ty | ) | [static] |
Definition at line 2149 of file cwh_dst.cxx.
References BOOL, DST_INVALID_IDX, FALSE, FLD_next, FLD_type, INT32, FLD_HANDLE::Is_Null(), KIND_ARRAY, KIND_STRUCT, TRUE, TY_AR_etype, TY_fld, TY_is_f90_pointer, TY_kind, and Ty_Table.
Referenced by cwh_dst_struct_type().
| static void cwh_dst_struct_set_DST | ( | TY_IDX | ty, | |
| DST_INFO_IDX | i | |||
| ) | [static] |
Definition at line 2208 of file cwh_dst.cxx.
References realloc.
Referenced by cwh_dst_struct_type().
| static DST_INFO_IDX cwh_dst_struct_type | ( | TY_IDX | ty | ) | [static] |
Definition at line 1694 of file cwh_dst.cxx.
References cwh_dst_member(), cwh_dst_struct_has_DST(), cwh_dst_struct_set_DST(), DST_append_child(), DST_INVALID_IDX, DST_IS_NULL, DST_mk_structure_type(), f, FALSE, FLD_next, INT, FLD_HANDLE::Is_Null(), strcpy, strlen(), tolower(), TY_fld, TY_name, TY_size, Ty_Table, USRCPOS_clear, and void.
Referenced by cwh_dst_mk_type().
| static DST_INFO_IDX cwh_dst_subrange | ( | ARB_HANDLE | ar | ) | [static] |
Definition at line 2298 of file cwh_dst.cxx.
References ARB_const_lbnd, ARB_const_ubnd, ARB_lbnd_val, ARB_lbnd_var(), ARB_ubnd_val, ARB_ubnd_var(), BOOL, DST_cval_ref::cval, cwh_dst_mk_variable(), DST_append_child(), DST_INFO_flag, DST_INFO_IDX_TO_PTR, DST_mk_subrange_type(), DST_SET_count, FALSE, DST_cval_ref::ref, and St_Table.
Referenced by cwh_dst_array_type().
| static DST_INFO_IDX cwh_dst_substring_type | ( | TY_IDX | ty | ) | [static] |
Definition at line 1754 of file cwh_dst.cxx.
References ARB_const_ubnd, ARB_ubnd_val, ARB_ubnd_var(), DST_cval_ref::cval, cwh_dst_mk_variable(), DST_append_child(), DST_mk_string_type(), DST_cval_ref::ref, St_Table, TY_arb(), TY_name, and USRCPOS_clear.
Referenced by cwh_dst_array_type().
Definition at line 224 of file cwh_dst.cxx.
References comp_unit_idx, DST_dump(), DST_IS_NULL, DST_preorder_visit(), DST_set_assoc_idx(), DST_set_dump_filename(), DST_write_directories(), DST_write_files(), DSTdump_File_Name, NULL, and void.
Referenced by PDGCS_terminate().
Definition at line 2736 of file cwh_dst.cxx.
References dir, strdup, and strrchr().
Referenced by DST_write_files().
| static mUINT16 DST_get_ordinal_num | ( | char * | the_name, | |
| char *** | the_list, | |||
| mUINT16 * | the_next, | |||
| mUINT16 * | the_size | |||
| ) | [static] |
Definition at line 2640 of file cwh_dst.cxx.
References idx, malloc, mUINT16, next, NULL, realloc, size, and strcmp().
Referenced by cwh_dst_enter_path(), and DST_write_files().
| static INT32 DST_set_assoc_idx | ( | INT32 | dummy, | |
| DST_DW_tag | tag, | |||
| DST_flag | flag, | |||
| DST_ATTR_IDX | iattr, | |||
| DST_INFO_IDX | inode | |||
| ) | [static] |
Definition at line 2490 of file cwh_dst.cxx.
References assoc(), DevAssert, DST_ATTR_IDX_TO_PTR, DST_COMMON_BLOCK_st, DST_ENTRY_POINT_st, DST_FORMAL_PARAMETER_st, DST_INFO_flag, DST_INFO_IDX_TO_PTR, DST_INLINED_SUBROUTINE_high_pc, DST_INLINED_SUBROUTINE_low_pc, DST_IS_assoc_fe, DST_IS_comm, DST_IS_declaration, DST_IS_memdef, DST_LABEL_low_pc, DST_LEXICAL_BLOCK_high_pc, DST_LEXICAL_BLOCK_low_pc, DST_RESET_assoc_fe, DST_SET_assoc_idx, DST_SUBPROGRAM_def_st, DST_SUBPROGRAM_memdef_st, DST_VARIABLE_comm_st, DST_VARIABLE_def_st, DST_VARIABLE_memdef_st, DW_TAG_common_block, DW_TAG_entry_point, DW_TAG_formal_parameter, DW_TAG_inlined_subroutine, DW_TAG_label, DW_TAG_lexical_block, DW_TAG_subprogram, DW_TAG_variable, FALSE, Get_ST_Id(), index(), make_ST_IDX(), mINT32, node, pDST_ASSOC_INFO_fe_ptr, and pDST_ASSOC_INFO_st_idx.
Referenced by cwh_dst_write().
| static DST_DIR_IDX DST_write_directories | ( | void | ) | [static] |
Definition at line 2757 of file cwh_dst.cxx.
References DST_INVALID_INIT, DST_mk_include_dir(), and mUINT16.
Referenced by cwh_dst_write().
| static DST_FILE_IDX DST_write_files | ( | void | ) | [static] |
Definition at line 2687 of file cwh_dst.cxx.
References DST_directory_of(), DST_get_ordinal_num(), DST_INVALID_INIT, DST_mk_file_name(), file_size, INT32, stat::st_mtime, stat::st_size, stat, UINT32, and UINT64.
Referenced by cwh_dst_write().
Definition at line 2929 of file cwh_dst.cxx.
References ST_IDX_index(), and ST_IDX_level().
Referenced by DST_set_assoc_idx().
| char* FE_command_line = NULL |
Definition at line 125 of file cwh_dst.cxx.
Referenced by cwh_dst_get_command_line_options(), Process_Command_Line(), and update_rii_file().
const char* source_file = __FILE__ [static] |
Definition at line 73 of file cwh_dst.cxx.
1.5.6