{
t = parse_type (cur_fd, ax, sh->index + 1, 0, bigend, name);
if (strcmp (name, "malloc") == 0
{
t = parse_type (cur_fd, ax, sh->index + 1, 0, bigend, name);
if (strcmp (name, "malloc") == 0
{
/* I don't know why, but, at least under Alpha GNU/Linux,
when linking against a malloc without debugging
{
/* I don't know why, but, at least under Alpha GNU/Linux,
when linking against a malloc without debugging
(.Fxx or .xxfake or empty) for unnamed struct/union/enums.
Alpha cc puts out an sh->iss of zero for those. */
if (sh->iss == 0 || name[0] == '.' || name[0] == '\0')
(.Fxx or .xxfake or empty) for unnamed struct/union/enums.
Alpha cc puts out an sh->iss of zero for those. */
if (sh->iss == 0 || name[0] == '.' || name[0] == '\0')
- TYPE_NFIELDS (t) = nfields;
- TYPE_FIELDS (t) = f = ((struct field *)
- TYPE_ALLOC (t,
- nfields * sizeof (struct field)));
+ t->set_num_fields (nfields);
+ f = ((struct field *) TYPE_ALLOC (t, nfields * sizeof (struct field)));
+ t->set_fields (f);
are hopefully rare enough.
Alpha cc -migrate has a sh.value field of zero, we adjust
that too. */
are hopefully rare enough.
Alpha cc -migrate has a sh.value field of zero, we adjust
that too. */
|| TYPE_LENGTH (t) == 0)
TYPE_LENGTH (t) = gdbarch_int_bit (gdbarch) / HOST_CHAR_BIT;
for (ext_tsym = ext_sh + external_sym_size;
|| TYPE_LENGTH (t) == 0)
TYPE_LENGTH (t) = gdbarch_int_bit (gdbarch) / HOST_CHAR_BIT;
for (ext_tsym = ext_sh + external_sym_size;
enum_sym->set_linkage_name
(obstack_strdup (&mdebugread_objfile->objfile_obstack,
f->name));
enum_sym->set_linkage_name
(obstack_strdup (&mdebugread_objfile->objfile_obstack,
f->name));
/* gcc puts out an empty struct for an opaque struct definitions,
do not create a symbol for it either. */
/* gcc puts out an empty struct for an opaque struct definitions,
do not create a symbol for it either. */
{
/* No parameter type information is recorded with the function's
type. Set that from the type of the parameter symbols. */
{
/* No parameter type information is recorded with the function's
type. Set that from the type of the parameter symbols. */
- TYPE_NFIELDS (ftype) = nparams;
- TYPE_FIELDS (ftype) = (struct field *)
- TYPE_ALLOC (ftype, nparams * sizeof (struct field));
+ ftype->set_num_fields (nparams);
+ ftype->set_fields
+ ((struct field *)
+ TYPE_ALLOC (ftype, nparams * sizeof (struct field)));
add_symbol (s, top_stack->cur_st, top_stack->cur_block);
/* Incomplete definitions of structs should not get a name. */
add_symbol (s, top_stack->cur_st, top_stack->cur_block);
/* Incomplete definitions of structs should not get a name. */
- if (TYPE_NAME (SYMBOL_TYPE (s)) == NULL
- && (TYPE_NFIELDS (SYMBOL_TYPE (s)) != 0
- || (TYPE_CODE (SYMBOL_TYPE (s)) != TYPE_CODE_STRUCT
- && TYPE_CODE (SYMBOL_TYPE (s)) != TYPE_CODE_UNION)))
+ if (SYMBOL_TYPE (s)->name () == NULL
+ && (SYMBOL_TYPE (s)->num_fields () != 0
+ || (SYMBOL_TYPE (s)->code () != TYPE_CODE_STRUCT
+ && SYMBOL_TYPE (s)->code () != TYPE_CODE_UNION)))
{
/* If we are giving a name to a type such as "pointer to
foo" or "function returning foo", we better not set
{
/* If we are giving a name to a type such as "pointer to
foo" or "function returning foo", we better not set
tp = TYPE_TARGET_TYPE (tp);
/* Make sure that TYPE_CODE(tp) has an expected type code.
Any type may be returned from cross_ref if file indirect entries
are corrupted. */
tp = TYPE_TARGET_TYPE (tp);
/* Make sure that TYPE_CODE(tp) has an expected type code.
Any type may be returned from cross_ref if file indirect entries
are corrupted. */
- if (TYPE_CODE (tp) != TYPE_CODE_STRUCT
- && TYPE_CODE (tp) != TYPE_CODE_UNION
- && TYPE_CODE (tp) != TYPE_CODE_ENUM)
+ if (tp->code () != TYPE_CODE_STRUCT
+ && tp->code () != TYPE_CODE_UNION
+ && tp->code () != TYPE_CODE_ENUM)
exception is if we guessed wrong re struct/union/enum.
But for struct vs. union a wrong guess is harmless, so
don't complain(). */
exception is if we guessed wrong re struct/union/enum.
But for struct vs. union a wrong guess is harmless, so
don't complain(). */
/* Do not set the tag name if it is a compiler generated tag name
(.Fxx or .xxfake or empty) for unnamed struct/union/enums. */
if (name[0] == '.' || name[0] == '\0')
/* Do not set the tag name if it is a compiler generated tag name
(.Fxx or .xxfake or empty) for unnamed struct/union/enums. */
if (name[0] == '.' || name[0] == '\0')
- TYPE_NAME (tp) = NULL;
- else if (TYPE_NAME (tp) == NULL
- || strcmp (TYPE_NAME (tp), name) != 0)
- TYPE_NAME (tp)
- = obstack_strdup (&mdebugread_objfile->objfile_obstack, name);
+ tp->set_name (NULL);
+ else if (tp->name () == NULL
+ || strcmp (tp->name (), name) != 0)
+ tp->set_name (obstack_strdup (&mdebugread_objfile->objfile_obstack,
+ name));
/* Make sure that TYPE_CODE(tp) has an expected type code.
Any type may be returned from cross_ref if file indirect entries
are corrupted. */
/* Make sure that TYPE_CODE(tp) has an expected type code.
Any type may be returned from cross_ref if file indirect entries
are corrupted. */
{
/* Usually, TYPE_CODE(tp) is already type_code. The main
exception is if we guessed wrong re struct/union/enum. */
{
/* Usually, TYPE_CODE(tp) is already type_code. The main
exception is if we guessed wrong re struct/union/enum. */
- if (TYPE_NAME (tp) == NULL
- || strcmp (TYPE_NAME (tp), name) != 0)
- TYPE_NAME (tp)
- = obstack_strdup (&mdebugread_objfile->objfile_obstack, name);
+ if (tp->name () == NULL
+ || strcmp (tp->name (), name) != 0)
+ tp->set_name (obstack_strdup (&mdebugread_objfile->objfile_obstack,
+ name));
TYPE_RANGE_DATA (tp) = ((struct range_bounds *)
TYPE_ZALLOC (tp, sizeof (struct range_bounds)));
TYPE_LOW_BOUND (tp) = AUX_GET_DNLOW (bigend, ax);
TYPE_RANGE_DATA (tp) = ((struct range_bounds *)
TYPE_ZALLOC (tp, sizeof (struct range_bounds)));
TYPE_LOW_BOUND (tp) = AUX_GET_DNLOW (bigend, ax);
/* The bounds type should be an integer type, but might be anything
else due to corrupt aux entries. */
/* The bounds type should be an integer type, but might be anything
else due to corrupt aux entries. */
s->set_language (psymtab_language, &mdebugread_objfile->objfile_obstack);
s->compute_and_set_names (name, true, mdebugread_objfile->per_bfd);
s->set_language (psymtab_language, &mdebugread_objfile->objfile_obstack);
s->compute_and_set_names (name, true, mdebugread_objfile->per_bfd);