nath@cernvax.UUCP (Alfred Nathaniel) (11/30/89)
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 1989lilian@mips.COM (Lilian Leung) (12/02/89)
In article <1163@cernvax.UUCP> nath@cernvax.UUCP (Alfred Nathaniel) writes: >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 This was a bug in the version 1.31 of dbx. It has since been fixed in our version 2.0. Please contact DEC for their next release of dbx that corresponds to our MIPS version 2.0. Lilian -- UUCP: {ames,decwrl,prls,pyramid}!mips!lilian (or lilian@mips.com) DDD: 408-991-7848 Lilian Leung (or 408-720-1700, Ext. 848) USPS: MIPS Computer Systems, 930 Arques, Sunnyvale, CA 94086-3650