{
off = align_up (off, field_alignment (type, f))
+ TYPE_FIELD_BITPOS (type, f);
- SET_FIELD_BITPOS (rtype->field (f), off);
+ rtype->field (f).set_loc_bitpos (off);
TYPE_FIELD_BITSIZE (rtype, f) = 0;
if (ada_is_variant_part (type, f))
for (int i = 0; i < type->num_fields (); i++)
{
struct type *subtype = check_typedef (type->field (i).type ());
- int bitpos = TYPE_FIELD_BITPOS (type, i);
/* Ignore static fields, empty fields (for example nested
empty structures), and bitfields (these are handled by
|| TYPE_FIELD_PACKED (type, i))
continue;
+ int bitpos = TYPE_FIELD_BITPOS (type, i);
+
if (bitpos % 8 != 0)
return true;
unsigned int bitoffset)
{
struct type *subtype = check_typedef (type->field (i).type ());
- int bitpos = bitoffset + TYPE_FIELD_BITPOS (type, i);
- int pos = bitpos / 64;
enum amd64_reg_class subclass[2];
int bitsize = TYPE_FIELD_BITSIZE (type, i);
- int endpos;
if (bitsize == 0)
bitsize = TYPE_LENGTH (subtype) * 8;
- endpos = (bitpos + bitsize - 1) / 64;
/* Ignore static fields, or empty fields, for example nested
empty structures.*/
if (field_is_static (&type->field (i)) || bitsize == 0)
return;
+ int bitpos = bitoffset + TYPE_FIELD_BITPOS (type, i);
+ int pos = bitpos / 64;
+ int endpos = (bitpos + bitsize - 1) / 64;
+
if (subtype->code () == TYPE_CODE_STRUCT
|| subtype->code () == TYPE_CODE_UNION)
{
name));
list->field.set_type (decode_type (ms, ms->c_type, &sub_aux,
objfile));
- SET_FIELD_BITPOS (list->field, 8 * ms->c_value);
+ list->field.set_loc_bitpos (8 * ms->c_value);
FIELD_BITSIZE (list->field) = 0;
nfields++;
break;
name));
list->field.set_type (decode_type (ms, ms->c_type, &sub_aux,
objfile));
- SET_FIELD_BITPOS (list->field, ms->c_value);
+ list->field.set_loc_bitpos (ms->c_value);
FIELD_BITSIZE (list->field) = sub_aux.x_sym.x_misc.x_lnsz.x_size;
nfields++;
break;
SYMBOL_TYPE (xsym) = type;
type->field (n).set_name (xsym->linkage_name ());
- SET_FIELD_ENUMVAL (type->field (n), SYMBOL_VALUE (xsym));
+ type->field (n).set_loc_enumval (SYMBOL_VALUE (xsym));
if (SYMBOL_VALUE (xsym) < 0)
unsigned_enum = 0;
TYPE_FIELD_BITSIZE (type, n) = 0;
if (gdbarch_byte_order (arch) == BFD_ENDIAN_LITTLE)
{
f = append_composite_type_field_raw (the_struct, "A", bool_type);
- SET_FIELD_BITPOS (*f, 1);
+ f->set_loc_bitpos (1);
FIELD_BITSIZE (*f) = 1;
f = append_composite_type_field_raw (the_struct, "B", uint8_type);
- SET_FIELD_BITPOS (*f, 3);
+ f->set_loc_bitpos (3);
FIELD_BITSIZE (*f) = 3;
f = append_composite_type_field_raw (the_struct, "C", bool_type);
- SET_FIELD_BITPOS (*f, 7);
+ f->set_loc_bitpos (7);
FIELD_BITSIZE (*f) = 1;
}
/* According to the logic commented in "make_gdb_type_struct ()" of
else
{
f = append_composite_type_field_raw (the_struct, "A", bool_type);
- SET_FIELD_BITPOS (*f, 30);
+ f->set_loc_bitpos (30);
FIELD_BITSIZE (*f) = 1;
f = append_composite_type_field_raw (the_struct, "B", uint8_type);
- SET_FIELD_BITPOS (*f, 26);
+ f->set_loc_bitpos (26);
FIELD_BITSIZE (*f) = 3;
f = append_composite_type_field_raw (the_struct, "C", bool_type);
- SET_FIELD_BITPOS (*f, 24);
+ f->set_loc_bitpos (24);
FIELD_BITSIZE (*f) = 1;
}
process_struct_members (ccp, tid, t);
fp->set_type (t);
- SET_FIELD_BITPOS (*fp, offset / TARGET_CHAR_BIT);
+ fp->set_loc_bitpos (offset / TARGET_CHAR_BIT);
FIELD_BITSIZE (*fp) = get_bitsize (ccp->fp, tid, kind);
fip->fields.emplace_back (new_field);
fp = &new_field.field;
fp->set_name (name);
fp->set_type (nullptr);
- SET_FIELD_ENUMVAL (*fp, enum_value);
+ fp->set_loc_enumval (enum_value);
FIELD_BITSIZE (*fp) = 0;
if (name != nullptr)
type->field (0).set_type (field_type);
TYPE_FIELD_ARTIFICIAL (type, 0) = 1;
type->field (0).set_name ("<<discriminant>>");
- SET_FIELD_BITPOS (type->field (0), bit_offset);
+ type->field (0).set_loc_bitpos (bit_offset);
/* The order of fields doesn't really matter, so put the real
field at index 1 and the data-less field at index 2. */
/* NAME points into the original discriminant name, which
already has the correct lifetime. */
type->field (2).set_name (name);
- SET_FIELD_BITPOS (type->field (2), 0);
+ type->field (2).set_loc_bitpos (0);
/* Indicate that this is a variant type. */
static discriminant_range ranges[1] = { { 0, 0 } };
/* This was a pre-DWARF-5 GNU extension alias for DW_AT_call_origin. */
attr = dwarf2_attr (die, DW_AT_abstract_origin, cu);
}
- SET_FIELD_DWARF_BLOCK (call_site->target, NULL);
+
+ call_site->target.set_loc_dwarf_block (nullptr);
if (!attr || (attr->form_is_block () && attr->as_block ()->size == 0))
/* Keep NULL DWARF_BLOCK. */;
else if (attr->form_is_block ())
dlbaton->per_objfile = per_objfile;
dlbaton->per_cu = cu->per_cu;
- SET_FIELD_DWARF_BLOCK (call_site->target, dlbaton);
+ call_site->target.set_loc_dwarf_block (dlbaton);
}
else if (attr->form_is_ref ())
{
"physname, for referencing DIE %s [in module %s]"),
sect_offset_str (die->sect_off), objfile_name (objfile));
else
- SET_FIELD_PHYSNAME (call_site->target, target_physname);
+ call_site->target.set_loc_physname (target_physname);
}
else
{
{
lowpc = (gdbarch_adjust_dwarf2_addr (gdbarch, lowpc + baseaddr)
- baseaddr);
- SET_FIELD_PHYSADDR (call_site->target, lowpc);
+ call_site->target.set_loc_physaddr (lowpc);
}
}
}
if (attr->form_is_constant ())
{
LONGEST offset = attr->constant_value (0);
- SET_FIELD_BITPOS (*field, offset * bits_per_byte);
+ field->set_loc_bitpos (offset * bits_per_byte);
}
else if (attr->form_is_section_offset ())
dwarf2_complex_location_expr_complaint ();
bool handled;
CORE_ADDR offset = decode_locdesc (attr->as_block (), cu, &handled);
if (handled)
- SET_FIELD_BITPOS (*field, offset * bits_per_byte);
+ field->set_loc_bitpos (offset * bits_per_byte);
else
{
dwarf2_per_objfile *per_objfile = cu->per_objfile;
dlbaton->per_objfile = per_objfile;
dlbaton->per_cu = cu->per_cu;
- SET_FIELD_DWARF_BLOCK (*field, dlbaton);
+ field->set_loc_dwarf_block (dlbaton);
}
}
else
{
attr = dwarf2_attr (die, DW_AT_data_bit_offset, cu);
if (attr != nullptr)
- SET_FIELD_BITPOS (*field, attr->constant_value (0));
+ field->set_loc_bitpos (attr->constant_value (0));
}
}
/* Get type of field. */
fp->set_type (die_type (die, cu));
- SET_FIELD_BITPOS (*fp, 0);
+ fp->set_loc_bitpos (0);
/* Get bit size of field (zero if none). */
attr = dwarf2_attr (die, DW_AT_bit_size, cu);
anonymous object to the MSB of the field. We don't
have to do anything special since we don't need to
know the size of the anonymous object. */
- SET_FIELD_BITPOS (*fp, (FIELD_BITPOS (*fp)
- + attr->constant_value (0)));
+ fp->set_loc_bitpos ((FIELD_BITPOS (*fp) + attr->constant_value (0)));
}
else
{
bit field. */
anonymous_size = TYPE_LENGTH (fp->type ());
}
- SET_FIELD_BITPOS (*fp,
- (FIELD_BITPOS (*fp)
- + anonymous_size * bits_per_byte
- - bit_offset - FIELD_BITSIZE (*fp)));
+ fp->set_loc_bitpos (FIELD_BITPOS (*fp)
+ + anonymous_size * bits_per_byte
+ - bit_offset - FIELD_BITSIZE (*fp));
}
}
/* The name is already allocated along with this objfile, so we don't
need to duplicate it for the type. */
- SET_FIELD_PHYSNAME (*fp, physname ? physname : "");
+ fp->set_loc_physname (physname ? physname : "");
fp->set_type (die_type (die, cu));
fp->set_name (fieldname);
}
fields.emplace_back ();
struct field &field = fields.back ();
field.set_name (dwarf2_physname (name, child_die, cu));
- SET_FIELD_ENUMVAL (field, value);
+ field.set_loc_enumval (value);
}
if (!fields.empty ())
else
return false;
- SET_FIELD_BITPOS (*field, 8 * offset);
+ field->set_loc_bitpos (8 * offset);
if (size != TYPE_LENGTH (field->type ()))
FIELD_BITSIZE (*field) = 8 * size;
result->field (1).set_name ("P_BOUNDS");
result->field (1).set_type (lookup_pointer_type (bounds));
- SET_FIELD_BITPOS (result->field (1), 8 * bounds_offset);
+ result->field (1).set_loc_bitpos (8 * bounds_offset);
result->set_name (type->name ());
TYPE_LENGTH (result) = (TYPE_LENGTH (result->field (0).type ())
CORE_ADDR addr;
if (dwarf2_evaluate_property (&prop, nullptr, addr_stack, &addr,
true))
- SET_FIELD_BITPOS (resolved_type->field (i),
- TARGET_CHAR_BIT * (addr - addr_stack->addr));
+ resolved_type->field (i).set_loc_bitpos
+ (TARGET_CHAR_BIT * (addr - addr_stack->addr));
}
/* As we know this field is not a static field, the field's
switch (TYPE_FIELD_LOC_KIND (type, i))
{
case FIELD_LOC_KIND_BITPOS:
- SET_FIELD_BITPOS (new_type->field (i),
- TYPE_FIELD_BITPOS (type, i));
+ new_type->field (i).set_loc_bitpos (TYPE_FIELD_BITPOS (type, i));
break;
case FIELD_LOC_KIND_ENUMVAL:
- SET_FIELD_ENUMVAL (new_type->field (i),
- TYPE_FIELD_ENUMVAL (type, i));
+ new_type->field (i).set_loc_enumval (TYPE_FIELD_ENUMVAL (type, i));
break;
case FIELD_LOC_KIND_PHYSADDR:
- SET_FIELD_PHYSADDR (new_type->field (i),
- TYPE_FIELD_STATIC_PHYSADDR (type, i));
+ new_type->field (i).set_loc_physaddr
+ (TYPE_FIELD_STATIC_PHYSADDR (type, i));
break;
case FIELD_LOC_KIND_PHYSNAME:
- SET_FIELD_PHYSNAME (new_type->field (i),
- xstrdup (TYPE_FIELD_STATIC_PHYSNAME (type,
- i)));
+ new_type->field (i).set_loc_physname
+ (xstrdup (TYPE_FIELD_STATIC_PHYSNAME (type, i)));
break;
case FIELD_LOC_KIND_DWARF_BLOCK:
- SET_FIELD_DWARF_BLOCK (new_type->field (i),
- TYPE_FIELD_DWARF_BLOCK (type, i));
+ new_type->field (i).set_loc_dwarf_block
+ (TYPE_FIELD_DWARF_BLOCK (type, i));
break;
default:
internal_error (__FILE__, __LINE__,
type->field (field_nr).set_name (xstrdup (name));
type->field (field_nr).set_type (field_type);
- SET_FIELD_BITPOS (type->field (field_nr), start_bitpos);
+ type->field (field_nr).set_loc_bitpos (start_bitpos);
TYPE_FIELD_BITSIZE (type, field_nr) = nr_bits;
type->set_num_fields (type->num_fields () + 1);
}
TYPE_LENGTH (t) = TYPE_LENGTH (t) + TYPE_LENGTH (field);
if (t->num_fields () > 1)
{
- SET_FIELD_BITPOS (f[0],
- (FIELD_BITPOS (f[-1])
- + (TYPE_LENGTH (f[-1].type ())
- * TARGET_CHAR_BIT)));
+ f->set_loc_bitpos
+ ((FIELD_BITPOS (f[-1]) + (TYPE_LENGTH (f[-1].type ()) * TARGET_CHAR_BIT)));
if (alignment)
{
if (left)
{
- SET_FIELD_BITPOS (f[0], FIELD_BITPOS (f[0]) + (alignment - left));
+ f->set_loc_bitpos (FIELD_BITPOS (f[0]) + (alignment - left));
TYPE_LENGTH (t) += (alignment - left) / TARGET_CHAR_BIT;
}
}
m_name = name;
}
- union field_location loc;
+ /* Location getters / setters. */
+
+ field_loc_kind loc_kind () const
+ {
+ return m_loc_kind;
+ }
+
+ LONGEST loc_bitpos () const
+ {
+ gdb_assert (m_loc_kind == FIELD_LOC_KIND_BITPOS);
+ return m_loc.bitpos;
+ }
+
+ void set_loc_bitpos (LONGEST bitpos)
+ {
+ m_loc_kind = FIELD_LOC_KIND_BITPOS;
+ m_loc.bitpos = bitpos;
+ }
+
+ LONGEST loc_enumval () const
+ {
+ gdb_assert (m_loc_kind == FIELD_LOC_KIND_ENUMVAL);
+ return m_loc.enumval;
+ }
+
+ void set_loc_enumval (LONGEST enumval)
+ {
+ m_loc_kind = FIELD_LOC_KIND_ENUMVAL;
+ m_loc.enumval = enumval;
+ }
+
+ CORE_ADDR loc_physaddr () const
+ {
+ gdb_assert (m_loc_kind == FIELD_LOC_KIND_PHYSADDR);
+ return m_loc.physaddr;
+ }
+
+ void set_loc_physaddr (CORE_ADDR physaddr)
+ {
+ m_loc_kind = FIELD_LOC_KIND_PHYSADDR;
+ m_loc.physaddr = physaddr;
+ }
+
+ const char *loc_physname () const
+ {
+ gdb_assert (m_loc_kind == FIELD_LOC_KIND_PHYSNAME);
+ return m_loc.physname;
+ }
+
+ void set_loc_physname (const char *physname)
+ {
+ m_loc_kind = FIELD_LOC_KIND_PHYSNAME;
+ m_loc.physname = physname;
+ }
+
+ dwarf2_locexpr_baton *loc_dwarf_block () const
+ {
+ gdb_assert (m_loc_kind == FIELD_LOC_KIND_DWARF_BLOCK);
+ return m_loc.dwarf_block;
+ }
+
+ void set_loc_dwarf_block (dwarf2_locexpr_baton *dwarf_block)
+ {
+ m_loc_kind = FIELD_LOC_KIND_DWARF_BLOCK;
+ m_loc.dwarf_block = dwarf_block;
+ }
+
+ union field_location m_loc;
/* * For a function or member type, this is 1 if the argument is
marked artificial. Artificial arguments should not be shown
/* * Discriminant for union field_location. */
- ENUM_BITFIELD(field_loc_kind) loc_kind : 3;
+ ENUM_BITFIELD(field_loc_kind) m_loc_kind : 3;
/* * Size of this field, in bits, or zero if not packed.
If non-zero in an array type, indicates the element size in
struct call_site_target
{
- union field_location loc;
+ field_loc_kind loc_kind () const
+ {
+ return m_loc_kind;
+ }
+
+ CORE_ADDR loc_physaddr () const
+ {
+ gdb_assert (m_loc_kind == FIELD_LOC_KIND_PHYSADDR);
+ return m_loc.physaddr;
+ }
+
+ void set_loc_physaddr (CORE_ADDR physaddr)
+ {
+ m_loc_kind = FIELD_LOC_KIND_PHYSADDR;
+ m_loc.physaddr = physaddr;
+ }
+
+ const char *loc_physname () const
+ {
+ gdb_assert (m_loc_kind == FIELD_LOC_KIND_PHYSNAME);
+ return m_loc.physname;
+ }
+
+ void set_loc_physname (const char *physname)
+ {
+ m_loc_kind = FIELD_LOC_KIND_PHYSNAME;
+ m_loc.physname = physname;
+ }
+
+ dwarf2_locexpr_baton *loc_dwarf_block () const
+ {
+ gdb_assert (m_loc_kind == FIELD_LOC_KIND_DWARF_BLOCK);
+ return m_loc.dwarf_block;
+ }
+
+ void set_loc_dwarf_block (dwarf2_locexpr_baton *dwarf_block)
+ {
+ m_loc_kind = FIELD_LOC_KIND_DWARF_BLOCK;
+ m_loc.dwarf_block = dwarf_block;
+ }
+
+ union field_location m_loc;
/* * Discriminant for union field_location. */
- ENUM_BITFIELD(field_loc_kind) loc_kind : 3;
+ ENUM_BITFIELD(field_loc_kind) m_loc_kind : 3;
};
union call_site_parameter_u
(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits == NULL ? 0 \
: B_TST(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits, (index)))
-#define FIELD_LOC_KIND(thisfld) ((thisfld).loc_kind)
-#define FIELD_BITPOS_LVAL(thisfld) ((thisfld).loc.bitpos)
-#define FIELD_BITPOS(thisfld) (FIELD_BITPOS_LVAL (thisfld) + 0)
-#define FIELD_ENUMVAL_LVAL(thisfld) ((thisfld).loc.enumval)
-#define FIELD_ENUMVAL(thisfld) (FIELD_ENUMVAL_LVAL (thisfld) + 0)
-#define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname)
-#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
-#define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block)
-#define SET_FIELD_BITPOS(thisfld, bitpos) \
- (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_BITPOS, \
- FIELD_BITPOS_LVAL (thisfld) = (bitpos))
-#define SET_FIELD_ENUMVAL(thisfld, enumval) \
- (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_ENUMVAL, \
- FIELD_ENUMVAL_LVAL (thisfld) = (enumval))
-#define SET_FIELD_PHYSNAME(thisfld, name) \
- (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \
- FIELD_STATIC_PHYSNAME (thisfld) = (name))
-#define SET_FIELD_PHYSADDR(thisfld, addr) \
- (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
- FIELD_STATIC_PHYSADDR (thisfld) = (addr))
-#define SET_FIELD_DWARF_BLOCK(thisfld, addr) \
- (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_DWARF_BLOCK, \
- FIELD_DWARF_BLOCK (thisfld) = (addr))
+#define FIELD_LOC_KIND(thisfld) ((thisfld).loc_kind ())
+#define FIELD_BITPOS(thisfld) ((thisfld).loc_bitpos ())
+#define FIELD_ENUMVAL(thisfld) ((thisfld).loc_enumval ())
+#define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc_physname ())
+#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc_physaddr ())
+#define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc_dwarf_block ())
#define FIELD_ARTIFICIAL(thisfld) ((thisfld).artificial)
#define FIELD_BITSIZE(thisfld) ((thisfld).bitsize)
/* ptrdiff_t vcall_and_vbase_offsets[0]; */
field->set_name ("vcall_and_vbase_offsets");
field->set_type (lookup_array_range_type (ptrdiff_type, 0, -1));
- SET_FIELD_BITPOS (*field, offset * TARGET_CHAR_BIT);
+ field->set_loc_bitpos (offset * TARGET_CHAR_BIT);
offset += TYPE_LENGTH (field->type ());
field++;
/* ptrdiff_t offset_to_top; */
field->set_name ("offset_to_top");
field->set_type (ptrdiff_type);
- SET_FIELD_BITPOS (*field, offset * TARGET_CHAR_BIT);
+ field->set_loc_bitpos (offset * TARGET_CHAR_BIT);
offset += TYPE_LENGTH (field->type ());
field++;
/* void *type_info; */
field->set_name ("type_info");
field->set_type (void_ptr_type);
- SET_FIELD_BITPOS (*field, offset * TARGET_CHAR_BIT);
+ field->set_loc_bitpos (offset * TARGET_CHAR_BIT);
offset += TYPE_LENGTH (field->type ());
field++;
/* void (*virtual_functions[0]) (); */
field->set_name ("virtual_functions");
field->set_type (lookup_array_range_type (ptr_to_void_fn_type, 0, -1));
- SET_FIELD_BITPOS (*field, offset * TARGET_CHAR_BIT);
+ field->set_loc_bitpos (offset * TARGET_CHAR_BIT);
offset += TYPE_LENGTH (field->type ());
field++;
/* The vtable. */
field->set_name ("_vptr.type_info");
field->set_type (void_ptr_type);
- SET_FIELD_BITPOS (*field, offset * TARGET_CHAR_BIT);
+ field->set_loc_bitpos (offset * TARGET_CHAR_BIT);
offset += TYPE_LENGTH (field->type ());
field++;
/* The name. */
field->set_name ("__name");
field->set_type (char_ptr_type);
- SET_FIELD_BITPOS (*field, offset * TARGET_CHAR_BIT);
+ field->set_loc_bitpos (offset * TARGET_CHAR_BIT);
offset += TYPE_LENGTH (field->type ());
field++;
if (tsym.st != stMember)
break;
- SET_FIELD_ENUMVAL (*f, tsym.value);
+ f->set_loc_enumval (tsym.value);
f->set_type (t);
f->set_name (debug_info->ss + cur_fdr->issBase + tsym.iss);
FIELD_BITSIZE (*f) = 0;
struct field *f = &top_stack->cur_type->field (top_stack->cur_field);
top_stack->cur_field++;
f->set_name (name);
- SET_FIELD_BITPOS (*f, sh->value);
+ f->set_loc_bitpos (sh->value);
bitsize = 0;
f->set_type (parse_type (cur_fd, ax, sh->index, &bitsize, bigend,
name));
{
struct field *field = &result->field (i);
- SET_FIELD_BITPOS (*field, bitpos);
+ field->set_loc_bitpos (bitpos);
bitpos += TYPE_LENGTH (type1) * TARGET_CHAR_BIT;
field->set_name (field1);
if (delta != 0)
bitpos += align - delta;
}
- SET_FIELD_BITPOS (*field, bitpos);
+ field->set_loc_bitpos (bitpos);
field->set_name (field2);
field->set_type (type2);
{
int nbits;
- SET_FIELD_BITPOS (fip->list->field,
- read_huge_number (pp, ';', &nbits, 0));
+ fip->list->field.set_loc_bitpos (read_huge_number (pp, ';', &nbits, 0));
if (nbits != 0)
return 0;
}
p++;
}
/* Static class member. */
- SET_FIELD_PHYSNAME (fip->list->field, savestring (*pp, p - *pp));
+ fip->list->field.set_loc_physname (savestring (*pp, p - *pp));
*pp = p + 1;
return;
}
{
int nbits;
- SET_FIELD_BITPOS (fip->list->field,
- read_huge_number (pp, ',', &nbits, 0));
+ fip->list->field.set_loc_bitpos (read_huge_number (pp, ',', &nbits, 0));
if (nbits != 0)
{
stabs_general_complaint ("bad structure-type format");
corresponding to this baseclass. Always zero in the absence of
multiple inheritance. */
- SET_FIELD_BITPOS (newobj->field, read_huge_number (pp, ',', &nbits, 0));
+ newobj->field.set_loc_bitpos (read_huge_number (pp, ',', &nbits, 0));
if (nbits != 0)
return 0;
}
SYMBOL_TYPE (xsym) = type;
type->field (n).set_name (xsym->linkage_name ());
- SET_FIELD_ENUMVAL (type->field (n), SYMBOL_VALUE (xsym));
+ type->field (n).set_loc_enumval (SYMBOL_VALUE (xsym));
TYPE_FIELD_BITSIZE (type, n) = 0;
}
if (syms == osyms)
bitsize = f.end - f.start + 1;
total_size = e->size * TARGET_CHAR_BIT;
if (gdbarch_byte_order (m_gdbarch) == BFD_ENDIAN_BIG)
- SET_FIELD_BITPOS (fld[0], total_size - f.start - bitsize);
+ fld->set_loc_bitpos (total_size - f.start - bitsize);
else
- SET_FIELD_BITPOS (fld[0], f.start);
+ fld->set_loc_bitpos (f.start);
FIELD_BITSIZE (fld[0]) = bitsize;
}
else
xstrdup (f.name.c_str ()),
NULL);
- SET_FIELD_BITPOS (fld[0], f.start);
+ fld->set_loc_enumval (f.start);
}
}
for (i = 0; i < count; i++)
{
type->field (i).set_name (values[i].name);
- SET_FIELD_ENUMVAL (type->field (i), values[i].value);
+ type->field (i).set_loc_enumval (values[i].value);
}
return type;