aboutsummaryrefslogtreecommitdiff
path: root/gdb/coffread.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2008-10-08 12:49:13 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2008-10-08 12:49:13 +0000
commitd6a843b5945deb4cb2df9b07c4f9b19e6fba01de (patch)
tree177468b0839e7f53cc9cbb65b497d7da521fa508 /gdb/coffread.c
parentaea274d3a7cefa3f3a858ece7444ec49f9a108f0 (diff)
downloadgdb-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/coffread.c')
-rw-r--r--gdb/coffread.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 4d8ef8a..add6cdd 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -1943,9 +1943,8 @@ coff_read_struct_type (int index, int length, int lastsym,
obsavestring (name, strlen (name), &objfile->objfile_obstack);
FIELD_TYPE (list->field) = decode_type (ms, ms->c_type, &sub_aux,
objfile);
- FIELD_BITPOS (list->field) = 8 * ms->c_value;
+ SET_FIELD_BITPOS (list->field, 8 * ms->c_value);
FIELD_BITSIZE (list->field) = 0;
- FIELD_STATIC_KIND (list->field) = 0;
nfields++;
break;
@@ -1961,9 +1960,8 @@ coff_read_struct_type (int index, int length, int lastsym,
obsavestring (name, strlen (name), &objfile->objfile_obstack);
FIELD_TYPE (list->field) = decode_type (ms, ms->c_type, &sub_aux,
objfile);
- FIELD_BITPOS (list->field) = ms->c_value;
+ SET_FIELD_BITPOS (list->field, ms->c_value);
FIELD_BITSIZE (list->field) = sub_aux.x_sym.x_misc.x_lnsz.x_size;
- FIELD_STATIC_KIND (list->field) = 0;
nfields++;
break;
@@ -2080,11 +2078,10 @@ coff_read_enum_type (int index, int length, int lastsym,
struct symbol *xsym = syms->symbol[j];
SYMBOL_TYPE (xsym) = type;
TYPE_FIELD_NAME (type, n) = SYMBOL_LINKAGE_NAME (xsym);
- TYPE_FIELD_BITPOS (type, n) = SYMBOL_VALUE (xsym);
+ SET_FIELD_BITPOS (TYPE_FIELD (type, n), SYMBOL_VALUE (xsym));
if (SYMBOL_VALUE (xsym) < 0)
unsigned_enum = 0;
TYPE_FIELD_BITSIZE (type, n) = 0;
- TYPE_FIELD_STATIC_KIND (type, n) = 0;
}
if (syms == osyms)
break;