>>> from ctypes import *
>>> X = type('X', (Structure,), {'_fields_': [('a', c_uint8, 8), ('b', c_uint8, 8), ('c', c_uint32, 16)]})
>>> sizeof(X)
5


Breakpoint 1, PyCStructUnionType_update_stgdict (type=type@entry=<_ctypes.PyCStructType at remote 0x1a978d0>, fields=fields@entry=[('a', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('b', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('c', <_ctypes.PyCSimpleType at remote 0x1aa3fe0>, 16)], isStruct=isStruct@entry=1) at /target/cpython-fix/Modules/_ctypes/stgdict.c:602
602	        if (isStruct) {
$1 = 0
$2 = 0
$3 = 0
$4 = 0
$5 = {
  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 0x1a978d0>, fields=fields@entry=[('a', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('b', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('c', <_ctypes.PyCSimpleType at remote 0x1aa3fe0>, 16)], isStruct=isStruct@entry=1) at /target/cpython-fix/Modules/_ctypes/stgdict.c:617
617	        total_align = max(align, total_align);
$6 = 8
$7 = 8
$8 = 1
$9 = 1
$10 = {
  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 0x1a978d0>, fields=fields@entry=[('a', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('b', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('c', <_ctypes.PyCSimpleType at remote 0x1aa3fe0>, 16)], isStruct=isStruct@entry=1) at /target/cpython-fix/Modules/_ctypes/stgdict.c:602
602	        if (isStruct) {
$11 = 8
$12 = 8
$13 = 1
$14 = 1
$15 = {
  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 0x1a978d0>, fields=fields@entry=[('a', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('b', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('c', <_ctypes.PyCSimpleType at remote 0x1aa3fe0>, 16)], isStruct=isStruct@entry=1) at /target/cpython-fix/Modules/_ctypes/stgdict.c:617
617	        total_align = max(align, total_align);
$16 = 8
$17 = 8
$18 = 2
$19 = 1
$20 = {
  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 0x1a978d0>, fields=fields@entry=[('a', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('b', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('c', <_ctypes.PyCSimpleType at remote 0x1aa3fe0>, 16)], isStruct=isStruct@entry=1) at /target/cpython-fix/Modules/_ctypes/stgdict.c:602
602	        if (isStruct) {
$21 = 8
$22 = 8
$23 = 2
$24 = 1
$25 = {
  dict = {
    ob_base = {
      ob_refcnt = 1, 
      ob_type = 0x7f99fab98b60 <PyCStgDict_Type>
    }, 
    ma_used = 7, 
    ma_version_tag = 13154, 
    ma_keys = 0x7f99fab30e00, 
    ma_values = 0x0
  }, 
  size = 4, 
  align = 4, 
  length = 0, 
  ffi_type_pointer = {
    size = 4, 
    alignment = 4, 
    type = 9, 
    elements = 0x0
  }, 
  proto = 'I', 
  setfunc = 0x7f99fab8839f <I_set>, 
  getfunc = 0x7f99fab88b16 <I_get>, 
  paramfunc = 0x7f99fab796c8 <PyCSimpleType_paramfunc>, 
  argtypes = 0x0, 
  converters = 0x0, 
  restype = 0x0, 
  checker = 0x0, 
  flags = 4096, 
  format = 0x7f99fafbb440 "<I", 
  ndim = 0, 
  shape = 0x0
}

Breakpoint 2, PyCStructUnionType_update_stgdict (type=type@entry=<_ctypes.PyCStructType at remote 0x1a978d0>, fields=fields@entry=[('a', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('b', <_ctypes.PyCSimpleType at remote 0x1aa5b00>, 8), ('c', <_ctypes.PyCSimpleType at remote 0x1aa3fe0>, 16)], isStruct=isStruct@entry=1) at /target/cpython-fix/Modules/_ctypes/stgdict.c:617
617	        total_align = max(align, total_align);
$26 = 32
$27 = 24
$28 = 5
$29 = 1
$30 = {
  ob_base = {
    ob_refcnt = 1, 
    ob_type = 0x7f99fab988c0 <PyCField_Type>
  }, 
  offset = 1, 
  size = 1048584, 
  index = 2, 
  proto = <_ctypes.PyCSimpleType at remote 0x1aa3fe0>, 
  getfunc = 0x0, 
  setfunc = 0x0, 
  anonymous = 0
}

