MRAB> Should you be using "char *" when they aren't char? Is there a
MRAB> wide char type of some sort?
No, I shouldn't. The storage is wchar_t *, what you get with my first
printed expression:
(gdb) set $__f = (PyUnicodeObject *)(co->co_filename)
(gdb) p *$__f->s...@$__f->length
s...@pobox.com wrote:
I'm trying to convert Python's gdbinit file to Python 3. One of the things
it does is print filenames and function names when displaying stack frames.
This worked fine in Python 2 because the type of such objects is
PyStringObject which uses NUL-terminated strings under the
I'm trying to convert Python's gdbinit file to Python 3. One of the things
it does is print filenames and function names when displaying stack frames.
This worked fine in Python 2 because the type of such objects is
PyStringObject which uses NUL-terminated strings under the covers. For
example: