Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdd7f113

Browse files
authored
gh-115999: Add PyCodeObject.co_tlbc to the debug offsets (#134286)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
1 parent6dcb0fd commitdd7f113

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎Include/internal/pycore_debug_offsets.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,13 @@ extern "C" {
5252
#ifdefPy_GIL_DISABLED
5353
# define_Py_Debug_gilruntimestate_enabled offsetof(struct _gil_runtime_state, enabled)
5454
# 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)
5557
#else
5658
# define_Py_Debug_gilruntimestate_enabled 0
5759
# define_Py_Debug_Free_Threaded 0
60+
# define_Py_Debug_code_object_co_tlbc 0
61+
# define_Py_Debug_interpreter_frame_tlbc_index 0
5862
#endif
5963

6064

@@ -109,6 +113,7 @@ typedef struct _Py_DebugOffsets {
109113
uint64_tlocalsplus;
110114
uint64_towner;
111115
uint64_tstackpointer;
116+
uint64_ttlbc_index;
112117
}interpreter_frame;
113118

114119
// Code object offset;
@@ -123,6 +128,7 @@ typedef struct _Py_DebugOffsets {
123128
uint64_tlocalsplusnames;
124129
uint64_tlocalspluskinds;
125130
uint64_tco_code_adaptive;
131+
uint64_tco_tlbc;
126132
}code_object;
127133

128134
// PyObject offset;
@@ -265,6 +271,7 @@ typedef struct _Py_DebugOffsets {
265271
.localsplus = offsetof(_PyInterpreterFrame, localsplus), \
266272
.owner = offsetof(_PyInterpreterFrame, owner), \
267273
.stackpointer = offsetof(_PyInterpreterFrame, stackpointer), \
274+
.tlbc_index = _Py_Debug_interpreter_frame_tlbc_index, \
268275
}, \
269276
.code_object = { \
270277
.size = sizeof(PyCodeObject), \
@@ -277,6 +284,7 @@ typedef struct _Py_DebugOffsets {
277284
.localsplusnames = offsetof(PyCodeObject, co_localsplusnames), \
278285
.localspluskinds = offsetof(PyCodeObject, co_localspluskinds), \
279286
.co_code_adaptive = offsetof(PyCodeObject, co_code_adaptive), \
287+
.co_tlbc = _Py_Debug_code_object_co_tlbc, \
280288
}, \
281289
.pyobject = { \
282290
.size = sizeof(PyObject), \

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp