This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa/symtab] array bounds, int -> enum
- From: Jim Blandy <jimb at redhat dot com>
- To: Michael Elizabeth Chastain <mec at shout dot net>
- Cc: ezannoni at redhat dot com, gdb-patches at sources dot redhat dot com,ac131313 at redhat dot com
- Date: 21 Aug 2003 22:42:05 -0500
- Subject: Re: [rfa/symtab] array bounds, int -> enum
- References: <200308212234.h7LMYuAF000490@duracef.shout.net>
Michael Elizabeth Chastain <mec@shout.net> writes:
> I removed the FIXME because it is a bad idea. Code in valops.c and
> varobj.c, among other places, check the bound type (although they do it
> trivially). I don't see any language specifier in main_type; the
> language is over in the symbol code, not in the type code. So it would
> be difficult, and probably useless, to make all code that looks at array
> bound types check whether the type is a "FORTRAN type" or not before
> looking at the array bounds. Just use appropriate bound types for all
> array symbols in all languages and be done with it.
I think deleting the FIXME is fine.
If one were going to do that, one would indicate whether they applied
by splitting TYPE_CODE_ARRAY into TYPE_CODE_ARRAY and
TYPE_CODE_FORTRAN_ARRAY, or something --- that is, let the
discriminant say which fields are present / meaningful. But we don't
really do that, so it's not worth it.
> Testing: the usual drill, native i686-pc-linux-gnu, gcc v2 and v3,
> dwarf-2 and stabs+.
>
> Okay to apply?
Yes, please do.