public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: sana@stl.sarov.ru
To: gcc-gnats@gcc.gnu.org
Cc: miwako.tokugawa@intel.com
Subject: debug/10220: attribute DW_AT_calling_convention
Date: Wed, 26 Mar 2003 12:16:00 -0000	[thread overview]
Message-ID: <20030326110902.26981.qmail@sources.redhat.com> (raw)


>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@stl.sarov.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:


                 reply	other threads:[~2003-03-26 11:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030326110902.26981.qmail@sources.redhat.com \
    --to=sana@stl.sarov.ru \
    --cc=gcc-gnats@gcc.gnu.org \
    --cc=miwako.tokugawa@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).