This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lisroach
Recipients Dylan Cali, lisroach
Date 2019-01-22.00:40:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1548117636.26.0.780649763839.issue35132@roundup.psfhosted.org>
In-reply-to
Content
I experienced this bug as well and have tried to dig into it a little. 

I experimented with a service I have that uses shared libraries. If I compile with high level of optimizations for the C++ code (-O3) I don't experience the issue, but compiling without any optimizations I do. 

I also tried with a script that does not use any shared libraries and I do not see the issue.


Digging into it a little, when running with the optimized version I found:

gdb.lookup_type('PyUnicodeObject')

returns a gdb.TYPE_CODE_TYPEDEF, which is the correct type. Running with the non-optimized version instead returns a gdb.TYPE_CODE_STRUCT.


The struct type errors because it has no target(), but I actually think target() might be superfluous here. 

Both versions if I only call `fields = gdb.lookup_type('PyUnicodeObject').fields()` returns a list of fields, one of which is named `data` for the purposes of the pep check, so target() doesn't seem vital.
History
Date User Action Args
2019-01-22 00:40:37lisroachsetrecipients: + lisroach, Dylan Cali
2019-01-22 00:40:36lisroachsetmessageid: <1548117636.26.0.780649763839.issue35132@roundup.psfhosted.org>
2019-01-22 00:40:36lisroachlinkissue35132 messages
2019-01-22 00:40:36lisroachcreate