@@ -54,11 +54,13 @@ extern "C" {
5454# define _Py_Debug_Free_Threaded 1
5555# define _Py_Debug_code_object_co_tlbc offsetof(PyCodeObject, co_tlbc)
5656# define _Py_Debug_interpreter_frame_tlbc_index offsetof(_PyInterpreterFrame, tlbc_index)
57+ # define _Py_Debug_interpreter_state_tlbc_generation offsetof(PyInterpreterState, tlbc_indices.tlbc_generation)
5758#else
5859# define _Py_Debug_gilruntimestate_enabled 0
5960# define _Py_Debug_Free_Threaded 0
6061# define _Py_Debug_code_object_co_tlbc 0
6162# define _Py_Debug_interpreter_frame_tlbc_index 0
63+ # define _Py_Debug_interpreter_state_tlbc_generation 0
6264#endif
6365
6466
@@ -89,6 +91,8 @@ typedef struct _Py_DebugOffsets {
8991 uint64_t gil_runtime_state_enabled ;
9092 uint64_t gil_runtime_state_locked ;
9193 uint64_t gil_runtime_state_holder ;
94+ uint64_t code_object_generation ;
95+ uint64_t tlbc_generation ;
9296 } interpreter_state ;
9397
9498 // Thread state offset;
@@ -216,6 +220,11 @@ typedef struct _Py_DebugOffsets {
216220 uint64_t gi_frame_state ;
217221 } gen_object ;
218222
223+ struct _llist_node {
224+ uint64_t next ;
225+ uint64_t prev ;
226+ } llist_node ;
227+
219228 struct _debugger_support {
220229 uint64_t eval_breaker ;
221230 uint64_t remote_debugger_support ;
@@ -251,6 +260,8 @@ typedef struct _Py_DebugOffsets {
251260 .gil_runtime_state_enabled = _Py_Debug_gilruntimestate_enabled, \
252261 .gil_runtime_state_locked = offsetof(PyInterpreterState, _gil.locked), \
253262 .gil_runtime_state_holder = offsetof(PyInterpreterState, _gil.last_holder), \
263+ .code_object_generation = offsetof(PyInterpreterState, _code_object_generation), \
264+ .tlbc_generation = _Py_Debug_interpreter_state_tlbc_generation, \
254265 }, \
255266 .thread_state = { \
256267 .size = sizeof(PyThreadState), \
@@ -347,6 +358,10 @@ typedef struct _Py_DebugOffsets {
347358 .gi_iframe = offsetof(PyGenObject, gi_iframe), \
348359 .gi_frame_state = offsetof(PyGenObject, gi_frame_state), \
349360 }, \
361+ .llist_node = { \
362+ .next = offsetof(struct llist_node, next), \
363+ .prev = offsetof(struct llist_node, prev), \
364+ }, \
350365 .debugger_support = { \
351366 .eval_breaker = offsetof(PyThreadState, eval_breaker), \
352367 .remote_debugger_support = offsetof(PyThreadState, remote_debugger_support), \
0 commit comments