z/OS Debugger evaluation of C and C++ expressions

z/OS® Debugger interprets most input as a collection of one or more expressions. You can use expressions to alter a program variable or to extend the program by adding expressions at points that are governed by AT breakpoints.

z/OS Debugger evaluates C and C++ expressions following the rules presented in z/OS XL C/C++ Language Reference. The result of an expression is equal to the result that would have been produced if the same expression had been part of your compiled program.

Implicit string concatenation is supported. For example, "abc" "def" is accepted for "abcdef" and treated identically. Concatenation of wide string literals to string literals is not accepted. For example, L"abc"L"def" is valid and equivalent to L"abcdef", but "abc" L"def" is not valid.

Expressions you use during your session are evaluated with the same sensitivity to enablement as are compiled expressions. Conditions that are enabled are the same ones that exist for program statements.

During a z/OS Debugger session, if the current setting for WARNING is ON, the occurrence in your C or C++ program of any one of the conditions listed below causes the display of a diagnostic message.
  • Division by zero
  • Remainder (%) operator for a zero value in the second operand
  • Array subscript out of bounds for a defined array
  • Bit shifting by a number that is either negative or greater than 32
  • Incorrect number of parameters, or parameter type mismatches for a function call
  • Differing linkage calling conventions for a function call
  • Assignment of an integer value to a variable of enumeration data type where the integer value does not correspond to an integer value of one of the enumeration constants of the enumeration data type
  • Assignment to an lvalue that has the const attribute
  • Attempt to take the address of an object with register storage class
  • A signed integer constant not in the range -2**31 to 2**31
  • A real constant not having an exponent of 3 or fewer digits
  • A float constant not larger than 5.39796053469340278908664699142502496E-79 or smaller than 7.2370055773322622139731865630429929E+75
  • A hex escape sequence that does not contain at least one hexadecimal digit
  • An octal escape sequence with an integer value of 256 or greater
  • An unsigned integer constant greater than the maximum value of 4294967295.

Refer to the following topics for more information related to the material discussed in this topic.