dbx cannot debug f77 programs

Alfred Nathaniel nath at cernvax.UUCP
Thu Nov 30 22:49:17 AEST 1989


I found that dbx messes up its pointers to COMMON variables as soon as a
subroutine is entered. Below you find a simple example to illustrate it.

This happens on a DECstation 3100 running Ultrix 3.1 and makes it totally
unusable as a workstation to develope Fortran code.

Does anyone have an idea of an workaround or is there a patch to fix it?

Script started on Thu Nov 30 11:39:48 1989
% cat junk.f
      COMMON/COM/I
      I=1
      CALL SUB
      END
      SUBROUTINE SUB
      COMMON/COM/I
      I=I+1
      END
% f77 -g junk.f
% dbx a.out
dbx version 1.31
Type 'help' for help.
reading symbolic information ...
[using junk.MAIN]
MAIN:   2  I=1
(dbx) stop at 2
[2] stop at "junk.f":2
(dbx) run
[2] stopped at [junk.MAIN:2 ,0x4001bc] 	I=1
(dbx) print &i,i
0x10002320 0 
(dbx) step
[junk.MAIN:3 +0x14,0x4001c4] 	CALL SUB
(dbx) print &i,i
0x10002320 1 
(dbx) step
[sub:3 +0x3c,0x4001ec] 	CALL SUB
(dbx) print &i,i
0x1200acd8 
cannot read address 0x1200acd8 for process 350

(dbx) q
% 
script done on Thu Nov 30 11:43:27 1989



More information about the Comp.unix.ultrix mailing list