GDBMI_var_list_children.st
changeset 12 568a2971c977
child 78 c24e7d8bc881
equal deleted inserted replaced
11:474fbb650afe 12:568a2971c977
       
     1 "{ Package: 'jv:libgdbs' }"
       
     2 
       
     3 GDBMICommand subclass:#GDBMI_var_list_children
       
     4 	instanceVariableNames:''
       
     5 	classVariableNames:''
       
     6 	poolDictionaries:''
       
     7 	category:'GDB-Core-Commands-MI'
       
     8 !
       
     9 
       
    10 !GDBMI_var_list_children class methodsFor:'documentation'!
       
    11 
       
    12 documentation
       
    13 "
       
    14 The `-var-list-children' Command
       
    15 --------------------------------
       
    16 
       
    17 Synopsis
       
    18 ........
       
    19 
       
    20       -var-list-children [PRINT-VALUES] NAME [FROM TO]
       
    21 Return a list of the children of the specified variable object and
       
    22 create variable objects for them, if they do not already exist.  With a
       
    23 single argument or if PRINT-VALUES has a value of 0 or `--no-values',
       
    24 print only the names of the variables; if PRINT-VALUES is 1 or
       
    25 `--all-values', also print their values; and if it is 2 or
       
    26 `--simple-values' print the name and value for simple data types and
       
    27 just the name for arrays, structures and unions.
       
    28 
       
    29    FROM and TO, if specified, indicate the range of children to report.
       
    30 If FROM or TO is less than zero, the range is reset and all children
       
    31 will be reported.  Otherwise, children starting at FROM (zero-based)
       
    32 and up to and excluding TO will be reported.
       
    33 
       
    34    If a child range is requested, it will only affect the current call
       
    35 to `-var-list-children', but not future calls to `-var-update'.  For
       
    36 this, you must instead use `-var-set-update-range'.  The intent of this
       
    37 approach is to enable a front end to implement any update approach it
       
    38 likes; for example, scrolling a view may cause the front end to request
       
    39 more children with `-var-list-children', and then the front end could
       
    40 call `-var-set-update-range' with a different range to ensure that
       
    41 future updates are restricted to just the visible items.
       
    42 
       
    43    For each child the following results are returned:
       
    44 
       
    45 NAME
       
    46      Name of the variable object created for this child.
       
    47 
       
    48 EXP
       
    49      The expression to be shown to the user by the front end to
       
    50      designate this child.  For example this may be the name of a
       
    51      structure member.
       
    52 
       
    53      For a dynamic varobj, this value cannot be used to form an
       
    54      expression.  There is no way to do this at all with a dynamic
       
    55      varobj.
       
    56 
       
    57      For C/C++ structures there are several pseudo children returned to
       
    58      designate access qualifiers.  For these pseudo children EXP is
       
    59      `public', `private', or `protected'.  In this case the type and
       
    60      value are not present.
       
    61 
       
    62      A dynamic varobj will not report the access qualifying
       
    63      pseudo-children, regardless of the language.  This information is
       
    64      not available at all with a dynamic varobj.
       
    65 
       
    66 NUMCHILD
       
    67      Number of children this child has.  For a dynamic varobj, this
       
    68      will be 0.
       
    69 
       
    70 TYPE
       
    71      The type of the child.  If `print object' (*note set print object:
       
    72      Print Settings.) is set to `on', the _actual_ (derived) type of
       
    73      the object is shown rather than the _declared_ one.
       
    74 
       
    75 VALUE
       
    76      If values were requested, this is the value.
       
    77 
       
    78 THREAD-ID
       
    79      If this variable object is associated with a thread, this is the
       
    80      thread id.  Otherwise this result is not present.
       
    81 
       
    82 FROZEN
       
    83      If the variable object is frozen, this variable will be present
       
    84      with a value of 1.
       
    85 
       
    86 DISPLAYHINT
       
    87      A dynamic varobj can supply a display hint to the front end.  The
       
    88      value comes directly from the Python pretty-printer object's
       
    89      `display_hint' method.  *Note Pretty Printing API::.
       
    90 
       
    91 DYNAMIC
       
    92      This attribute will be present and have the value `1' if the
       
    93      varobj is a dynamic varobj.  If the varobj is not a dynamic varobj,
       
    94      then this attribute will not be present.
       
    95 
       
    96 
       
    97    The result may have its own attributes:
       
    98 
       
    99 `displayhint'
       
   100      A dynamic varobj can supply a display hint to the front end.  The
       
   101      value comes directly from the Python pretty-printer object's
       
   102      `display_hint' method.  *Note Pretty Printing API::.
       
   103 
       
   104 `has_more'
       
   105      This is an integer attribute which is nonzero if there are children
       
   106      remaining after the end of the selected range.
       
   107 
       
   108 Example
       
   109 .......
       
   110 
       
   111      (gdb)
       
   112       -var-list-children n
       
   113       ^done,numchild=N,children=[child={name=NAME,exp=EXP,
       
   114       numchild=N,type=TYPE},(repeats N times)]
       
   115      (gdb)
       
   116       -var-list-children --all-values n
       
   117       ^done,numchild=N,children=[child={name=NAME,exp=EXP,
       
   118       numchild=N,value=VALUE,type=TYPE},(repeats N times)]
       
   119 
       
   120 
       
   121 "
       
   122 ! !
       
   123 
       
   124 !GDBMI_var_list_children methodsFor:'accessing'!
       
   125 
       
   126 operation
       
   127 	^ 'var-list-children'
       
   128 ! !
       
   129