This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
g77 array debugging
- To: gdb at sourceware dot cygnus dot com
- Subject: g77 array debugging
- From: Matthew Bettencourt <matt at mail dot ssc dot usm dot edu>
- Date: Fri, 23 Feb 2001 10:49:31 -0600
Hi, I hope this is not beat to death but I searched the archives and did
not find anything. Anyway, is there any good way to debug variable size
multi-dimed arrays??
What I am doing is the following
real a(-1:10,-2:4)
call sub1(a,-1,-2,10,4)
subroutine sub1(a,k,l,n,m)
integer m,n
real a(k:n,l:m)
a(3,3) = -3
return
end
Now in the debugger I am doing the following
(gdb) p (*a)(3,3)
Which gives me the value of the 3rd element, as does,
(gdb) p (*a)(3,10000000)
So, this is the same as doing
(gdb) p * ((float *)a+3)
Now, is there any support that will do the pointer math for me??
Thanks
matt
P.S, I have tried both the cvs version of gdb/gcc/g77 dloaded yesterday
and the RH 7.0 versions of these and I am running on a linux system
Thanks again