/* Read coff symbol tables and convert to internal format, for GDB.
- Copyright (C) 1987-2022 Free Software Foundation, Inc.
+ Copyright (C) 1987-2023 Free Software Foundation, Inc.
Contributed by David D. Johnson, Brown University (ddj@cs.brown.edu).
This file is part of GDB.
if (aux_entry->x_file.x_n.x_n.x_zeroes == 0)
{
if (strlen (stringtab + aux_entry->x_file.x_n.x_n.x_offset) >= BUFSIZ)
- internal_error (__FILE__, __LINE__, _("coff file name too long"));
+ internal_error (_("coff file name too long"));
strcpy (buffer, stringtab + aux_entry->x_file.x_n.x_n.x_offset);
}
else
struct type *real_target = real_type->target_type ();
int field_size = real_target->num_fields () * sizeof (struct field);
- TYPE_LENGTH (target) = TYPE_LENGTH (real_target);
+ target->set_length (real_target->length ());
target->set_num_fields (real_target->num_fields ());
field *fields = (struct field *) TYPE_ALLOC (target, field_size);
if (real_sym->aclass () == LOC_TYPEDEF
&& real_sym->domain () == VAR_DOMAIN
&& real_sym->type ()->code () == TYPE_CODE_PTR
- && TYPE_LENGTH (real_sym->type ()->target_type ()) != 0)
+ && real_sym->type ()->target_type ()->length () != 0)
{
const char *name = real_sym->linkage_name ();
int hash = hashname (name);
references work themselves out via the magic of
coff_lookup_type. */
if (sym->type ()->code () == TYPE_CODE_PTR
- && TYPE_LENGTH (sym->type ()->target_type ()) == 0
+ && sym->type ()->target_type ()->length () == 0
&& sym->type ()->target_type ()->code ()
!= TYPE_CODE_UNDEF)
{
type->set_code (TYPE_CODE_STRUCT);
type->set_name (NULL);
INIT_CPLUS_SPECIFIC (type);
- TYPE_LENGTH (type) = 0;
+ type->set_length (0);
type->set_fields (nullptr);
type->set_num_fields (0);
}
type = coff_alloc_type (cs->c_symnum);
type->set_name (NULL);
INIT_CPLUS_SPECIFIC (type);
- TYPE_LENGTH (type) = 0;
+ type->set_length (0);
type->set_fields (nullptr);
type->set_num_fields (0);
}
type = coff_alloc_type (cs->c_symnum);
type->set_code (TYPE_CODE_ENUM);
type->set_name (NULL);
- TYPE_LENGTH (type) = 0;
+ type->set_length (0);
type->set_fields (nullptr);
type->set_num_fields (0);
}
type = coff_alloc_type (index);
type->set_code (TYPE_CODE_STRUCT);
INIT_CPLUS_SPECIFIC (type);
- TYPE_LENGTH (type) = length;
+ type->set_length (length);
while (!done && symnum < lastsym && symnum < nlist_nsyms_global)
{
/* Now fill in the fields of the type-structure. */
if (length > 0)
- TYPE_LENGTH (type) = length;
+ type->set_length (length);
else /* Assume ints. */
- TYPE_LENGTH (type) = gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT;
+ type->set_length (gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT);
type->set_code (TYPE_CODE_ENUM);
type->set_num_fields (nsyms);
type->set_fields