parameters: (self, val)
return_statement: return s
docstring: Lookup the default pretty-printer for val and use it.
  
      If no pretty-printer is defined for the type of val, print an error and
      return a placeholder string.
docstring_summary: Lookup the default pretty-printer for val and use it.
docstring_tokens: Lookup the default pretty - printer for val and use it .
function: def string_from_pretty_printer_lookup(self, val):
      '''Lookup the default pretty-printer for val and use it.
  
      If no pretty-printer is defined for the type of val, print an error and
      return a placeholder string.'''
  
      pp = gdb.default_visualizer(val)
      if pp:
        s = pp.to_string()
  
        # The pretty-printer may return a LazyString instead of an actual Python
        # string.  Convert it to a Python string.  However, GDB doesn't seem to
        # register the LazyString type, so we can't check
        # "type(s) == gdb.LazyString".
        if 'LazyString' in type(s).__name__:
          s = s.value().string()
  
      else:
        print(('No pretty printer for {} found. The resulting Twine ' +
               'representation will be incomplete.').format(val.type.name))
        s = '(missing {})'.format(val.type.name)
  
      return s
function_tokens: def string_from_pretty_printer_lookup ( self , val ) : pp = gdb . default_visualizer ( val ) if pp : s = pp . to_string ( ) # The pretty-printer may return a LazyString instead of an actual Python # string.  Convert it to a Python string.  However, GDB doesn't seem to # register the LazyString type, so we can't check # "type(s) == gdb.LazyString". if 'LazyString' in type ( s ) . __name__ : s = s . value ( ) . string ( ) else : print ( ( 'No pretty printer for {} found. The resulting Twine ' + 'representation will be incomplete.' ) . format ( val . type . name ) ) s = '(missing {})' . format ( val . type . name ) return s