parameters: (val)
docstring: Use this in a printer's children() method to print an object's fields.
  
      e.g.
        def children():
          for result in yield_fields(self.val):
            yield result
docstring_summary: Use this in a printer's children() method to print an object's fields.
docstring_tokens: Use this in a printer s children () method to print an object s fields .
function: def yield_fields(val):
      """Use this in a printer's children() method to print an object's fields.
  
      e.g.
        def children():
          for result in yield_fields(self.val):
            yield result
      """
      try:
          fields = val.type.target().fields()
      except:
          fields = val.type.fields()
      for field in fields:
          if field.is_base_class:
              yield (field.name, val.cast(gdb.lookup_type(field.name)))
          else:
              yield (field.name, val[field.name])
function_tokens: def yield_fields ( val ) : try : fields = val . type . target ( ) . fields ( ) except : fields = val . type . fields ( ) for field in fields : if field . is_base_class : yield ( field . name , val . cast ( gdb . lookup_type ( field . name ) ) ) else : yield ( field . name , val [ field . name ] )