From 7199584ac8632eab57612f595a7162ab8d2ebbc0 Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Wed, 14 Jun 2023 13:46:37 +0100 Subject: 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. --- Python/pylifecycle.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'Python/pylifecycle.c') 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, - "" -}; - 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"); } -- cgit v1.2.3