dwarf_loader: Handle volatile typedef bitfields
I.e. like these: struct _GClosure { volatile guint ref_count:15; /* 0:17 4 */ volatile guint meta_marshal:1; /* 0:16 4 */ volatile guint n_guards:1; /* 0:15 4 */ <SNIP> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
21f97592ef
commit
00ecd85798
|
@ -1809,12 +1809,15 @@ static int class_member__cache_byte_size(struct tag *self, struct cu *cu,
|
|||
|
||||
if (member->bitfield_size != 0) {
|
||||
struct tag *type = tag__follow_typedef(&member->tag, cu);
|
||||
check_volatile:
|
||||
if (tag__is_volatile(type)) {
|
||||
type = tag__follow_typedef(type, cu);
|
||||
goto check_volatile;
|
||||
}
|
||||
|
||||
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? */
|
||||
|
|
Loading…
Reference in New Issue