Skip to content
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

bpo-30983: eval frame rename in pep 0523 broke gdb's python extension #2803

Merged
merged 1 commit into from
Aug 14, 2017
Merged

bpo-30983: eval frame rename in pep 0523 broke gdb's python extension #2803

merged 1 commit into from
Aug 14, 2017

Conversation

bcap
Copy link
Contributor

@bcap bcap commented Jul 21, 2017

pep 0523 renames PyEval_EvalFrameEx to _PyEval_EvalFrameDefault while the gdb python extension only looks for PyEval_EvalFrameEx to understand if it is dealing with a frame.

Final effect is that attaching gdb to a python3.6 process doesnt resolve python objects. Eg. py-list and py-bt dont work properly.

This patch fixes that. Tested locally on python3.6

pep 0523 renames PyEval_EvalFrameEx to _PyEval_EvalFrameDefault while the gdb python extension only looks for PyEval_EvalFrameEx to understand if it is dealing with a frame.

Final effect is that attaching gdb to a python3.6 process doesnt resolve python objects. Eg. py-list and py-bt dont work properly.

This patch fixes that. Tested locally on python3.6
@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

Thanks again to your contribution and we look forward to looking at it!

@bcap
Copy link
Contributor Author

bcap commented Jul 21, 2017

My first python upstream patch. PSF contributor agreement signed

if self._gdbframe.name() == 'PyEval_EvalFrameEx':
'''Is this a PyEval_EvalFrameEx or _PyEval_EvalFrameDefault (PEP 0523)
frame?'''
if self._gdbframe.name() in ('PyEval_EvalFrameEx',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should PyEval_FrameEx even stay as an option if this simply won't work if someone sets a eval frame function? I mean if the gdb support is so reliant on the specifics of PyEval_EvalFrameDefault then maybe it isn't worth trying to support PyEval_EvalFrameEx?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to keep the old name because the same python-gdb.py can be used to debug also older Python core dumps. We even keep the syntax compatible with 2.6 for it to be linkable with older gdbs. There's a comment on the top:

# NOTE: some gdbs are linked with Python 3, so this file should be dual-syntax
# compatible (2.6+ and 3.0+).  See #19308.

@ambv ambv merged commit 2e0f4db into python:master Aug 14, 2017
@ambv
Copy link
Contributor

ambv commented Aug 14, 2017

Thanks! ✨ 🍰 ✨

@bedevere-bot
Copy link

GH-3090 is a backport of this pull request to the 3.6 branch.

ambv pushed a commit to ambv/cpython that referenced this pull request Aug 14, 2017
…ension (pythonGH-2803)

pep 0523 renames PyEval_EvalFrameEx to _PyEval_EvalFrameDefault while the gdb python extension only looks for PyEval_EvalFrameEx to understand if it is dealing with a frame.

Final effect is that attaching gdb to a python3.6 process doesnt resolve python objects. Eg. py-list and py-bt dont work properly.

This patch fixes that. Tested locally on python3.6
(cherry picked from commit 2e0f4db)
ambv added a commit that referenced this pull request Aug 14, 2017
…ension (GH-2803) (#3090)

pep 0523 renames PyEval_EvalFrameEx to _PyEval_EvalFrameDefault while the gdb python extension only looks for PyEval_EvalFrameEx to understand if it is dealing with a frame.

Final effect is that attaching gdb to a python3.6 process doesnt resolve python objects. Eg. py-list and py-bt dont work properly.

This patch fixes that. Tested locally on python3.6
(cherry picked from commit 2e0f4db)
vstinner added a commit that referenced this pull request Aug 16, 2017
vstinner added a commit that referenced this pull request Aug 16, 2017
* Revert "Add Bruno Penteado to ACKS (#3091)"

This reverts commit f978405.

* Revert "bpo-30983: eval frame rename in pep 0523 broke gdb's python extension (#2803)"

This reverts commit 2e0f4db.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants