type: handle typedef bitfields

This commit is contained in:
Omar Sandoval 2018-04-06 00:24:48 -07:00
parent a63fbdb975
commit c6c7c080ce

View File

@ -612,6 +612,8 @@ class ArrayType(Type):
def _from_dwarf_bit_field(dwarf_index: DwarfIndex, die: Die) -> Type:
type_ = from_dwarf_type(dwarf_index, die.type())
while isinstance(type_, TypedefType):
type_ = type_.type
if not isinstance(type_, IntType):
raise DwarfFormatError('bit field type is not integer')
bit_size = die.find_constant(DW_AT.bit_size)