bpo-44348: Move trace-info to thread-state (GH-26623)

* Move trace-info to thread state.

* Correct output for pdb when turning on tracing in middle of line
This commit is contained in:
Mark Shannon 2021-06-10 08:46:59 +01:00 committed by GitHub
parent e117c02837
commit 54cb63863f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 73 additions and 85 deletions

View file

@ -688,6 +688,8 @@ new_threadstate(PyInterpreterState *interp, int init)
/* If top points to entry 0, then _PyThreadState_PopLocals will try to pop this chunk */
tstate->datastack_top = &tstate->datastack_chunk->data[1];
tstate->datastack_limit = (PyObject **)(((char *)tstate->datastack_chunk) + DATA_STACK_CHUNK_SIZE);
/* Mark trace_info as uninitialized */
tstate->trace_info.code = NULL;
if (init) {
_PyThreadState_Init(tstate);