dwarf_loader: Handle const and volatile bitfields in tag__recode_dwarf_bitfield
We should do just as with typedefs, i.e. find the type these tags point to, and create a new volatile/const tag pointing to the underlying bitfield tag. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
9f4cedc61d
commit
bc77517911
|
@ -480,6 +480,26 @@ int tag__recode_dwarf_bitfield(struct tag *self, struct cu *cu, uint16_t bit_siz
|
|||
}
|
||||
break;
|
||||
|
||||
case DW_TAG_const_type:
|
||||
case DW_TAG_volatile_type: {
|
||||
const struct dwarf_tag *dself = self->priv;
|
||||
struct dwarf_tag *dtype = dwarf_cu__find_type_by_id(cu->priv,
|
||||
dself->type);
|
||||
struct tag *type = dtype->tag;
|
||||
|
||||
id = tag__recode_dwarf_bitfield(type, cu, bit_size);
|
||||
if (id == self->type)
|
||||
return id;
|
||||
|
||||
recoded = zalloc(sizeof(*recoded));
|
||||
if (recoded == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
recoded->tag = DW_TAG_volatile_type;
|
||||
recoded->type = id;
|
||||
}
|
||||
break;
|
||||
|
||||
case DW_TAG_base_type:
|
||||
/*
|
||||
* Here we must search on the final, core cu, not on
|
||||
|
|
Loading…
Reference in New Issue