This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH/RFA] PR gdb/648
- From: Jim Blandy <jimb at redhat dot com>
- To: David Lecomber <david at streamline-computing dot com>
- Cc: patches <gdb-patches at sources dot redhat dot com>
- Date: 13 Aug 2004 17:10:29 -0500
- Subject: Re: [PATCH/RFA] PR gdb/648
- References: <1091830216.4188.23.camel@localhost>
David Lecomber <david@streamline-computing.com> writes:
> 2004-08-06 David Lecomber <dsl@sources.redhat.com>
>
> Fix PR gdb/648
> * dwarf2read.c (read_array_type): Handle column major arrays
> correctly. Assume column major for Fortran except with G77
> compiler.
> * eval.c (evaluate_subexp_standard): Assume Fortran arrays are
> oriented large to small in type structure.
Thanks very much for the patch and test program. It was helpful to be
able to actually look at what GNU F77 was producing for a real Fortran
program.
For the dwarf2read.c part, I think the essential approach is fine.
However:
- Rather than recognizing Fortran specially in read_array_type, I'd
rather have a new member of 'struct language_defn' giving the array
ordering for that language.
- I'd like to have the logic that chooses a byte order pulled out of
read_array_type into its own function that takes a die, a cu, and
returns a DW_ORD_ value. That function would take care of looking
for a DW_AT_ordering attribute, recognizing the appropriate versions
of GNU F77, and so on. read_array_type should call that function
and build the type appropriately.