parameters: (val)
docstring: Dereference a raw or smart pointer.
docstring_summary: Dereference a raw or smart pointer.
docstring_tokens: Dereference a raw or smart pointer .
function: def deref(val):
      """
      Dereference a raw or smart pointer.
      """
      ty = get_basic_type(val.type)
      if ty.code == gdb.TYPE_CODE_PTR:
          return val.dereference()
      if ty.name.startswith('std::'):
          if "shared" in ty.name:
              return SharedPtr(val).value
          if "unique" in ty.name:
              return UniquePtr(val).value
      raise TypeError(f"Cannot dereference value of type '{ty.name}'")
function_tokens: def deref ( val ) : ty = get_basic_type ( val . type ) if ty . code == gdb . TYPE_CODE_PTR : return val . dereference ( ) if ty . name . startswith ( 'std::' ) : if "shared" in ty . name : return SharedPtr ( val ) . value if "unique" in ty . name : return UniquePtr ( val ) . value raise TypeError ( f"Cannot dereference value of type '{ty.name}'" )