| Title: | Digital Ladebug debugger | 
| Moderator: | TLE::LUCIA | 
| Created: | Fri Feb 28 1992 | 
| Last Modified: | Fri Jun 06 1997 | 
| Last Successful Update: | Fri Jun 06 1997 | 
| Number of topics: | 969 | 
| Total number of notes: | 3959 | 
[Unix v4.0a / f77 v4.1 / ladebug 4.0-27]
A customer points out some unexplained behavior when running ladebug
on a short f77 program.  In his original (lengthy) application is a
declaration of an integer array named "int". It apparently doesn't
collide with the f77 intrinsic function 'int()' and compiles/links
with no problems.
But when he uses ladebug to examine values in that array, he gets the
following error:
        ...
        (ladebug) p int(1)
        print int(1)
                ^
        Unable to parse input as legal command or Fortran expression.
        (ladebug)
Looks like the function 'int()' conflicts with some intrinsic info within
ladebug -- unless someone can propose another reason for this behavior ?
Unfortunately, he can't change the array name because he doesn't own the code.
I reproduced the behavior here with a short example:
      # cat q.f
      program mytest
      integer a(100)
      integer int(100)
      do i=1,50
        a(i)= i * 1
        int(i) = i * 10
      end do
      print *, "value of array element        a(5):", a(5)
      print *, "value of array element      int(5):", int(5)
      stop
      end
      # f77 -g q.f
      # a.out
      value of array element        a(5):           5
      value of array element      int(5):          50
      #
Here's a log of my ladebug session:
-----------------------------------
    # f77 -g q.f
    # ladebug a.out
    Welcome to the Ladebug Debugger Version 4.0-27
    ------------------
    object file name: a.out
    Reading symbolic information ...done
    (ladebug) stop at 11
    [#1: stop at "q.f":11 ]
    (ladebug) run
    [1] stopped at [mytest:11 0x120001594]
         11         int(i) = i * 10
    (ladebug) p a(1)
    1
    (ladebug) p int(1)
    print int(1)
            ^
    Unable to parse input as legal command or Fortran expression.
    (ladebug) quit
    #
So, are we looking at a limitation of ladebug ?
Other than getting access to sources and renaming all the int() array
references, might there be another workaround ?
Thanks in advance for any information or pointers !
                        Steve Sheppard
                        Digital Unix / Ultrix Applications Support Team
                        [email protected]
| T.R | Title | User | Personal Name | Date | Lines | 
|---|---|---|---|---|---|
| 853.1 | Can you see array int if you use upper case? | SUBPAC::FARICELLI | Wed Feb 26 1997 16:59 | 7 | |
| Hmmm. Try accessing the array in using upper case: (ladebug) print INT(1) 10 (ladebug) whatis INT integer*4 INT(1:100) | |||||
| 853.2 | ...nope... | RHETT::SHEPPARD | Thu Feb 27 1997 09:47 | 54 | |
| Okay, I tried that but it didn't help...
Here are my results:
    % f77 -g q.f
    % ladebug a.out
    Welcome to the Ladebug Debugger Version 4.0-27
    ------------------
    object file name: a.out
    Reading symbolic information ...list 1-30
    done
    (ladebug) list 1-30
          1       program mytest
          2
          3       integer a(100)
          4       integer int(100)
          5       real k
          6
          7       k=3.333
          8
          9       do i=1,50
         10         a(i)= i * 1
         11         int(i) = i * 10
         12       end do
         13
         14       print *, "value of array element        a(5):", a(5)
         15       print *, "value of array element      int(5):", int(5)
         16
         17       stop
         18       end
    (ladebug) stop at 11
    [#1: stop at "q.f":11 ]
    (ladebug) run
    [1] stopped at [mytest:11 0x120001594]
         11         int(i) = i * 10
    (ladebug) p a(1)
    1
    (ladebug) p int(1)
    print int(1)
            ^
    Unable to parse input as legal command or Fortran expression.
    (ladebug) p INT(1)
    print INT(1)
            ^
    Unable to parse input as legal command or Fortran expression.
    (ladebug) whatis int()
    <function>*
    (ladebug) whatis INT()
    <function>*
    (ladebug) whatis int
    int int
    (ladebug) whatis INT
    int INT
    (ladebug)
 | |||||
| 853.3 | Rats... | SUBPAC::FARICELLI | Thu Feb 27 1997 10:29 | 7 | |
| Sigh. I've got an older version of decladebug (Version 4.0-14A) on my workstation. Guess that's why it works for me. Perhaps Tim can comment. -- John Faricelli | |||||
| 853.4 | TLE::MURRAY | Wanfang Murray | Thu Feb 27 1997 11:49 | 7 | |
| I don't remember we have changed anything here will afect this since 4.0-14. But, something must have changed :-). We will look into this. Wanfang | |||||
| 853.5 | 4.0-30 is no go | RHETT::HALETKY | Wed Mar 12 1997 13:41 | 7 | |
|     
    
    Any status on this? 4.0-30 still has problems.
    
    
    -e dhaletky
    
 | |||||