This repository was archived by the owner on Feb 13, 2025. It is now read-only.
forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 61
Limited Support for PEP-523 eval_frame hook #275
Labels
Comments
Well, 8c77b8c is merged, but testing with a real Pydevd is still not possible. Experiments with C-Python reveal, that we need to merge commit bdace21 first. That's somewhere between v3.8.0b4 and v3.8.0rc1. This commit modifies a structure and Cython probably depends on the layout of this structure. Command line for testing:
|
akruis
added a commit
that referenced
this issue
Aug 8, 2021
Support the PEP-523 eval_frame-hook for one particular use case: byte code instrumentation. An example is the pydev-debugger. It can use the hook to inject "break-points". This is much more efficient, than traditional trace functions.
akruis
added a commit
that referenced
this issue
Aug 8, 2021
Support the PEP-523 eval_frame-hook for one particular use case: byte code instrumentation. An example is the pydev-debugger. It can use the hook to inject "break-points". This is much more efficient, than traditional trace functions. (cherry picked from commit 34108b9)
Successfully tested and merged. |
akruis
pushed a commit
to akruis/PyDev.Debugger
that referenced
this issue
Aug 8, 2021
Starting with version 3.8 Stackless Python has a limited support for the PEP-523 eval_frame_hook (stackless-dev/stackless#275). It is now possible to use the hook for Python byte code instrumentation.
fabioz
pushed a commit
to fabioz/PyDev.Debugger
that referenced
this issue
Oct 7, 2021
Starting with version 3.8 Stackless Python has a limited support for the PEP-523 eval_frame_hook (stackless-dev/stackless#275). It is now possible to use the hook for Python byte code instrumentation.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The Pydev debugger (https://github.com/fabioz/PyDev.Debugger) started using the eval_frame hook and this caused crashes with Stackless (see #240). The first and obvious mitigation was to teach pydevd not to use this hook, if it detects Stackless (done, see fabioz/PyDev.Debugger#198).
Now, that #270 made significant progress, I think it is possible to support the evel_frame hook well enough to enable its usage with pydevd. The principal problem with this hook is, that the Stackless frame evaluation function
PyEval_EvalFrameEx_slp
:But for each frame f the first invocation of
PyEval_EvalFrameEx_slp
has always the formPyEval_EvalFrameEx_slp(f, 0, Py_None)
withf->f_executing == 0
. And therefore we can map this first call to the signature of the C-Python frame evaluation function_PyFrameEvalFunction
.I'll try to create a pull request, do some testing with pydevd and see if this works out in practice.
The text was updated successfully, but these errors were encountered: