Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!mcsun!cernvax!nath From: nath@cernvax.UUCP (Alfred Nathaniel) Newsgroups: comp.unix.ultrix Subject: dbx cannot debug f77 programs Message-ID: <1163@cernvax.UUCP> Date: 30 Nov 89 11:49:17 GMT Reply-To: nath@cernvax.UUCP (Alfred Nathaniel) Organization: CERN European Laboratory for Particle Physics, CH-1211 Geneva, Switzerland Lines: 44 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