This is the mail archive of the gdb-patches@sourceware.org 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: Problems while debugging fortran


On Thu, Oct 25, 2007 at 08:30:38AM -0700, Jim Blandy wrote:
> This comment isn't right.  The Fortran main program expects to have
> its arguments passed to it differently than other subroutines or
> functions; that's what DW_AT_calling_convention is meant to express.
> The comment should say something like:
> 
>   /* DWARF doesn't provide a way to identify a program's entry point.
>      However, the Fortran main program receives its arguments via a
>      special calling convention; we look for that to recognize the
>      program's entry point.  */

Have we concluded that this is true?  If so, is there any reason we
should not make gfortran generate this attribute?  And if so, why
not GNAT or GCJ too?

The only thing we risk (that I can think of) in treating DW_CC_program
as a marker for main is that if the architecture required
DW_CC_program to indicate calling convention on a per-function basis
we would fail to implement "print main()" correctly.  I don't think
that matters.

-- 
Daniel Jacobowitz
CodeSourcery


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