EVAL Commands for System and Space Pointers

The example below shows the use of the EVAL command with system and space pointers. The system and space pointers are based on the source in Source for Sample EVAL Commands for Displaying System and Space Pointers.

Figure 1. Sample EVAL Commands for System and Space Pointers
 System and Space Pointers
// System pointers are formatted
// :1934:QTEMP     :111111110
>eval pSYSptr
 pSYSptr =
           SYP:QTEUSERSPC
           0011100
// Space pointers return 8 bytes that can be used in
// System Service Tools
>eval pBuffer
 pBuffer = SPP:0000071ECD000200

You can use the EVAL command on C and C++ language features and constructs. The ILE source debugger can display a full class or structure but only with those fields defined in the derived class. You can display a base class in full by casting the derived class to the particular base class.

The example below shows the use of the EVAL command with C++ language constructs. The C++ language constructs are based on the source in Source for Sample EVAL Commands for Displaying C++ Constructs. Additional C++ examples are provided in the source debugger online help.

Figure 2. Sample EVAL Commands for C++ Expressions
// Follow the class hierarchy (specifying class D is optional)
> EVAL *(class D *)this
  (*(class D *)this).__vbp1B = SPP:C40F5E3D7F000490
  (*(class D *)this).__vbp1D = SPP:C40F5E3D7F000440
  (*(class D *)this).d = 4

// Follow the class hierarchy (without specifying class D)
> EVAL *(D *)this
  (*(D *)this).__vbp1B = SPP:C40F5E3D7F000490
  (*(D *)this).__vbp1D = SPP:C40F5E3D7F000440
  (*(D *)this).d = 4

// Look at a local variable
> EVAL VAR
  VAR = 1

// Look at a global variable
> EVAL ::VAR
  ::VAR = 2

// Look at a class member (specifying this-> is optional)
> EVAL this->f
  this->f = 6

// Look at a class member (without specifying this->)
> EVAL f
  f = 6

// Disambiguate variable ac
> EVAL A::ac
  A::ac = 12

// Scope operator with template
> EVAL E<int>::ac
  E<int>::ac = 12

// Cast with template:
> EVAL *(E<int> *)this
  (*(E<int> *)this).__vbp1B = SPP:C40F5E3D7F000490
  (*(E<int> *)this).__vbp1EXTi_ = SPP:C40F5E3D7F000400
  (*(E<int> *)this).e = 5

// Assign a value to a variable
> EVAL f=23
  f=23 = 23

// See all local variables in a single EVAL statement
> EVAL %LOCALVARS
  local = 828
  this = SPP:C40F5E3D7F000400
  VAR = 1