← Back to team overview

touch-packages team mailing list archive

[Bug 500691] Re: gdb can't refer to a single element in a two dimension array

 

apparently fixed in 14.10

** Changed in: gdb (Ubuntu)
       Status: Confirmed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to gdb in Ubuntu.
https://bugs.launchpad.net/bugs/500691

Title:
  gdb can't refer to a single element in a two dimension array

Status in “gdb” package in Ubuntu:
  Fix Released

Bug description:
  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/500691/+subscriptions