cpython/Tools/gdb
Eli Schwartz d8073ee6f3
[3.11] gh-89419: gdb: fix bug causing AttributeError in py-locals when no frame is available (GH-100611) (#100738)
gh-89419: gdb: fix bug causing AttributeError in py-locals when no frame is available (GH-100611)

```
Unable to read information on python frame
Python Exception <class 'AttributeError'>: 'NoneType' object has no attribute 'co_name'
```

Regression in commit b4903afd4d. While
refactoring the code into a while loop, the previous early return when
no frame exists went missing. We have just printed a message that we
cannot get information about this, so the frame will be None, and we
cannot attempt to use it.

Discovered on python 3.11, in python 3.12a2 this should error out with
`.is_shim()` instead of `co_name`.

(cherry picked from commit 8586949833)
2023-01-04 13:29:21 +05:30
..
libpython.py [3.11] gh-89419: gdb: fix bug causing AttributeError in py-locals when no frame is available (GH-100611) (#100738) 2023-01-04 13:29:21 +05:30