as the first line in each source file (easily automated, esp. dynamically); this creates a table which maps the hex offsets reported in a traceback to source code line numbers. Requires -V compiler flag.
| flag | meaning |
|---|---|
| +T | produces a traceback with hex offsets on failures, not a core dump |
| -V | produce a source listing file, with line numbers and hex offset map |
| Other useful options | |
| +R | include cross-reference listing |
| -C | check array subscripts at execute time |
| -K | make arrays static, zero arrays; equivalent to save, zero options on historic compilers; often makes code run slower, but some "dusty deck" source assumes this behavior, and fails without -K |
ON REAL UNDERFLOW CALL HPREALUF
ON DOUBLE PRECISION UNDERFLOW CALL HPDBLEUF
This enables 2 user trap handlers; the code for them is simple--
SUBROUTINE HPREALUF(U)
REAL U
U = 0.0
RETURN
END
SUBROUTINE HPDBLEUF(U)
DOUBLE PRECISION U
U = 0.d0
RETURN
END
This is all that's required to get tracebacks which can (indirectly)
point to the source code line number, even for code compiled with -O or
+O3, with no cryptic and tedious debugger syntax to deal with. The
traeback itself includes the routine names and a hexadecimal offset; the
listing file produced by the -V option contains a cross reference between
source line numbers and hexadecimal offsets. The correspondence is
approximate, however, for optimized code.