def analyze_die_array(die):
    type_offset = die_get_type_offset(die)
    elements = []
    for child in die.iter_children():
        if (child.tag != 'DW_TAG_subrange_type'):
            continue
        if ('DW_AT_upper_bound' not in child.attributes):
            continue
        ub = child.attributes['DW_AT_upper_bound']
        if (not ub.form.startswith('DW_FORM_data')):
            continue
        elements.append((ub.value + 1))
    if (not elements):
        if (type_offset in type_env.keys()):
            mt = type_env[type_offset]
            if mt.has_kobject():
                if (isinstance(mt, KobjectType) and (mt.name == STACK_TYPE)):
                    elements.append(1)
                    type_env[die.offset] = ArrayType(die.offset, elements, type_offset)
    else:
        type_env[die.offset] = ArrayType(die.offset, elements, type_offset)
def analyze_die_array(die):
    type_offset = die_get_type_offset(die)
    elements = []
    for child in die.iter_children():
        if (child.tag != 'DW_TAG_subrange_type'):
            continue
        if ('DW_AT_upper_bound' not in child.attributes):
            continue
        ub = child.attributes['DW_AT_upper_bound']
        if (not ub.form.startswith('DW_FORM_data')):
            continue
        elements.append((ub.value + 1))
    if (not elements):
        if (type_offset in type_env.keys()):
            mt = type_env[type_offset]
            if mt.has_kobject():
                if (isinstance(mt, KobjectType) and (mt.name == STACK_TYPE)):
                    elements.append(1)
                    type_env[die.offset] = ArrayType(die.offset, elements, type_offset)
    else:
        type_env[die.offset] = ArrayType(die.offset, elements, type_offset)