(self, gdbval, cast_to=None)
| 171 | _typename = 'PyObject' |
| 172 | |
| 173 | def __init__(self, gdbval, cast_to=None): |
| 174 | # Clear the tagged pointer |
| 175 | if gdbval.type.name == '_PyStackRef': |
| 176 | if cast_to is None: |
| 177 | cast_to = gdb.lookup_type('PyObject').pointer() |
| 178 | self._gdbval = _PyStackRef_AsPyObjectBorrow(gdbval).cast(cast_to) |
| 179 | elif cast_to: |
| 180 | self._gdbval = gdbval.cast(cast_to) |
| 181 | else: |
| 182 | self._gdbval = gdbval |
| 183 | |
| 184 | def field(self, name): |
| 185 | ''' |
nothing calls this directly
no test coverage detected