[4435] in Athena Bugs

home help back first fref pref prev next nref lref last post

vax 6.4R: dbx

daemon@ATHENA.MIT.EDU (ellis@ATHENA.MIT.EDU)
Tue Mar 6 18:10:07 1990

From: ellis@ATHENA.MIT.EDU
To: bugs@ATHENA.MIT.EDU
Date: Tue, 06 Mar 90 18:09:42 EST
System name:		E40-369-2
Type and version:	CVAXSTAR 6.4R
Display type:		SM

What were you trying to do?
        examine the contents of an array in a fortran program using the
        "trace" command in dbx 

What's wrong:
        The "trace" command in dbx causes dbx to get a bus error,seg violation
        and/or internal error when trying to trace entire array. Error varies
        with program and array being examined.


What should have happened:
	Each time array element changes, trace should print array.
 
    The following f77 program demonstrates this problem. To duplicate:
        a. compile with "f77 -g test.f" 
	b. run  "dbx a.out"
        c. In dbx, type "trace a" then "run"

	c
	c Cut here for test f77 program
	c
	      
	      program test
	C
	C
	      dimension a(30,10)
	      
	      write(6,*) "calling test"
	      call test1(a,5,5)
	      do 10 j = 1,10
	         do 20 i = 1,30
	            if ( i .eq. j ) then
	               a(i, j) = 0.0
	            endif
	 20      continue
	 10   continue
	C
	      stop
	      end
	      subroutine test1(a,n,m)
	       dimension a(n,m)
	      do 10 j = 1,m
	         do 20 i = 1,n
	            a(i,j) = float(i) + float(j)
	 20      continue 
	 10   continue 
	      return
	      end
	      
   The following C program, when compiled demonstrates expected behavior.

/* Sample C program for trace test in dbx */
static float  a[5][5];

main()
{
  printf("start work");
  test1(&a);
  printf ("Cease work");
}

test1(b)
float b[5][5];
{
 int i,j;

   for(i=0;i < 5; i++) {
        for(j=0;j < 5; j++) {
               b[i][j] = i + j;
	     }
      }
}




home help back first fref pref prev next nref lref last post