where, ARRAY is the name of the array, and its size is 5x5.

The first two lines are comments about this file and the array. The third line denotes the array coordinates. From the fourth line, the elements of the array are listed. Note: This feature is not supported for the Fortran array slices.

14.27.2 Support for Fortran array slices

HP WDB prints Fortran array slices if you specify a range of elements by the Fortran 90 array section syntax. For instance, for an array X declared by REAL, DIMENSION(- 1:1, 2:10) :: X, you could print all five even-numbered elements of the row with the first dimension equal to 0 by typing the WDB command print X(0,2:10:2).

14.27.3 Displaying enumerators

You can display the union of several enumeration elements by specifying a value if the elements of the enumeration type are the powers of 2 and the given value is a sum of any given combination of the enumeration elements.

For example, assume you have an enumerated type named color in the program, with these elements: RED=0, ORANGE=1, YELLOW=2, GREEN=8, and BLUE=16. If you use the command printf 3, the debugger displays ORANGEYELLOW, the elements corresponding to 1 and 2. If you print 5, you will get the value, 5, because it does not form the sum of any combination in the set. However, if you wanted to print 25, you will get OrangeGreenBlue.

Values that do not form the sum of any combination of the elements will be displayed as integers while the values that form the sum of any combination of the elements will be printed as unions.

14.27.4 Support for debugging typedefs

When you have a typedef class as a template parameter, you can set a breakpoint on a member function by using the command:

break Class<typedef_classB>::memfunc

14.27.5 Support for steplast command for C and C++

Typically, if a function call has arguments that make further function calls, executing a simple step command in GDB steps into the argument evaluation call. HP WDB includes the steplast command, which helps to step into a function, and not into the calls for evaluating the arguments. However, the steplast command is not available on Integrity systems. The following example illustrates how GDB behaves when you execute the steplast command:

(gdb) 16 foo (bar ()); ---> bar() will return 10 (gdb) steplast foo (x=10) at foo.c:4 4 int k = 10;

If the steplast command is not meaningful for the current line, GDB displays the following error message:

14.27 Support for output logging 225

Page 225
Image 225
HP gnu source-level debugger 5992-4701 manual Support for Fortran array slices, Displaying enumerators