diff options
author | Gabriele N. Tornetta <P403n1x87@users.noreply.github.com> | 2024-07-03 09:53:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-03 08:53:44 +0000 |
commit | c9bdfbe86853fcf5f2b7dce3a50b383e23384ed2 (patch) | |
tree | 761e65111d55e5435c718e38dab3686f94312108 /Include/internal/pycore_runtime_init.h | |
parent | 9d3c9b822ce3c52cd747efe93b172f02c0d09289 (diff) | |
download | cpython-c9bdfbe86853fcf5f2b7dce3a50b383e23384ed2.tar.gz cpython-c9bdfbe86853fcf5f2b7dce3a50b383e23384ed2.zip |
gh-106597: Add more offsets to _Py_DebugOffsets (#121311)
Add more offsets to _Py_DebugOffsets
We add a few more offsets that are required by some out-of-process
tools, such as [Austin](https://github.com/p403n1x87/austin).
Diffstat (limited to 'Include/internal/pycore_runtime_init.h')
-rw-r--r-- | Include/internal/pycore_runtime_init.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Include/internal/pycore_runtime_init.h b/Include/internal/pycore_runtime_init.h index 33e39c2edbe..da2b8d5570d 100644 --- a/Include/internal/pycore_runtime_init.h +++ b/Include/internal/pycore_runtime_init.h @@ -41,6 +41,7 @@ extern PyTypeObject _PyExc_MemoryError; }, \ .interpreter_state = { \ .size = sizeof(PyInterpreterState), \ + .id = offsetof(PyInterpreterState, id), \ .next = offsetof(PyInterpreterState, next), \ .threads_head = offsetof(PyInterpreterState, threads.head), \ .gc = offsetof(PyInterpreterState, gc), \ @@ -59,6 +60,8 @@ extern PyTypeObject _PyExc_MemoryError; .current_frame = offsetof(PyThreadState, current_frame), \ .thread_id = offsetof(PyThreadState, thread_id), \ .native_thread_id = offsetof(PyThreadState, native_thread_id), \ + .datastack_chunk = offsetof(PyThreadState, datastack_chunk), \ + .status = offsetof(PyThreadState, _status), \ }, \ .interpreter_frame = { \ .size = sizeof(_PyInterpreterFrame), \ @@ -72,6 +75,7 @@ extern PyTypeObject _PyExc_MemoryError; .size = sizeof(PyCodeObject), \ .filename = offsetof(PyCodeObject, co_filename), \ .name = offsetof(PyCodeObject, co_name), \ + .qualname = offsetof(PyCodeObject, co_qualname), \ .linetable = offsetof(PyCodeObject, co_linetable), \ .firstlineno = offsetof(PyCodeObject, co_firstlineno), \ .argcount = offsetof(PyCodeObject, co_argcount), \ @@ -97,6 +101,10 @@ extern PyTypeObject _PyExc_MemoryError; .length = offsetof(PyUnicodeObject, _base._base.length), \ .asciiobject_size = sizeof(PyASCIIObject), \ }, \ + .gc = { \ + .size = sizeof(struct _gc_runtime_state), \ + .collecting = offsetof(struct _gc_runtime_state, collecting), \ + }, \ }, \ .allocators = { \ .standard = _pymem_allocators_standard_INIT(runtime), \ |