Support for classes. Currently we just locate the dictionary using a transliteration to python of _PyObject_GetDictPtr, ignoring descriptors
(self, visited)
| 531 | return typeobj._gdbval.cast(HeapTypePtr)['ht_cached_keys'] |
| 532 | |
| 533 | def proxyval(self, visited): |
| 534 | ''' |
| 535 | Support for classes. |
| 536 | |
| 537 | Currently we just locate the dictionary using a transliteration to |
| 538 | python of _PyObject_GetDictPtr, ignoring descriptors |
| 539 | ''' |
| 540 | # Guard against infinite loops: |
| 541 | if self.as_address() in visited: |
| 542 | return ProxyAlreadyVisited('<...>') |
| 543 | visited.add(self.as_address()) |
| 544 | |
| 545 | keys_values = self.get_keys_values() |
| 546 | if keys_values: |
| 547 | attr_dict = keys_values.proxyval(visited) |
| 548 | else: |
| 549 | pyop_attr_dict = self.get_attr_dict() |
| 550 | if pyop_attr_dict: |
| 551 | attr_dict = pyop_attr_dict.proxyval(visited) |
| 552 | else: |
| 553 | attr_dict = {} |
| 554 | tp_name = self.safe_tp_name() |
| 555 | |
| 556 | # Class: |
| 557 | return InstanceProxy(tp_name, attr_dict, int(self._gdbval)) |
| 558 | |
| 559 | def write_repr(self, out, visited): |
| 560 | # Guard against infinite loops: |
nothing calls this directly
no test coverage detected