@@ -35,10 +35,12 @@ extern PyTypeObject _PyExc_MemoryError;
3535 .cookie = "xdebugpy", \
3636 .version = PY_VERSION_HEX, \
3737 .runtime_state = { \
38+ .size = sizeof(_PyRuntimeState), \
3839 .finalizing = offsetof(_PyRuntimeState, _finalizing), \
3940 .interpreters_head = offsetof(_PyRuntimeState, interpreters.head), \
4041 }, \
4142 .interpreter_state = { \
43+ .size = sizeof(PyInterpreterState), \
4244 .next = offsetof(PyInterpreterState, next), \
4345 .threads_head = offsetof(PyInterpreterState, threads.head), \
4446 .gc = offsetof(PyInterpreterState, gc), \
@@ -50,6 +52,7 @@ extern PyTypeObject _PyExc_MemoryError;
5052 .gil_runtime_state_holder = offsetof(PyInterpreterState, _gil.last_holder), \
5153 }, \
5254 .thread_state = { \
55+ .size = sizeof(PyThreadState), \
5356 .prev = offsetof(PyThreadState, prev), \
5457 .next = offsetof(PyThreadState, next), \
5558 .interp = offsetof(PyThreadState, interp), \
@@ -58,13 +61,15 @@ extern PyTypeObject _PyExc_MemoryError;
5861 .native_thread_id = offsetof(PyThreadState, native_thread_id), \
5962 }, \
6063 .interpreter_frame = { \
64+ .size = sizeof(_PyInterpreterFrame), \
6165 .previous = offsetof(_PyInterpreterFrame, previous), \
6266 .executable = offsetof(_PyInterpreterFrame, f_executable), \
6367 .instr_ptr = offsetof(_PyInterpreterFrame, instr_ptr), \
6468 .localsplus = offsetof(_PyInterpreterFrame, localsplus), \
6569 .owner = offsetof(_PyInterpreterFrame, owner), \
6670 }, \
6771 .code_object = { \
72+ .size = sizeof(PyCodeObject), \
6873 .filename = offsetof(PyCodeObject, co_filename), \
6974 .name = offsetof(PyCodeObject, co_name), \
7075 .linetable = offsetof(PyCodeObject, co_linetable), \
@@ -75,15 +80,19 @@ extern PyTypeObject _PyExc_MemoryError;
7580 .co_code_adaptive = offsetof(PyCodeObject, co_code_adaptive), \
7681 }, \
7782 .pyobject = { \
83+ .size = sizeof(PyObject), \
7884 .ob_type = offsetof(PyObject, ob_type), \
7985 }, \
8086 .type_object = { \
87+ .size = sizeof(PyTypeObject), \
8188 .tp_name = offsetof(PyTypeObject, tp_name), \
8289 }, \
8390 .tuple_object = { \
91+ .size = sizeof(PyTupleObject), \
8492 .ob_item = offsetof(PyTupleObject, ob_item), \
8593 }, \
8694 .unicode_object = { \
95+ .size = sizeof(PyUnicodeObject), \
8796 .state = offsetof(PyUnicodeObject, _base._base.state), \
8897 .length = offsetof(PyUnicodeObject, _base._base.length), \
8998 .asciiobject_size = sizeof(PyASCIIObject), \
0 commit comments