From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22892 invoked by alias); 13 Jun 2009 06:10:42 -0000 Received: (qmail 22852 invoked by uid 48); 13 Jun 2009 06:10:30 -0000 Date: Sat, 13 Jun 2009 06:10:00 -0000 Message-ID: <20090613061030.22851.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/23280] gfortran does not emit DW_AT_entry_point (dwarf-2) debugging info In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "fxcoudert at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-06/txt/msg00810.txt.bz2 ------- Comment #3 from fxcoudert at gcc dot gnu dot org 2009-06-13 06:10 ------- (In reply to comment #2) > We should actually emit DW_AT_calling_convention for the main program. We currently correctly emit DW_AT_calling_convention. > The DW_AT_entry_point attribute is for alternate entries, which, yes, > we should also emit but don't. Here's an example: subroutine func() entry ent () end subroutine With intel ("ifort -c -g" followed by "readelf -wi"), we get one subprogram and one entry point: <1>: Abbrev Number: 3 (DW_TAG_subprogram) DW_AT_decl_line : 1 DW_AT_decl_column : 12 DW_AT_decl_file : 1 DW_AT_inline : 0 (not inlined) DW_AT_accessibility: 1 (public) DW_AT_type : DW_AT_prototyped : 0 DW_AT_name : func DW_AT_low_pc : 0 DW_AT_high_pc : 0x2c DW_AT_external : 1 <2>: Abbrev Number: 4 (DW_TAG_entry_point) DW_AT_decl_line : 2 DW_AT_decl_column : 9 DW_AT_decl_file : 1 DW_AT_name : ent DW_AT_type : DW_AT_static_link : 3 byte block: 76 0 6 DW_AT_low_pc : 0x11 while with gfortran we get three subprograms: <1><2d>: Abbrev Number: 2 (DW_TAG_subprogram) DW_AT_external : 1 DW_AT_name : (indirect string, offset: 0x7a): func DW_AT_decl_file : 1 DW_AT_decl_line : 1 DW_AT_low_pc : 0 DW_AT_high_pc : 0x10 DW_AT_frame_base : 0 (location list) <1><49>: Abbrev Number: 3 (DW_TAG_subprogram) DW_AT_external : 1 DW_AT_name : ent DW_AT_decl_file : 1 DW_AT_decl_line : 2 DW_AT_low_pc : 0x10 DW_AT_high_pc : 0x20 DW_AT_frame_base : 0x60 (location list) <1><65>: Abbrev Number: 4 (DW_TAG_subprogram) DW_AT_name : (indirect string, offset: 0x0): master.0.func DW_AT_decl_file : 1 DW_AT_decl_line : 3 DW_AT_low_pc : 0x20 DW_AT_high_pc : 0x2a DW_AT_frame_base : 0xc0 (location list) DW_AT_sibling : <92> -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23280