aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2023-06-14 13:46:37 +0100
committerGitHub <noreply@github.com>2023-06-14 13:46:37 +0100
commit7199584ac8632eab57612f595a7162ab8d2ebbc0 (patch)
treeeda3183876d2ce6805796d5c8f7b0cd8abadc22e /Python/pylifecycle.c
parentad56340b665c5d8ac1f318964f71697bba41acb7 (diff)
downloadcpython-7199584ac8632eab57612f595a7162ab8d2ebbc0.tar.gz
cpython-7199584ac8632eab57612f595a7162ab8d2ebbc0.zip
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.
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r--Python/pylifecycle.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index d45b739c279..ff9694886b6 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -737,22 +737,6 @@ pycore_init_types(PyInterpreterState *interp)
return _PyStatus_OK();
}
-static const uint8_t INTERPRETER_TRAMPOLINE_INSTRUCTIONS[] = {
- /* Put a NOP at the start, so that the IP points into
- * the code, rather than before it */
- NOP, 0,
- INTERPRETER_EXIT, 0,
- /* RESUME at end makes sure that the frame appears incomplete */
- RESUME, 0
-};
-
-static const _PyShimCodeDef INTERPRETER_TRAMPOLINE_CODEDEF = {
- INTERPRETER_TRAMPOLINE_INSTRUCTIONS,
- sizeof(INTERPRETER_TRAMPOLINE_INSTRUCTIONS),
- 1,
- "<interpreter trampoline>"
-};
-
static PyStatus
pycore_init_builtins(PyThreadState *tstate)
{
@@ -786,10 +770,6 @@ pycore_init_builtins(PyThreadState *tstate)
PyObject *object__getattribute__ = _PyType_Lookup(&PyBaseObject_Type, &_Py_ID(__getattribute__));
assert(object__getattribute__);
interp->callable_cache.object__getattribute__ = object__getattribute__;
- interp->interpreter_trampoline = _Py_MakeShimCode(&INTERPRETER_TRAMPOLINE_CODEDEF);
- if (interp->interpreter_trampoline == NULL) {
- return _PyStatus_ERR("failed to create interpreter trampoline.");
- }
if (_PyBuiltins_AddExceptions(bimod) < 0) {
return _PyStatus_ERR("failed to add exceptions to builtins");
}