diff options
Diffstat (limited to 'gdb/coffread.c')
-rw-r--r-- | gdb/coffread.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c index e4db4fd..3ff62bc 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -1492,8 +1492,8 @@ patch_opaque_types (struct symtab *s) from different files with the same name. */ if (real_sym->aclass () == LOC_TYPEDEF && real_sym->domain () == VAR_DOMAIN - && SYMBOL_TYPE (real_sym)->code () == TYPE_CODE_PTR - && TYPE_LENGTH (TYPE_TARGET_TYPE (SYMBOL_TYPE (real_sym))) != 0) + && real_sym->type ()->code () == TYPE_CODE_PTR + && TYPE_LENGTH (TYPE_TARGET_TYPE (real_sym->type ())) != 0) { const char *name = real_sym->linkage_name (); int hash = hashname (name); @@ -1514,7 +1514,7 @@ patch_opaque_types (struct symtab *s) opaque_type_chain[hash] = SYMBOL_VALUE_CHAIN (sym); } - patch_type (SYMBOL_TYPE (sym), SYMBOL_TYPE (real_sym)); + patch_type (sym->type (), real_sym->type ()); if (prev) { @@ -1571,9 +1571,9 @@ process_coff_symbol (struct coff_symbol *cs, if (ISFCN (cs->c_type)) { SYMBOL_VALUE (sym) += objfile->text_section_offset (); - SYMBOL_TYPE (sym) = - lookup_function_type (decode_function_type (cs, cs->c_type, - aux, objfile)); + sym->set_type + (lookup_function_type (decode_function_type (cs, cs->c_type, + aux, objfile))); sym->set_aclass_index (LOC_BLOCK); if (cs->c_sclass == C_STAT || cs->c_sclass == C_THUMBSTAT @@ -1585,7 +1585,7 @@ process_coff_symbol (struct coff_symbol *cs, } else { - SYMBOL_TYPE (sym) = decode_type (cs, cs->c_type, aux, objfile); + sym->set_type (decode_type (cs, cs->c_type, aux, objfile)); switch (cs->c_sclass) { case C_NULL: @@ -1656,10 +1656,10 @@ process_coff_symbol (struct coff_symbol *cs, sym->set_domain (VAR_DOMAIN); /* If type has no name, give it one. */ - if (SYMBOL_TYPE (sym)->name () == 0) + if (sym->type ()->name () == 0) { - if (SYMBOL_TYPE (sym)->code () == TYPE_CODE_PTR - || SYMBOL_TYPE (sym)->code () == TYPE_CODE_FUNC) + if (sym->type ()->code () == TYPE_CODE_PTR + || sym->type ()->code () == TYPE_CODE_FUNC) { /* If we are giving a name to a type such as "pointer to foo" or "function returning foo", we @@ -1682,7 +1682,7 @@ process_coff_symbol (struct coff_symbol *cs, ; } else - SYMBOL_TYPE (sym)->set_name (xstrdup (sym->linkage_name ())); + sym->type ()->set_name (xstrdup (sym->linkage_name ())); } /* Keep track of any type which points to empty structured @@ -1691,9 +1691,9 @@ process_coff_symbol (struct coff_symbol *cs, not an empty structured type, though; the forward references work themselves out via the magic of coff_lookup_type. */ - if (SYMBOL_TYPE (sym)->code () == TYPE_CODE_PTR - && TYPE_LENGTH (TYPE_TARGET_TYPE (SYMBOL_TYPE (sym))) == 0 - && TYPE_TARGET_TYPE (SYMBOL_TYPE (sym))->code () + if (sym->type ()->code () == TYPE_CODE_PTR + && TYPE_LENGTH (TYPE_TARGET_TYPE (sym->type ())) == 0 + && TYPE_TARGET_TYPE (sym->type ())->code () != TYPE_CODE_UNDEF) { int i = hashname (sym->linkage_name ()); @@ -1713,11 +1713,11 @@ process_coff_symbol (struct coff_symbol *cs, /* Some compilers try to be helpful by inventing "fake" names for anonymous enums, structures, and unions, like "~0fake" or ".0fake". Thanks, but no thanks... */ - if (SYMBOL_TYPE (sym)->name () == 0) + if (sym->type ()->name () == 0) if (sym->linkage_name () != NULL && *sym->linkage_name () != '~' && *sym->linkage_name () != '.') - SYMBOL_TYPE (sym)->set_name (xstrdup (sym->linkage_name ())); + sym->type ()->set_name (xstrdup (sym->linkage_name ())); add_symbol_to_list (sym, get_file_symbols ()); break; @@ -2143,7 +2143,7 @@ coff_read_enum_type (int index, int length, int lastsym, { struct symbol *xsym = syms->symbol[j]; - SYMBOL_TYPE (xsym) = type; + xsym->set_type (type); type->field (n).set_name (xsym->linkage_name ()); type->field (n).set_loc_enumval (SYMBOL_VALUE (xsym)); if (SYMBOL_VALUE (xsym) < 0) |