Public bug reported:
Binary package hint: gdb
I write some fortran codes whose file name is 'aa.for' as follow:
program main
real,dimension(5,5):: a
do 12 i=1,5
do 12 j=1,5
a(i,j)=i+j
12 continue
write(*,*) a(2,3)
end
Then ,use gdb to debug:
(gdb) l
1 program main
2 real,dimension(5,5):: a
3 do 12 i=1,5
4 do 12 j=1,5
5 a(i,j)=i+j
6 12 continue
7 write(*,*) a(2,3)
8 end
9
(gdb) b 7
Breakpoint 1 at 0x804864e: file aa.for, line 7.
(gdb) r
Starting program: /home/dgt/soft/bad/a
Breakpoint 1, main () at aa.for:7
7 write(*,*) a(2,3)
Current language: auto
The current source language is "auto; currently fortran".
(gdb) p a(1,2)
no such vector element
(gdb) p a(1,1)
$1 = 2
(gdb) p a(2,4)
no such vector element
indicate that:
for a two dimension array,gdb can only show the value of the first element.
Other element ,i.e. a(1,2), gdb can not refer to.
my OS is " ubuntu9.10 " .
I use " gfortran -g aa.for -o a " to generate the executable
file a.
** Affects: gdb (Ubuntu)
Importance: Undecided
Status: New
--
gdb can't refer to a single element in a two dimension array
https://bugs.launchpad.net/bugs/500691
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs