debugging FORTRAN

From: esci <esci_at_fastlane.net>
Date: Mon, 18 Jan 1999 16:35:28 -0600 (CST)

Does anyone have any comments on the following? Surely I'm doing
something wrong.

Reg Beardsley
Exploration Software Consultants Inc.
rhb_at_acm.org

-------------- start of console log ----------------
dec%rhb {49} cat tst.f

      program test

      real*4 to ,to2

      write( 6 ,* ) 'Enter to'
      read( 5 ,* ) to

      to2 = to**2

      write( 6 , * ) 'to=' ,to ,'to2=' ,to2

      end

dec%rhb {50} f77 -g -o tst tst.f
dec%rhb {51} ladebug tst
Welcome to the Ladebug Debugger Version 4.0-43
------------------
object file name: tst
Reading symbolic information ...done
(ladebug) stop at 9
[#1: stop at "tst.f":9 ]
(ladebug) run
 Enter to
9
[1] stopped at [test:9 0x120001560]
      9 to2 = to**2
(ladebug) p to
print to
       ^
Unable to parse input as legal command or Fortran expression.
(ladebug) p (to)
9
(ladebug) p (to**2)
Evaluating '*2' failed!
The value (2) is not a pointer!
Error: no value for to * *2
(ladebug) n
stopped at [test:11 0x12000157c]
     11 write( 6 , * ) 'to=' ,to ,'to2=' ,to2
(ladebug) c
 to= 9.000000 to2= 81.00000
Process has exited with status 0
(ladebug) quit
dec%rhb {52} dbx tst
dbx version 3.11.10
Type 'help' for help.

test: 6 write( 6 ,* ) 'Enter to'
(dbx) stop at 9
[2] stop at "tst.f":9
(dbx) run
 Enter to
9
[2] stopped at [test:9 ,0x120001560] to2 = to**2
(dbx) p to
print to
      ^ syntax error
(dbx) p (to)
9.000000
(dbx) p (to**2)
print (to**2)
         ^ syntax error
(dbx) n
  [test:11 ,0x12000157c] write( 6 , * ) 'to=' ,to ,'to2=' ,to2
(dbx) n
 to= 9.000000 to2= 81.00000
  [test:13 ,0x1200015e0] end
(dbx) c

Program terminated normally

(dbx) quit
-------------- end of console log ----------------
Received on Mon Jan 18 1999 - 22:34:00 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:38 NZDT