This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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]

Re: [PATCH] DW_AT_calling_convention support


Daniel Jacobowitz <drow@mvista.com> writes:
> On Wed, Jul 10, 2002 at 01:40:58PM -0500, Jim Blandy wrote:
> > 
> > Petr Sorfa <petrs@caldera.com> writes:
> > > > Okay, I'll look forward to the patch.
> > > In a few minutes.
> > > 
> > > > Is checking the calling convention really the approved technique for
> > > > recognizing a Fortran entry point in Dwarf 2?  Is it really the case
> > > > that Fortran programs always only have one function with this calling
> > > > convention?  Would your patch do something sensible if it found more
> > > > than one?
> > > Good question, the Dwarf standard V3 Draft 7 Page 44 says:
> > > 
> > > "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."
> > > 
> > > So the answer is yes and no. But I think the patch is valid as it
> > > determines not the entry point, but the main program. As far as I am
> > > aware you can have only one PROGRAM entry per FORTRAN program. If there
> > > is more than one found, the patch just uses the last read entry. I don't
> > > think supporting a more intricate way would be much use (such as keeping
> > > a list of DW_CC_program entries.)
> > 
> > What's the difference between the entry point and the main program?
> 
> The entry point is an implementation detail - like _start.  The main
> program is in user code, main() or "program foo".

I see.

I've read the Dwarf spec again, and it makes more sense to me now.
I'll try to review the patch later today.


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