classification
Title: gdb/libpython.py InstanceProxy does not work with py3
Type: Stage: resolved
Components: Demos and Tools Versions: Python 3.10, Python 3.9, Python 3.8, Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: hack.augusto, miss-islington
Priority: normal Keywords:

Created on 2020-12-23 18:30 by hack.augusto, last changed 2020-12-24 17:37 by miss-islington. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 23912 merged hack.augusto, 2020-12-23 18:30
PR 23924 merged miss-islington, 2020-12-24 17:16
PR 23925 merged miss-islington, 2020-12-24 17:16
Messages (4)
msg383654 - (view) Author: Augusto Hack (hack.augusto) * Date: 2020-12-23 18:30
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
msg383694 - (view) Author: miss-islington (miss-islington) Date: 2020-12-24 17:16
New changeset b57ada98da0d5b0cf1ebc2c9c5502d04aa962042 by Augusto Hack in branch 'master':
closes bpo-42726: gdb libpython: InstanceProxy support for py3 (GH-23912)
https://github.com/python/cpython/commit/b57ada98da0d5b0cf1ebc2c9c5502d04aa962042
msg383696 - (view) Author: miss-islington (miss-islington) Date: 2020-12-24 17:34
New changeset efd64c8ea0fed1c13839cec0feea450820da34f8 by Miss Islington (bot) in branch '3.8':
closes bpo-42726: gdb libpython: InstanceProxy support for py3 (GH-23912)
https://github.com/python/cpython/commit/efd64c8ea0fed1c13839cec0feea450820da34f8
msg383697 - (view) Author: miss-islington (miss-islington) Date: 2020-12-24 17:37
New changeset 3bb85672bb894403a787a9c5afc0ca5987d28fe0 by Miss Islington (bot) in branch '3.9':
closes bpo-42726: gdb libpython: InstanceProxy support for py3 (GH-23912)
https://github.com/python/cpython/commit/3bb85672bb894403a787a9c5afc0ca5987d28fe0
History
Date User Action Args
2020-12-24 17:37:10miss-islingtonsetmessages: + msg383697
2020-12-24 17:34:36miss-islingtonsetmessages: + msg383696
2020-12-24 17:16:27miss-islingtonsetpull_requests: + pull_request22776
2020-12-24 17:16:19miss-islingtonsetpull_requests: + pull_request22775
2020-12-24 17:16:12miss-islingtonsetstatus: open -> closed

nosy: + miss-islington
messages: + msg383694

resolution: fixed
stage: resolved
2020-12-23 18:30:18hack.augustocreate