bpo-35132: Fixes missing target in gdb pep0393 check. (GH-11848) (GH-12284)

(cherry picked from commit 1ceb3a3d17)

Co-authored-by: Lisa Roach <lisaroach14@gmail.com>
This commit is contained in:
Miss Islington (bot) 2019-03-12 02:17:17 -07:00 committed by Victor Stinner
parent 1c4580d1f5
commit 047f8f25b9
2 changed files with 2 additions and 1 deletions

View File

@ -0,0 +1 @@
Fix py-list and py-bt commands of python-gdb.py on gdb7.

View File

@ -1178,7 +1178,7 @@ class PyUnicodeObjectPtr(PyObjectPtr):
def proxyval(self, visited):
global _is_pep393
if _is_pep393 is None:
fields = gdb.lookup_type('PyUnicodeObject').target().fields()
fields = gdb.lookup_type('PyUnicodeObject').fields()
_is_pep393 = 'data' in [f.name for f in fields]
if _is_pep393:
# Python 3.3 and newer