gh-89419: gdb: fix bug causing `AttributeError` in py-locals when no frame is available (#100611)

This commit is contained in:
Eli Schwartz 2023-01-03 09:56:57 -05:00 committed by GitHub
parent 8b1f125121
commit 8586949833
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -0,0 +1 @@
Fix a bug that caused an :exc:`AttributeError` to be raised in ``python-gdb.py`` when ``py-locals`` is used without a frame.

View File

@ -2108,6 +2108,7 @@ class PyLocals(gdb.Command):
while True:
if not pyop_frame:
print(UNABLE_READ_INFO_PYTHON_FRAME)
break
if pyop_frame.is_shim():
break