Message 335518 - Python tracker (original) (raw)

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.