This is the mail archive of the gcc-bugs@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]

debug/10220: attribute DW_AT_calling_convention


>Number:         10220
>Category:       debug
>Synopsis:       attribute DW_AT_calling_convention
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 26 11:16:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     sana at stl dot sarov dot ru
>Release:        unknown-1.0
>Organization:
>Environment:
f77 on RH7.2,RH8.0
>Description:
Fortran compiler (f77) does not emit attribute DW_AT_calling_convention with value DW_CC_program for fortran main subprogram (with name MAIN__).

As result there are problems with setting of breakpoints in the start of debugging:
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) b 15
No line 15 in file "init.c".
(gdb) 

The reason of it is absence of debug information for file, which contains 'main'. That is why GDB tries to use debug information form file crt1.o and reports about file init.c.

Problem is the same when other debug format is used.

Besides there are no information about original name of main fortran subprogram at all

(gdb) b bcommon
Function "bcommon" not defined.
(gdb) q
 
Debug information is 

 <1><84>: Abbrev Number: 2 (DW_TAG_subprogram)
     DW_AT_sibling     : <190>  
     DW_AT_external    : 1      
     DW_AT_name        : MAIN__ 
     DW_AT_decl_file   : 1      
     DW_AT_decl_line   : 2      
     DW_AT_low_pc      : 0x8048e90 134516368    
     DW_AT_high_pc     : 0x8048fc0 134516672    
     DW_AT_frame_base  : 1 byte block: 55       (DW_OP_reg5)

>How-To-Repeat:

Test is other fortran test.
For example
c This routine tests blank common blocks
      program bcommon
      integer fun
      common ivo1,ivo2,ivo3
      common /a/a1(3)
      data a1/4,5,6/
      ivo1 = 0
      ivo2 = 1
      ivo3 = 2
      call sub1
      print *,ivo1,ivo2,ivo3
      print *,a1
      m=fun()
      print *,ivo1,ivo2,ivo3
      end
      subroutine sub1
      common ivo4,ivo5,ivo6
      ivo4=ivo4+1
      ivo5=ivo5+1
      ivo6=ivo6+1
      print *,ivo4,ivo5,ivo6
      end

      integer function fun()
      common ivo7,ivo8,ivo9
      common /a/b(3)
      ivo7=ivo7+b(1)
      ivo8=ivo8+b(2)
      ivo9=ivo9+b(3)
      fun=ivo8
      return
      end
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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