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: [RFC]: Testcase for gdb's handling of Fortran's column-firstarray


On Wed, 2 Nov 2005, Jim Blandy wrote:

> 
> David Lecomber <david@lecomber.net> writes:
> > I've not checked gfortran behaviour -- if it works, it's either because
> > gfortran haven't fixed the original issue, or they changed the
> > expression that we check the 'producer' against before making the swap
> > round (you'll find that in dwarf2readc).
> 
> It's worth pointing out that, if the type includes an explicit
> DW_AT_ordering attribute, GDB uses that, and doesn't check the
> producer string at all.  So if g77 gets fixed, they could avoid
> running afoul of the "GNU F77" check simply by making their ordering
> explicit.

I just noticed that there is an attribute for array index ordering.  It 
is very good IMO.  But AFAIK, the g77 is not in active development 
nowadays.  So maybe we can suggest that gfortran developers adopt this so 
that gdb could handle it more gracefully.

GFortran developers,

Would anyone of you feel like adding this attribute into your dwarf 
output?  It is much convenient for gdb to handle the index ordering of 
Fortran arrays.

> 
> This is still a bit of a kludge: the Dwarf spec says that, in the
> absence of an ordering attribute, the ordering is the default for the
> language.  So an explicit "column major" attribute in a Fortran
> compilation unit would be redundant.  I only mention it as a way for
> G77 to avoid breaking old GDB's.
> 


Regards
- Wu Zhou


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