>>> X = type('X', (Structure,), {'_fields_': [('a', c_uint8, 8), ('b', c_uint8, 8), ('c', c_uint16, 16)]})
>>> sizeof(X)
4


Breakpoint 1, PyCStructUnionType_update_stgdict (type=type@entry=<_ctypes.PyCStructType at remote 0x1aafee0>, fields=fields@entry=[('a', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('b', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('c', <_ctypes.PyCSimpleType at remote 0x1aa1e60>, 16)], isStruct=isStruct@entry=1) at /target/cpython-fix/Modules/_ctypes/stgdict.c:602
602	        if (isStruct) {
$91 = 0
$92 = 0
$93 = 0
$94 = 0
$95 = {
  dict = {
    ob_base = {
      ob_refcnt = 1, 
      ob_type = 0x7f99fab98b60 <PyCStgDict_Type>
    }, 
    ma_used = 7, 
    ma_version_tag = 13271, 
    ma_keys = 0x7f99fab33680, 
    ma_values = 0x0
  }, 
  size = 1, 
  align = 1, 
  length = 0, 
  ffi_type_pointer = {
    size = 1, 
    alignment = 1, 
    type = 5, 
    elements = 0x0
  }, 
  proto = 'B', 
  setfunc = 0x7f99fab884ab <B_set>, 
  getfunc = 0x7f99fab88c53 <B_get>, 
  paramfunc = 0x7f99fab796c8 <PyCSimpleType_paramfunc>, 
  argtypes = 0x0, 
  converters = 0x0, 
  restype = 0x0, 
  checker = 0x0, 
  flags = 4096, 
  format = 0x7f99fafbb520 "<B", 
  ndim = 0, 
  shape = 0x0
}

Breakpoint 2, PyCStructUnionType_update_stgdict (type=type@entry=<_ctypes.PyCStructType at remote 0x1aafee0>, fields=fields@entry=[('a', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('b', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('c', <_ctypes.PyCSimpleType at remote 0x1aa1e60>, 16)], isStruct=isStruct@entry=1) at /target/cpython-fix/Modules/_ctypes/stgdict.c:617
617	        total_align = max(align, total_align);
$96 = 8
$97 = 8
$98 = 1
$99 = 1
$100 = {
  ob_base = {
    ob_refcnt = 1, 
    ob_type = 0x7f99fab988c0 <PyCField_Type>
  }, 
  offset = 0, 
  size = 524288, 
  index = 0, 
  proto = <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 
  getfunc = 0x0, 
  setfunc = 0x0, 
  anonymous = 0
}

Breakpoint 1, PyCStructUnionType_update_stgdict (type=type@entry=<_ctypes.PyCStructType at remote 0x1aafee0>, fields=fields@entry=[('a', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('b', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('c', <_ctypes.PyCSimpleType at remote 0x1aa1e60>, 16)], isStruct=isStruct@entry=1) at /target/cpython-fix/Modules/_ctypes/stgdict.c:602
602	        if (isStruct) {
$101 = 8
$102 = 8
$103 = 1
$104 = 1
$105 = {
  dict = {
  dict = {
    ob_base = {
      ob_refcnt = 1, 
      ob_type = 0x7f99fab98b60 <PyCStgDict_Type>
    }, 
    ma_used = 7, 
    ma_version_tag = 13271, 
    ma_keys = 0x7f99fab33680, 
    ma_values = 0x0
  }, 
  size = 1, 
  align = 1, 
  length = 0, 
  ffi_type_pointer = {
    size = 1, 
    alignment = 1, 
    type = 5, 
    elements = 0x0
  }, 
  proto = 'B', 
  setfunc = 0x7f99fab884ab <B_set>, 
  getfunc = 0x7f99fab88c53 <B_get>, 
  paramfunc = 0x7f99fab796c8 <PyCSimpleType_paramfunc>, 
  argtypes = 0x0, 
  converters = 0x0, 
  restype = 0x0, 
  checker = 0x0, 
  flags = 4096, 
  format = 0x7f99fafbb520 "<B", 
  ndim = 0, 
  shape = 0x0
}

Breakpoint 2, PyCStructUnionType_update_stgdict (type=type@entry=<_ctypes.PyCStructType at remote 0x1aafee0>, fields=fields@entry=[('a', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('b', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('c', <_ctypes.PyCSimpleType at remote 0x1aa1e60>, 16)], isStruct=isStruct@entry=1) at /target/cpython-fix/Modules/_ctypes/stgdict.c:617
617	        total_align = max(align, total_align);
$106 = 8
$107 = 8
$108 = 2
$109 = 1
$110 = {
  ob_base = {
    ob_refcnt = 1, 
    ob_type = 0x7f99fab988c0 <PyCField_Type>
  }, 
  offset = 1, 
  size = 524288, 
  index = 1, 
  proto = <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 
  getfunc = 0x0, 
  setfunc = 0x0, 
  anonymous = 0
}

Breakpoint 1, PyCStructUnionType_update_stgdict (type=type@entry=<_ctypes.PyCStructType at remote 0x1aafee0>, fields=fields@entry=[('a', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('b', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('c', <_ctypes.PyCSimpleType at remote 0x1aa1e60>, 16)], isStruct=isStruct@entry=1) at /target/cpython-fix/Modules/_ctypes/stgdict.c:602
602	        if (isStruct) {
$111 = 8
$112 = 8
$113 = 2
$114 = 1
$115 = {
  dict = {
    ob_base = {
      ob_refcnt = 1, 
      ob_type = 0x7f99fab98b60 <PyCStgDict_Type>
    }, 
    ma_used = 7, 
    ma_version_tag = 13010, 
    ma_keys = 0x7f99fab302c0, 
    ma_values = 0x0
  }, 
  size = 2, 
  align = 2, 
  length = 0, 
  ffi_type_pointer = {
    size = 2, 
    alignment = 2, 
    type = 7, 
    elements = 0x0
  }, 
  proto = 'H', 
  setfunc = 0x7f99fab88421 <H_set>, 
  getfunc = 0x7f99fab88be0 <H_get>, 
  paramfunc = 0x7f99fab796c8 <PyCSimpleType_paramfunc>, 
  argtypes = 0x0, 
  converters = 0x0, 
  restype = 0x0, 
  checker = 0x0, 
  flags = 4096, 
  format = 0x7f99fafbb340 "<H", 
  ndim = 0, 
  shape = 0x0
}

Breakpoint 2, PyCStructUnionType_update_stgdict (type=type@entry=<_ctypes.PyCStructType at remote 0x1aafee0>, fields=fields@entry=[('a', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('b', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('c', <_ctypes.PyCSimpleType at remote 0x1aa1e60>, 16)], isStruct=isStruct@entry=1) at /target/cpython-fix/Modules/_ctypes/stgdict.c:617
617	        total_align = max(align, total_align);
$116 = 16
$117 = 16
$118 = 4
$119 = 2
$120 = {
  ob_base = {
    ob_refcnt = 1, 
    ob_type = 0x7f99fab988c0 <PyCField_Type>
  }, 
  offset = 2, 
  size = 1048576, 
  index = 2, 
  proto = <_ctypes.PyCSimpleType at remote 0x1aa1e60>, 
  getfunc = 0x0, 
  setfunc = 0x0, 
  anonymous = 0
}
[Inferior 1 (process 10140) exited normally]
quit