mirror of
https://github.com/python/cpython.git
synced 2025-09-02 15:07:53 +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
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue