dwarf_loader: Handle volatile bitfields in class_member__cache_byte_size
Reported-by: Breno Leitão <leitao@linux.vnet.ibm.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
7fc7148be7
commit
50844b5f25
|
@ -1800,6 +1800,9 @@ static int class_member__cache_byte_size(struct tag *self, struct cu *cu,
|
|||
uint16_t type_bit_size;
|
||||
size_t integral_bit_size;
|
||||
|
||||
if (tag__is_volatile(type))
|
||||
type = cu__type(cu, type->type);
|
||||
|
||||
if (tag__is_enumeration(type)) {
|
||||
type_bit_size = tag__type(type)->size;
|
||||
integral_bit_size = sizeof(int) * 8; /* FIXME: always this size? */
|
||||
|
|
|
@ -319,6 +319,11 @@ static inline bool tag__is_variable(const struct tag *self)
|
|||
return self->tag == DW_TAG_variable;
|
||||
}
|
||||
|
||||
static inline bool tag__is_volatile(const struct tag *self)
|
||||
{
|
||||
return self->tag == DW_TAG_volatile_type;
|
||||
}
|
||||
|
||||
static inline bool tag__has_namespace(const struct tag *self)
|
||||
{
|
||||
return tag__is_struct(self) ||
|
||||
|
|
Loading…
Reference in New Issue