[New-bugs-announce] [issue42726] gdb/libpython.py InstanceProxy does not work with py3

Augusto Hack report at bugs.python.org
Wed Dec 23 13:30:18 EST 2020


New submission from Augusto Hack <me at hak.cx>:

Calling `proxyval` on an instance of a user defined class fails.

minimally reproducible example:
```
from time import sleep

class A:
    def __init__(self):
        self.a = 1

a = A()
sleep(10)
```
Attach to process and run:
```
py-up
python-interactive
Frame.get_selected_python_frame().get_pyop().get_var_by_name('a')[0].proxyval(set())
```
Will result in the following error:
```
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/debug/usr/lib64/libpython3.7m.so.1.0-3.7.9-2.fc33.x86_64.debug-gdb.py", line 471, in __repr__
    for arg, val in self.attrdict.iteritems()])
AttributeError: 'dict' object has no attribute 'iteritems'
```
Tested on fedora 33 with python3.7 and debugsymbols

----------
components: Demos and Tools
messages: 383654
nosy: hack.augusto
priority: normal
pull_requests: 22764
severity: normal
status: open
title: gdb/libpython.py InstanceProxy does not work with py3
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42726>
_______________________________________


More information about the New-bugs-announce mailing list