STINNER Victor <[email protected]> added the comment:
> Distro: Linux Mint 18.2 Sonya
Hum, Dylan: what is your gdb version?
On Fedora 29 with gdb 8.2-6.fc29, it seems like .target() is useless:
$ gdb ./python
GNU gdb (GDB) Fedora 8.2-6.fc29
...
(gdb) python print([field.name for field in
gdb.lookup_type('PyUnicodeObject').target().fields()])
['_base', 'data']
(gdb) python print([field.name for field in
gdb.lookup_type('PyUnicodeObject').fields()])
['_base', 'data']
I tested on a Python compiled manually from source, I ran my test in the
directory of Python source code.
I also tested on /usr/bin/python3 (system Python), same behavior.
----------
nosy: +vstinner
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue35132>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com