-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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: [gdb] Fix py-bt, etc. for non-debug shared builds #3153
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I have a few suggestions.
Tools/gdb/libpython.py
Outdated
def is_evalframeex(self): | ||
'''Is this a PyEval_EvalFrameEx frame?''' | ||
if self._gdbframe.name() == 'PyEval_EvalFrameEx': | ||
def is_evalframedefault(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to rename the method to is_evalframe().
Tools/gdb/libpython.py
Outdated
if self._gdbframe.name() == 'PyEval_EvalFrameEx': | ||
def is_evalframedefault(self): | ||
'''Is this a _PyEval_EvalFrameDefault frame?''' | ||
if self._gdbframe.name() == '_PyEval_EvalFrameDefault': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put '_PyEval_EvalFrameDefault' in a constant at the top of the file, so if someone really needs to catch PyEval_EvalFrameEx(), it will be easier to update python-gdb at runtime.
PEP 523 introduced _PyEval_EvalFrameDefault which inlines PyEval_EvalFrameEx on non-debug shared builds. This breaks the ability to use py-bt, py-up, and a few other Python-specific gdb integrations. This patch fixes the problem by only looking for _PyEval_EvalFrameDefault frames. test_gdb passes on both a debug and a non-debug build. Original patch by Bruno "Polaco" Penteado.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Since gdb is not installed on Travis CI, I ran manually test_gdb on a debug python: it pass on my Fedora 25.
I aslo played with python-gdb: all py-xxx commands seem to work as expected.
…ythonGH-3153) PEP 523 introduced _PyEval_EvalFrameDefault which inlines PyEval_EvalFrameEx on non-debug shared builds. This breaks the ability to use py-bt, py-up, and a few other Python-specific gdb integrations. This patch fixes the problem by only looking for _PyEval_EvalFrameDefault frames. test_gdb passes on both a debug and a non-debug build. Original patch by Bruno "Polaco" Penteado. (cherry picked from commit 5fe59f8)
…H-3153) (#3192) PEP 523 introduced _PyEval_EvalFrameDefault which inlines PyEval_EvalFrameEx on non-debug shared builds. This breaks the ability to use py-bt, py-up, and a few other Python-specific gdb integrations. This patch fixes the problem by only looking for _PyEval_EvalFrameDefault frames. test_gdb passes on both a debug and a non-debug build. Original patch by Bruno "Polaco" Penteado. (cherry picked from commit 5fe59f8)
…3153) PEP 523 introduced _PyEval_EvalFrameDefault which inlines PyEval_EvalFrameEx on non-debug shared builds. This breaks the ability to use py-bt, py-up, and a few other Python-specific gdb integrations. This patch fixes the problem by only looking for _PyEval_EvalFrameDefault frames. test_gdb passes on both a debug and a non-debug build. Original patch by Bruno "Polaco" Penteado.
PEP 523 introduced _PyEval_EvalFrameDefault which inlines PyEval_EvalFrameEx on
non-debug shared builds. This breaks the ability to use py-bt, py-up, and
a few other Python-specific gdb integrations.
This patch fixes the problem by only looking for _PyEval_EvalFrameDefault
frames.
test_gdb passes on both a debug and a non-debug build.
Original patch by Bruno "Polaco" Penteado.
https://bugs.python.org/issue30983