Yield a sequence of (name,value) pairs of PyObjectPtr instances, for the local variables of this frame
(self)
| 1098 | return self._gdbval.is_optimized_out |
| 1099 | |
| 1100 | def iter_locals(self): |
| 1101 | ''' |
| 1102 | Yield a sequence of (name,value) pairs of PyObjectPtr instances, for |
| 1103 | the local variables of this frame |
| 1104 | ''' |
| 1105 | if self.is_optimized_out(): |
| 1106 | return |
| 1107 | |
| 1108 | |
| 1109 | obj_ptr_ptr = gdb.lookup_type("PyObject").pointer().pointer() |
| 1110 | |
| 1111 | localsplus = self._gdbval["localsplus"] |
| 1112 | |
| 1113 | for i in safe_range(self.co_nlocals): |
| 1114 | pyop_value = PyObjectPtr.from_pyobject_ptr(localsplus[i]) |
| 1115 | if pyop_value.is_null(): |
| 1116 | continue |
| 1117 | pyop_name = PyObjectPtr.from_pyobject_ptr(self.co_localsplusnames[i]) |
| 1118 | yield (pyop_name, pyop_value) |
| 1119 | |
| 1120 | def _f_special(self, name, convert=PyObjectPtr.from_pyobject_ptr): |
| 1121 | return convert(self._gdbval[name]) |
no test coverage detected