mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
GH-100987: Allow objects other than code objects as the "executable" of an internal frame. (GH-105727)
* Add table describing possible executable classes for out-of-process debuggers. * Remove shim code object creation code as it is no longer needed. * Make lltrace a bit more robust w.r.t. non-standard frames.
This commit is contained in:
parent
ad56340b66
commit
7199584ac8
28 changed files with 541 additions and 606 deletions
|
@ -148,14 +148,14 @@ stopiteration_error(PyThreadState* tstate, PyObject *exc)
|
|||
const char *msg = NULL;
|
||||
if (PyErr_GivenExceptionMatches(exc, PyExc_StopIteration)) {
|
||||
msg = "generator raised StopIteration";
|
||||
if (frame->f_code->co_flags & CO_ASYNC_GENERATOR) {
|
||||
if (_PyFrame_GetCode(frame)->co_flags & CO_ASYNC_GENERATOR) {
|
||||
msg = "async generator raised StopIteration";
|
||||
}
|
||||
else if (frame->f_code->co_flags & CO_COROUTINE) {
|
||||
else if (_PyFrame_GetCode(frame)->co_flags & CO_COROUTINE) {
|
||||
msg = "coroutine raised StopIteration";
|
||||
}
|
||||
}
|
||||
else if ((frame->f_code->co_flags & CO_ASYNC_GENERATOR) &&
|
||||
else if ((_PyFrame_GetCode(frame)->co_flags & CO_ASYNC_GENERATOR) &&
|
||||
PyErr_GivenExceptionMatches(exc, PyExc_StopAsyncIteration))
|
||||
{
|
||||
/* code in `gen` raised a StopAsyncIteration error:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue