Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* dbx and OSF1
@ 1998-04-15  4:00 G. Orrie Gartner
  1998-04-15  4:00 ` Andreas Manschke
  1998-04-15  4:00 ` Peter Thompson
  0 siblings, 2 replies; 3+ messages in thread
From: G. Orrie Gartner @ 1998-04-15  4:00 UTC (permalink / raw)





Hello,

  I was curious if anyone has any insight into this "feature" of OSF1.
We are running version 4.0c of Digital Unix and compile a simple
Fortran program which looks as follows:

      program tmp
      real a(5, 5)
      real var
      integer i,j,k
      var=1.
      do 10 i=1,5
         do 10 j=1,5
         a(i,j)=var
      print*,i,j,k,a(i,j)
               var = var+1.
  10  continue
      var = var-1.
      end

Then, using the dbx debugger we try examining the array:

 (dbx) list
     6        do 10 i=1,5
     7           do 10 j=1,5
     8              do 10 k=1,5
     9                 a(i,j,k)=var
    10        print*,i,j,k,a(i,j,k)
    11                 var = var+1.
    12    10  continue
    13        var = var-1.
    14        end
(dbx) stop at 13
[2] stop at "tmp.f":13
(dbx) run
        ...
[2] stopped at   [tmp:13 ,0x12000165c]  var = var-1.
(dbx) print i
6
(dbx) print a[1,1,1]
Denormalized number 0x800df588
(dbx) &a[1,1,1]/1f
00000001400001d0:  -0.0000000
(dbx) print var
126.000000
(dbx) quit

It seems dbx does not print the array values although the other information
is fine.  Does anyone have any thoughts on this?  Thanks so much!

  Orrie Gartner
  UnixOps/ITS
  University of Colorado at Boulder




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dbx and OSF1
  1998-04-15  4:00 dbx and OSF1 G. Orrie Gartner
@ 1998-04-15  4:00 ` Andreas Manschke
  1998-04-15  4:00 ` Peter Thompson
  1 sibling, 0 replies; 3+ messages in thread
From: Andreas Manschke @ 1998-04-15  4:00 UTC (permalink / raw)
  To: G. Orrie Gartner


Hi Orrie,

I have tried a little with your program.
At first, I used the program which is listed
from the dbx. It differs a little from your source.

Are you using the DEC Fortran Compiler V 5.0 ? On my
systems, your "feature" exists for that version only.
When I try with

f77_410 -g x.f

on the same machine I get:

.
.
.

[2] stopped at   [tmp:13 ,0x12000165c]  var = var-1.
(dbx) print a[1,1,1]
1.000000 

Perhaps you have still the old compiler version ?

Hope this helps,

Andreas



orrie@rintintin.Colorado.EDU (G. Orrie Gartner) writes:
> 
> 
> Hello,
> 
>   I was curious if anyone has any insight into this "feature" of OSF1.
> We are running version 4.0c of Digital Unix and compile a simple
> Fortran program which looks as follows:
> 
>       program tmp
>       real a(5, 5)
>       real var
>       integer i,j,k
>       var=1.
>       do 10 i=1,5
>          do 10 j=1,5
>          a(i,j)=var
>       print*,i,j,k,a(i,j)
>                var = var+1.
>   10  continue
>       var = var-1.
>       end
> 
> Then, using the dbx debugger we try examining the array:
> 
>  (dbx) list
>      6        do 10 i=1,5
>      7           do 10 j=1,5
>      8              do 10 k=1,5
>      9                 a(i,j,k)=var
>     10        print*,i,j,k,a(i,j,k)
>     11                 var = var+1.
>     12    10  continue
>     13        var = var-1.
>     14        end
> (dbx) stop at 13
> [2] stop at "tmp.f":13
> (dbx) run
>         ...
> [2] stopped at   [tmp:13 ,0x12000165c]  var = var-1.
> (dbx) print i
> 6
> (dbx) print a[1,1,1]
> Denormalized number 0x800df588
> (dbx) &a[1,1,1]/1f
> 00000001400001d0:  -0.0000000
> (dbx) print var
> 126.000000
> (dbx) quit
> 
> It seems dbx does not print the array values although the other information
> is fine.  Does anyone have any thoughts on this?  Thanks so much!
> 
>   Orrie Gartner
>   UnixOps/ITS
>   University of Colorado at Boulder
> 

-- 
|  manschke@uni-bremen.de        |
|  Dr. Andreas Manschke          |
|  University of Bremen, Germany |



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dbx and OSF1
  1998-04-15  4:00 dbx and OSF1 G. Orrie Gartner
  1998-04-15  4:00 ` Andreas Manschke
@ 1998-04-15  4:00 ` Peter Thompson
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Thompson @ 1998-04-15  4:00 UTC (permalink / raw)



> (dbx) print a[1,1,1]
> Denormalized number 0x800df588
> (dbx) &a[1,1,1]/1f
> 00000001400001d0:  -0.0000000

This is a rather familiar sounding error, but I can't
recall where the fix was.  It works fine on both a 
straight 4.0 system and on my bleeding edge, not
yet released development OS.  Haven't located a 4.0c
system to try it out on yet.  I can't remember if the
Fortran symbol table was leading us astray or if
dbx was just miscalculating the address of the
start of the array. (I seem to recall it being off 
by a int or long just ahead of the array.)  But I
can't find any comments in the source that decodes
fortran that would pin it down as a dbx fix. 
Which may just mean that the fix was in a different
file, or that the Fortran folks had to fix their
symbol table to get things to work correctly.
If you experience the same problem with ladebug, 
then I'd guess the problem is in the compiler
itself.

But it appears fixed with the versions I'm using.

PeterT



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-04-15  4:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-04-15  4:00 dbx and OSF1 G. Orrie Gartner
1998-04-15  4:00 ` Andreas Manschke
1998-04-15  4:00 ` Peter Thompson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox