mirror of
https://github.com/python/cpython.git
synced 2025-11-03 15:11:34 +00:00
gh-91048: Revert the memory cache removal for remote debugging (#136440)
gh-91048: Reintroduce the memory cache for remote debugging
This commit is contained in:
parent
a6566e49e6
commit
77d25e5b16
2 changed files with 88 additions and 0 deletions
|
|
@ -945,6 +945,10 @@ parse_coro_chain(
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (name == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (PyList_Append(render_to, name)) {
|
||||
Py_DECREF(name);
|
||||
set_exception_cause(unwinder, PyExc_RuntimeError, "Failed to append frame to coro chain");
|
||||
|
|
@ -2762,6 +2766,7 @@ _remote_debugging_RemoteUnwinder_get_stack_trace_impl(RemoteUnwinderObject *self
|
|||
}
|
||||
|
||||
exit:
|
||||
_Py_RemoteDebug_ClearCache(&self->handle);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -2885,9 +2890,11 @@ _remote_debugging_RemoteUnwinder_get_all_awaited_by_impl(RemoteUnwinderObject *s
|
|||
goto result_err;
|
||||
}
|
||||
|
||||
_Py_RemoteDebug_ClearCache(&self->handle);
|
||||
return result;
|
||||
|
||||
result_err:
|
||||
_Py_RemoteDebug_ClearCache(&self->handle);
|
||||
Py_XDECREF(result);
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -2954,9 +2961,11 @@ _remote_debugging_RemoteUnwinder_get_async_stack_trace_impl(RemoteUnwinderObject
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
_Py_RemoteDebug_ClearCache(&self->handle);
|
||||
return result;
|
||||
|
||||
cleanup:
|
||||
_Py_RemoteDebug_ClearCache(&self->handle);
|
||||
Py_XDECREF(result);
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -2982,6 +2991,7 @@ RemoteUnwinder_dealloc(PyObject *op)
|
|||
}
|
||||
#endif
|
||||
if (self->handle.pid != 0) {
|
||||
_Py_RemoteDebug_ClearCache(&self->handle);
|
||||
_Py_RemoteDebug_CleanupProcHandle(&self->handle);
|
||||
}
|
||||
PyObject_Del(self);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue