gdb bug in Fortran language mode [was Re: gdb and g77]
Jeffrey A Law
law@cygnus.com
Wed Jun 30 15:43:00 GMT 1999
In message < 19990615000628.10897.qmail@deer >you write:
> The summary: I believe gdb is the culprit, specifically, its Fortran
> language mode doesn't handle multi-dimension arrays (for stabs debugging
> anyway) correctly.
That is my opinion too.
For the Fortran example we get following stab
.stabs "a:(0,47)=ar(0,20);0;5;(0,48)=ar(0,20);0;4;(0,32)",128,0,1,-128
> --------
> REAL A(0:4,0:5)
> A(3,2) = 5
> END
> --------
It defines two new types (47 & 48).
Type 47 is an array. The index type is 20 (integer) with a range 0..5
inclusive. The elements in the array are of type 48.
Type for is an array. The index type is 20 (integer) with a range of 0..4
inclusive. The elements in this arary are of type 32 (real).
The fact that when you print the array as a whole and it looks OK leads
me to believe that gdb's reading in the debug record and interpreting it
correctly. When you try to print individual elements, things go wacko,
makes me wonder about the expression parser in gdb.
More information about the Gcc
mailing list