![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
More on LevelsThe Display Levels field in the Debug > Show command (debugger windows) allows you to specify the number of levels of a structured object to display.
The following example shows the output when different values are provided for the Display Levels field. In this example, an array of three component records, where the third record component is an array is used.
For C/C++:
typdef struct { int first; int second; int third[2];
NESTED_RECORD; NESTED_RECORD nested_var[2];
Level 0
A Debug > Show command with a Level of 0 displays:
[0] = NESTED_RECORD ... [1] = NESTED_RECORD ...
Level 1
A Debug > Show command with a Level of 1 displays:
[0] = NESTED_RECORD first :1 second :2 third :ARRAY ... [1] = NESTED_RECORD first :11 second :12 third :ARRAY ...
Level 2
A Debug > Show command with a Level of 2 displays:
[0] = NESTED_RECORD first :1 second :2 third :ARRAY ... [0] = 3 [1] = 4 [1] = NESTED_RECORD first :11 second :12 third :ARRAY ... [0] = 13 [1] = 14
For Ada:
type Nested_Array is array (1..4) of Integer; type Nested_Rec is record First : Integer; Second : Integer; Third : Nested_Array; end record; Nested_Var : array (1..2) of Nested_Rec;
Level 0
A Debug > Show command with a Level of 0 displays:
.TESTER'BODY.NESTED_VAR => [ 1..2 ]
Level 1
A Debug > Show command with a Level of 1 displays:
.TESTER'BODY.NESTED_VAR => [ 1..2 ] [ 1 => [ FIRST => 1, SECOND => 2, THIRD => [ 1..4 ] ], 2 => [ FIRST => 21, SECOND => 22, THIRD => [ 1..4 ] ] ]
Level 2
A Debug > Show command with a Level of 2 displays:
.TESTER'BODY.NESTED_VAR => [ 1..2 ] [ 1 => [ FIRST => 1, SECOND => 2, THIRD => [ 1..4 ] [ 1 => 21, 2 => 22, 3 => 23, 4 => 24 ] ], 2 => [ FIRST => 1, SECOND => 2, THIRD => [ 1..4 ] [ 1 => 31, 2 => 32, 3 => 33, 4 => 34 ] ] ]
Rational Software Corporation http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |