The Question is:
I've got Fortran Written application he goes crazy ( looping ) at some
unpredictable moments. It runs in batch. All can see it his PC ( Program
counter always jumping to the same adress . How can I translate to Program
counter to a Source line number. Ob
vious I do have the
Fortan Source. Maybe you can give me a hint
The Answer is :
Simplest way, assuming the image is linked at least TRACEBACK:
$ RUN/DEBUG program
DBG> SET MODULE/ALL
DBG> SET RADIX HEX
DBG> EXAMINE/INSTRUCTION address
Note that there is no need to actually run the program, you're just using DEBUG
to symbolise the PC.
To go further, you can SET PROCESS/SUSPEND to freeze the process, then use
SDA (privilege required) to see what it's doing.
SDA> SET PROCESS/INDEX=pid
SDA> SHOW CALL ! show call frame of current routine
SDA> SHOW CALL/NEXT ! show call frame of caller
SDA> SHOW CALL/NEXT ! show call frame of caller's caller
Then, using DEBUG or the linker MAP file, you should be able to reconstruct
the call stack, and maybe even the arguments.