Operating System - OpenVMS
1753451 Members
6202 Online
108794 Solutions
New Discussion юеВ

Re: Parameter Constants - Debugging Fortran 90

 
HDS
Frequent Advisor

Parameter Constants - Debugging Fortran 90

Hello.

I am looking for a way to view parameter constants during a debug session of a Fortran-90 program under OpenVMS Alpha V8.3.

Sample Program

program test
implicit none

integer*2 ii

character*8 text
parameter (text='Hello')
integer*4 number
parameter (number=2)

1000 continue

type *,text
type *,number

call exit
end

$ f90/debug=(symbol)/nooptimize test
$ link/debug test

OpenVMS Alpha Debug64 Version V8.3-014

When attempting to evaluate the parameter constants TEXT or NUMBER while in debug, the error %DEBUG-E-NOSYMBOL occurs. I attempted using DUMP, EVALUATE and EXAMINE without success. I also tried viewing them as globals.

I recall using /debug=(symbols,parameter) in Fortran-77 to enable the ability to use EVALUATE to look at parameter constants, but this option does not appear to be available for Fortran-90.

Suggestions are greatly appreciated.
Many thanks,

-Howard-
4 REPLIES 4
John Gillings
Honored Contributor

Re: Parameter Constants - Debugging Fortran 90

Howard,

Make sure you're up to date with versions. I seem to recall (long ago) a version when parameters were dropped from the DEBUG symbol table to improve DEBUG performance. It's too easy to get very large numbers of unreferenced parameter constants defined, clogging up the tables).

The /DEBUG=PARAMETER qualifier was introduced to restore the old behaviour. There may also have been a qualifier to request only referenced parameters were included.

What other keywords are available for /DEBUG?
(I don't have an F90 compiler to check)

If all else fails, it's a fairly simple parsing task to extract your parameter definitions and convert them into DEBUG DEFINE/VALUE commands. Use the DEBUG @ command to execute your script.
A crucible of informative mistakes
HDS
Frequent Advisor

Re: Parameter Constants - Debugging Fortran 90

Thank you.

The idea to build a script to DEFINE values for the parameters is a good one. That will work for some cases but, unfortunately the PARAMETER statements are sometimes buried so deep in some INCLUDE in some called routine...hard to identify where they would be, making it difficult to know which file to use. I will give that a try though.

For the HELP for the F90/FORTRAN command options, I am attaching a dump of the HELP FORTRAN * for your convenience. The /DEBUG=PARAMETER is no longer available; am I understanding that there may be a newer version of F90 that has returned that option?

What's funny, as I look at the attached HELP listing is that the listed FORTRAN command defaults to /F77 and that the /NOF77 will rever to F66. Such leads me to think that something is amiss on the HELP and, therefore, possibly the DCL command definition in use. (Maybe there really is a newer version that allows for the /DEBUG=PARAMETER option...Hmmm...??)

-Howard-
John Gillings
Honored Contributor

Re: Parameter Constants - Debugging Fortran 90

Howard,

Log a case with your local CSC to clarify the situation and/or request the restoration of a lost feature.

To check if there are qualifiers or keywords available which aren't in HELP, look at the CLD file. Some are stored in SYS$UPDATE. If Fortran doesn't put a copy there, break open the kit to find it.
A crucible of informative mistakes
HDS
Frequent Advisor

Re: Parameter Constants - Debugging Fortran 90

Hello.

Unfortunately, no solution/explanation has been identified as of yet. This will be provided to the department responsible for the OS and its layered sw.

I thank you all for your advice.

-H-