[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
| 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 | 
873.0. "Comparing types with full scopes..." by DECC::MJHANS (Matthew Hanselman, DEC C) Mon Mar 10 1997 13:36
    Comparing two completely qualified variables (i.e. with scopes) doesn't
    work.  I wanted to compare two pointers across functions.  It can be
    narrowed to this test case.
    
    Here, you can compare &a and b successfully with the command:
    
    	print &a == b
    or
    	print "tmp.cxx"`main`&a == b
    
    But it fais when you try
    	print "tmp.cxx"`main`&a == "tmp.cxx"`main`b
    
    ladebug gives this error:
    
    	Error: &a=="tmp.cxx" is not a valid file or function name.
    	Error: no value for tmp.cxx`main`&a=="tmp.cxx"`main`b
    
    
    							- Matt
    
    ----------------
    // tmp.cxx
    main()
    {
      int a;
      int* b = &a;
    
      return 0;
    }
    ---------------
    Welcome to the Ladebug Debugger Version 4.0-30
    ------------------ 
    object file name: a.out 
    Reading symbolic information ...done
    (ladebug) stop at 7
    [#1: stop at "tmp.cxx":7 ]
    (ladebug) run
    [1] stopped at [int main(void):7 0x12000210c]
          7   return 0;
    (ladebug) print "tmp.cxx"`main`&a
    0x11ffff3c0
    (ladebug) print "tmp.cxx"`main`b
    0x11ffff3c0
    (ladebug) print &a == b
    1
    (ladebug) print "tmp.cxx"`main`&a == "tmp.cxx"`main`b
    Error: &a=="tmp.cxx" is not a valid file or function name.
    Error: no value for tmp.cxx`main`&a=="tmp.cxx"`main`b
    
    
| T.R | Title | User | Personal Name
 | Date | Lines | 
|---|
| 873.1 | Added | TLE::MERRITT | Steve Merritt, Ladebug Team | Fri Apr 18 1997 13:59 | 3 | 
|  | I've added this to the C++ bugs list.
-Steve
 |