[Bug fortran/23280] gfortran does not emit DW_AT_entry_point (dwarf-2) debugging info
fxcoudert at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Jun 13 06:10:00 GMT 2009
------- 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><ba>: 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 : <b2>
DW_AT_prototyped : 0
DW_AT_name : func
DW_AT_low_pc : 0
DW_AT_high_pc : 0x2c
DW_AT_external : 1
<2><db>: 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 : <b2>
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
More information about the Gcc-bugs
mailing list