@@ -52,9 +52,13 @@ extern "C" {
52
52
#ifdef Py_GIL_DISABLED
53
53
# define _Py_Debug_gilruntimestate_enabled offsetof(struct _gil_runtime_state, enabled)
54
54
# define _Py_Debug_Free_Threaded 1
55
+ # define _Py_Debug_code_object_co_tlbc offsetof(PyCodeObject, co_tlbc)
56
+ # define _Py_Debug_interpreter_frame_tlbc_index offsetof(_PyInterpreterFrame, tlbc_index)
55
57
#else
56
58
# define _Py_Debug_gilruntimestate_enabled 0
57
59
# define _Py_Debug_Free_Threaded 0
60
+ # define _Py_Debug_code_object_co_tlbc 0
61
+ # define _Py_Debug_interpreter_frame_tlbc_index 0
58
62
#endif
59
63
60
64
@@ -109,6 +113,7 @@ typedef struct _Py_DebugOffsets {
109
113
uint64_t localsplus ;
110
114
uint64_t owner ;
111
115
uint64_t stackpointer ;
116
+ uint64_t tlbc_index ;
112
117
}interpreter_frame ;
113
118
114
119
// Code object offset;
@@ -123,6 +128,7 @@ typedef struct _Py_DebugOffsets {
123
128
uint64_t localsplusnames ;
124
129
uint64_t localspluskinds ;
125
130
uint64_t co_code_adaptive ;
131
+ uint64_t co_tlbc ;
126
132
}code_object ;
127
133
128
134
// PyObject offset;
@@ -265,6 +271,7 @@ typedef struct _Py_DebugOffsets {
265
271
.localsplus = offsetof(_PyInterpreterFrame, localsplus), \
266
272
.owner = offsetof(_PyInterpreterFrame, owner), \
267
273
.stackpointer = offsetof(_PyInterpreterFrame, stackpointer), \
274
+ .tlbc_index = _Py_Debug_interpreter_frame_tlbc_index, \
268
275
}, \
269
276
.code_object = { \
270
277
.size = sizeof(PyCodeObject), \
@@ -277,6 +284,7 @@ typedef struct _Py_DebugOffsets {
277
284
.localsplusnames = offsetof(PyCodeObject, co_localsplusnames), \
278
285
.localspluskinds = offsetof(PyCodeObject, co_localspluskinds), \
279
286
.co_code_adaptive = offsetof(PyCodeObject, co_code_adaptive), \
287
+ .co_tlbc = _Py_Debug_code_object_co_tlbc, \
280
288
}, \
281
289
.pyobject = { \
282
290
.size = sizeof(PyObject), \