This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Add DW_AT_main_subprogram tag to Fortran main program


On Sun, Oct 03, 2010 at 03:08:51PM +0200, FX wrote:
> Attached patch adds the DW_AT_main_subprogram DWARF 4 tag to the main Fortran program.
> 
> Bootstrapped and regtested on x86_64-linux. With a recent readelf, a main program compiled with patch says:
> 
>  <1><2e>: Abbrev Number: 2 (DW_TAG_subprogram)
>     <2f>   DW_AT_name        : (indirect string, offset: 0x5): MAIN__	
>     <33>   DW_AT_decl_file   : 1	
>     <34>   DW_AT_decl_line   : 1	
>     <35>   DW_AT_low_pc      : 0x0	
>     <3d>   DW_AT_high_pc     : 0x6	
>     <45>   DW_AT_frame_base  : 1 byte block: 9c 	(DW_OP_call_frame_cfa)
>     <47>   DW_AT_main_subprogram: 1	
>     <47>   DW_AT_calling_convention: 2	(program)
> 
> 
> OK to commit?

+      add_AT_flag (subr_die, DW_AT_main_subprogram, 1);

should be guarded by
  if (dwarf_version >= 4 || !dwarf_strict)

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]