Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Berlin <dberlin@dberlin.org>
To: Daniel Jacobowitz <drow@false.org>
Cc: Wu Zhou <woodzltc@cn.ibm.com>,
	gcc-patches@gcc.gnu.org,  gdb-patches@sourceware.org,
	pinskia@gcc.gnu.org
Subject: Re: [RFC] Use DW_CC_program to indicate Fortran main subroutine
Date: Mon, 21 Nov 2005 18:10:00 -0000	[thread overview]
Message-ID: <1132582460.3076.22.camel@linux.site> (raw)
In-Reply-To: <20051121051017.GA12030@nevyn.them.org>

On Mon, 2005-11-21 at 00:10 -0500, Daniel Jacobowitz wrote:
> On Mon, Nov 21, 2005 at 12:44:33PM +0800, Wu Zhou wrote:
> > Hello GCC and GDB maintainers,
> > 
> > We ever discussed about how to indicate the main subroutine of fortran 
> > and java code with DWARF info (GCC PR 23280, 1427 and 10220; GDB PR 822).
> > My point is that DW_CC_program might be the final solution.  Here is what 
> > DWARF standard said about this:
> > 
> >   If the semantics of the language of the compilation unit containing the
> >   subroutine entry distinguishes between ordinary subroutines and 
> >   subroutines that can serve as the main program, that is, subroutines 
> >   that cannot be called directly according to the ordinary calling 
> >   conventions, then the debugging information entry for such a subroutine 
> >   may have a calling convention attribute whose value is the constant 
> >   DW_CC_program. 
> > 
> >   The DW_CC_program value is intended to support Fortran main programs. It 
> >   is not intended as a way of finding the entry address for the program.
> 
> The compiler patch I can't comment on...
> 
> As for calling set_main_name, I don't know if this is right or not.  I
> guess it depends what the DWARF folks meant by "not intended as a way
> of finding the entry address for the program". 

It means it wasn't intended to be reused for this purpose, AFAIK.
:)

>  Can a Fortran binary
> have more than one "main program"?
> 
> If they only meant "it does not indicate the address you can jump to in
> order to start", then this seems quite reasonable.
> 
> If that's the case then it should work for gcj too.  You'll have a
> function named main, with no special debug info, and also a function
> with DW_CC_program at the real entry point.

I remember asking Wu to file an issue with the dwarf working group, and
that issue was resolved by deferring to DWARF 4 for now.

See
http://dwarf.freestandards.org/ShowIssue.php?issue=050808.2&type=closed


For now, why don't we just add a new vendor attribute?
DW_AT_GNU_main





  parent reply	other threads:[~2005-11-21 14:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-21  7:28 Wu Zhou
2005-11-21 14:14 ` Daniel Jacobowitz
2005-11-21 14:58   ` Jim Blandy
2005-11-21 16:37     ` Daniel Berlin
2005-11-21 18:10   ` Daniel Berlin [this message]
2005-11-21 22:02   ` Jason Merrill
2005-11-21 22:03     ` Daniel Jacobowitz
2005-11-22  8:15       ` Wu Zhou
2006-02-20 17:22         ` Daniel Jacobowitz
2006-02-24  4:42           ` Wu Zhou

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=1132582460.3076.22.camel@linux.site \
    --to=dberlin@dberlin.org \
    --cc=drow@false.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pinskia@gcc.gnu.org \
    --cc=woodzltc@cn.ibm.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