This is the mail archive of the gdb@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: multidimensional fortran arrays


On Thu, 02 Sep 2010 19:29:07 +0200, Mathew Yeates wrote:
> I mentioned this before but got no reply. So I have been getting the
> address of the array and using "x/f".
> But now I am using 4 dimensional arrays and this is getting old.
> 
> Anyone have any ideas how to fix this? print myarray(1,2) -> "so such
> vec element"

For some reason it really does not work even for static arrays.  
program a
  integer :: v (2, 3, 4)
  v (:, :, :) = 10
  v (2, 3, 4) = 20
  v (2, 3, 4) = 20 ! line 5
end
(gdb) b 5
(gdb) r
(gdb) p v(2,3,4)
no such vector element

It works on archer-jankratochvil-vla
(gdb) p v(2,3,4)
$1 = 20
available at
	http://sourceware.org/gdb/wiki/ArcherBranchManagement
(or Fedora releases) but the support has some other problems and I should
merge it to FSF GDB soon.


Thanks,
Jan


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