Author: pallavimathew Date: 2011-06-14 20:48:35 -0400 (Tue, 14 Jun 2011) New Revision: 3647
Modified: trunk/osprey/be/cg/cgdwarf.cxx trunk/osprey/crayf90/sgi/cwh_dst.cxx trunk/osprey/wgen/wgen_dst.cxx Log: Testcase: Any C or FORTRAN program compiled with -g. Description/Fix: The value of the DWARF DW_AT_producer attribute produced by the opencc and openf90 compilers is incorrect. openf90 generates "path90 <ver>" while opencc generates "openCC <ver>". Correct the DW_AT_producer attribute in the DW_TAG_compilation_unit DIE for openf90 and opencc. Also adds the DW_AT_low_pc and DW_AT_high_pc to the DW_TAG_compilation_unit DIE. C.R. Sun Chan. Modified: trunk/osprey/be/cg/cgdwarf.cxx =================================================================== --- trunk/osprey/be/cg/cgdwarf.cxx 2011-06-13 22:29:08 UTC (rev 3646) +++ trunk/osprey/be/cg/cgdwarf.cxx 2011-06-15 00:48:35 UTC (rev 3647) @@ -123,6 +123,8 @@ static Dwarf_Error dw_error; static BOOL Disable_DST = FALSE; static DST_INFO_IDX cu_idx; +static Dwarf_Unsigned cu_text_begin = 0; +static Dwarf_Unsigned cu_text_end = 0; static Elf64_Word cur_text_index; static DST_language Dwarf_Language; //static INT Current_Tree_Level; @@ -2430,6 +2432,8 @@ Dwarf_Unsigned end_entry = Cg_Dwarf_Symtab_Entry(CGD_LABIDX, end_label, scn_index); + if( !cu_text_begin ) cu_text_begin = begin_entry; + cu_text_end = end_entry; #ifndef TARG_X8664 fde = Build_Fde_For_Proc (dw_dbg, REGION_First_BB, @@ -2616,6 +2620,12 @@ CGD_Symtab.push_back(CGD_SYMTAB_ENTRY(CGD_ELFSYM, (Dwarf_Unsigned) -1)); } +void +Mark_CU_begin_end(Dwarf_P_Die cu_die, Dwarf_Unsigned low_pc, Dwarf_Unsigned high_pc) +{ + put_pc_value_symbolic (DW_AT_low_pc, low_pc, (Dwarf_Addr) 0, cu_die); + put_pc_value_symbolic (DW_AT_high_pc, high_pc, (Dwarf_Addr) 0, cu_die); +} /* go through any remaining DST entries after the last subprogram. This also handles the case of a file with no PUs. @@ -2623,6 +2633,7 @@ void Cg_Dwarf_Finish (pSCNINFO text_scninfo) { if (Disable_DST) return; + Mark_CU_begin_end(CGD_enclosing_proc[GLOBAL_LEVEL], cu_text_begin, cu_text_end); Traverse_Extra_DST(); /* do final pass for any info not emitted yet */ } Modified: trunk/osprey/crayf90/sgi/cwh_dst.cxx =================================================================== --- trunk/osprey/crayf90/sgi/cwh_dst.cxx 2011-06-13 22:29:08 UTC (rev 3646) +++ trunk/osprey/crayf90/sgi/cwh_dst.cxx 2011-06-15 00:48:35 UTC (rev 3647) @@ -159,7 +159,7 @@ #else // Bug 178 - AT_producer should be the name of the compiler and version info comp_info = (char *)malloc(sizeof(char)*100); - strcpy(comp_info, "pathf90 "); + strcpy(comp_info, "openf90 "); if (INCLUDE_STAMP) strcat(comp_info, INCLUDE_STAMP); Modified: trunk/osprey/wgen/wgen_dst.cxx =================================================================== --- trunk/osprey/wgen/wgen_dst.cxx 2011-06-13 22:29:08 UTC (rev 3646) +++ trunk/osprey/wgen/wgen_dst.cxx 2011-06-15 00:48:35 UTC (rev 3647) @@ -2939,9 +2939,7 @@ comp_info = DST_get_command_line_options(num_copts, copts); #else comp_info = (char *)malloc(sizeof(char)*100); -#ifdef PSC_TO_OPEN64 - strcpy(comp_info, "openCC "); -#endif + strcpy(comp_info, lang_cplus? "openCC ": "opencc "); if (INCLUDE_STAMP) strcat(comp_info, INCLUDE_STAMP); #endif ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel