code: def IsSymbolFileSane(self, position):
      
      pos = [position[0], None, None]
      self.EnsureGdbPosition(*pos)
      try:
        if GdbCache.DICT and GdbCache.TYPE and GdbCache.INTERP_HEAD:
          # pylint: disable=pointless-statement
          tstate = GdbCache.INTERP_HEAD['tstate_head']
          tstate['thread_id']
          frame = tstate['frame']
          frame_attrs = ['f_back',
                         'f_locals',
                         'f_localsplus',
                         'f_globals',
                         'f_builtins',
                         'f_lineno',
                         'f_lasti']
          for attr_name in frame_attrs:
            # This lookup shouldn't throw an exception
            frame[attr_name]
          code = frame['f_code']
          code_attrs = ['co_name',
                        'co_filename',
                        'co_nlocals',
                        'co_varnames',
                        'co_lnotab',
                        'co_firstlineno']
          for attr_name in code_attrs:
            # Same as above, just checking whether the lookup succeeds.
            code[attr_name]
          # if we've gotten this far, we should be fine, as it means gdb managed
          # to look up values for all of these. They might still be null, the
          # symbol file might still be bogus, but making gdb check for null values
          # and letting it run into access violations is the best we can do. We
          # haven't checked any of the python types (dict, etc.), but this symbol
          # file seems to be useful for some things, so let's give it our seal of
          # approval.
          return True
      except gdb.error:
        return False
      # looks like the initial GdbCache refresh failed. That's no good.
      return False
docs: Performs basic sanity check by trying to look up a bunch of symbols.