-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some gdb macros are broken in 3.6 #73859
Comments
Some gdb macros defined in Misc/gdbinit got broken when _PyUnicode_AsString was renamed to PyUnicode_AsUTF8. (gdb) pystack |
I tried to simply replace _PyUnicode_AsString with PyUnicode_AsUTF8, but it looks like code structure has changed and the pyframe and pystack macros don't work anymore. |
Note that these macros were always expected to be fragile. They depend to a great extent on the layout of the functions in Python/ceval.c. I've had to tweak them a couple times over the years. I'm pretty sure the gdb instance I have available to me at work wasn't configured --with-python, and corporate policies would prevent me from downloading the source and building my own private version. For me, Misc/gdbinit is likely to be the best I can do for the foreseeable future. If the layout of ceval.c has changed sufficiently between Python 2.x and 3.x, perhaps two versions of gdbinit are warranted, with the version delivered for Python 3 being appropriate for the current release. |
I have created a PR here - #6126 The problem was, indeed, change in the code structure. The macro checked for presence inside of PyEval_EvalFrame() using address of a neighbouring function. |
A PR has been filed, could someone take a look? |
Thanks for the PR and the ping. I've sent an email to the python-dev list requesting review help for gdb issues including this one. |
Thanks, Marcel, for the fix and thanks, Skip, for the review. Merged for release in 3.6.6 and 3.7.0. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: