MCPcopy Index your code
hub / github.com/python/cpython / safe_tp_name

Method safe_tp_name

Tools/gdb/libpython.py:257–266  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

255 return self._gdbval.is_optimized_out
256
257 def safe_tp_name(self):
258 try:
259 ob_type = self.type()
260 tp_name = ob_type.field('tp_name')
261 return tp_name.string()
262 # NullPyObjectPtr: NULL tp_name?
263 # RuntimeError: Can't even read the object at all?
264 # UnicodeDecodeError: Failed to decode tp_name bytestring
265 except (NullPyObjectPtr, RuntimeError, UnicodeDecodeError):
266 return 'unknown'
267
268 def proxyval(self, visited):
269 '''

Callers 9

proxyvalMethod · 0.95
proxyvalMethod · 0.45
write_reprMethod · 0.45
proxyvalMethod · 0.45
write_reprMethod · 0.45
__repr__Method · 0.45
write_reprMethod · 0.45
proxyvalMethod · 0.45
write_reprMethod · 0.45

Calls 3

typeMethod · 0.95
fieldMethod · 0.80
stringMethod · 0.80

Tested by

no test coverage detected