diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2008-10-08 12:49:13 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2008-10-08 12:49:13 +0000 |
commit | d6a843b5945deb4cb2df9b07c4f9b19e6fba01de (patch) | |
tree | 177468b0839e7f53cc9cbb65b497d7da521fa508 /gdb/dwarf2read.c | |
parent | aea274d3a7cefa3f3a858ece7444ec49f9a108f0 (diff) | |
download | gdb-d6a843b5945deb4cb2df9b07c4f9b19e6fba01de.zip gdb-d6a843b5945deb4cb2df9b07c4f9b19e6fba01de.tar.gz gdb-d6a843b5945deb4cb2df9b07c4f9b19e6fba01de.tar.bz2 |
Convert static_kind into loc_kind enum.
* gdbtypes.h (enum field_loc_kind): New.
(union field_location): New field dwarf_block.
(struct field): Rename static_kind as loc_kind.
(FIELD_STATIC_KIND): Rename to ...
(FIELD_LOC_KIND): ... here.
(TYPE_FIELD_STATIC_KIND): Rename to ...
(TYPE_FIELD_LOC_KIND): ... here and use there now new FIELD_LOC_KIND.
(TYPE_FIELD_STATIC_HAS_ADDR): Remove.
(TYPE_FIELD_STATIC): Remove.
(TYPE_FIELD_BITPOS): Reformat.
(SET_FIELD_BITPOS): New.
(FIELD_PHYSADDR): Rename to ...
(FIELD_STATIC_PHYSADDR): ... here.
(TYPE_FIELD_STATIC_PHYSADDR): Follow the FIELD_PHYSADDR rename.
(SET_FIELD_PHYSADDR): Use new FIELD_LOC_KIND.
(FIELD_PHYSNAME): Rename to ...
(FIELD_STATIC_PHYSNAME): ... here.
(TYPE_FIELD_STATIC_PHYSNAME): Follow the FIELD_PHYSNAME rename.
(SET_FIELD_PHYSNAME): Use new FIELD_LOC_KIND.
(FIELD_DWARF_BLOCK, TYPE_FIELD_DWARF_BLOCK, SET_FIELD_DWARF_BLOCK): New.
(field_is_static): New declaration.
* gdbtypes.c (field_is_static): New function.
(copy_type_recursive): Update throughout.
* amd64-tdep.c, c-typeprint.c, coffread.c, cp-valprint.c, dwarf2read.c,
eval.c, jv-typeprint.c, jv-valprint.c, mdebugread.c, p-typeprint.c,
p-valprint.c, valops.c, value.c, varobj.c: Update throughout.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 6dba82e..d894696 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -3588,7 +3588,7 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die, /* Get type of field. */ fp->type = die_type (die, cu); - FIELD_STATIC_KIND (*fp) = 0; + SET_FIELD_BITPOS (*fp, 0); /* Get bit size of field (zero if none). */ attr = dwarf2_attr (die, DW_AT_bit_size, cu); @@ -3617,10 +3617,8 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die, else byte_offset = decode_locdesc (DW_BLOCK (attr), cu); - FIELD_BITPOS (*fp) = byte_offset * bits_per_byte; + SET_FIELD_BITPOS (*fp, byte_offset * bits_per_byte); } - else - FIELD_BITPOS (*fp) = 0; attr = dwarf2_attr (die, DW_AT_bit_offset, cu); if (attr) { @@ -3712,10 +3710,9 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die, /* C++ base class field. */ attr = dwarf2_attr (die, DW_AT_data_member_location, cu); if (attr) - FIELD_BITPOS (*fp) = (decode_locdesc (DW_BLOCK (attr), cu) - * bits_per_byte); + SET_FIELD_BITPOS (*fp, decode_locdesc (DW_BLOCK (attr), cu) + * bits_per_byte); FIELD_BITSIZE (*fp) = 0; - FIELD_STATIC_KIND (*fp) = 0; FIELD_TYPE (*fp) = die_type (die, cu); FIELD_NAME (*fp) = type_name_no_tag (fp->type); fip->nbaseclasses++; @@ -4433,9 +4430,8 @@ process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu) FIELD_NAME (fields[num_fields]) = SYMBOL_LINKAGE_NAME (sym); FIELD_TYPE (fields[num_fields]) = NULL; - FIELD_BITPOS (fields[num_fields]) = SYMBOL_VALUE (sym); + SET_FIELD_BITPOS (fields[num_fields], SYMBOL_VALUE (sym)); FIELD_BITSIZE (fields[num_fields]) = 0; - FIELD_STATIC_KIND (fields[num_fields]) = 0; num_fields++; } |