/* If we don't have a prototype, coerce to integer type if necessary. */
if (!is_prototyped)
{
- if (TYPE_LENGTH (type) < TYPE_LENGTH (builtin->builtin_int))
+ if (type->length () < builtin->builtin_int->length ())
type = builtin->builtin_int;
}
/* Currently all target ABIs require at least the width of an integer
type for an argument. We may have to conditionalize the following
type coercion for future targets. */
- if (TYPE_LENGTH (type) < TYPE_LENGTH (builtin->builtin_int))
+ if (type->length () < builtin->builtin_int->length ())
type = builtin->builtin_int;
break;
case TYPE_CODE_FLT:
if (!is_prototyped && coerce_float_to_double_p)
{
- if (TYPE_LENGTH (type) < TYPE_LENGTH (builtin->builtin_double))
+ if (type->length () < builtin->builtin_double->length ())
type = builtin->builtin_double;
- else if (TYPE_LENGTH (type) > TYPE_LENGTH (builtin->builtin_double))
+ else if (type->length () > builtin->builtin_double->length ())
type = builtin->builtin_long_double;
}
break;
{
/* Handle the case of functions lacking debugging info.
Their values are characters since their addresses are char. */
- if (TYPE_LENGTH (ftype) == 1)
+ if (ftype->length () == 1)
funaddr = value_as_address (value_addr (function));
else
{
retval = allocate_value (ri->value_type);
read_value_memory (retval, 0, 1, ri->struct_addr,
value_contents_raw (retval).data (),
- TYPE_LENGTH (ri->value_type));
+ ri->value_type->length ());
}
}
else
{
/* Stack grows downward. Align STRUCT_ADDR and SP after
making space. */
- sp -= TYPE_LENGTH (values_type);
+ sp -= values_type->length ();
if (gdbarch_frame_align_p (gdbarch))
sp = gdbarch_frame_align (gdbarch, sp);
addr = sp;
if (gdbarch_frame_align_p (gdbarch))
sp = gdbarch_frame_align (gdbarch, sp);
addr = sp;
- sp += TYPE_LENGTH (values_type);
+ sp += values_type->length ();
if (gdbarch_frame_align_p (gdbarch))
sp = gdbarch_frame_align (gdbarch, sp);
}
else
{
gdb_assert (sp <= lastval_addr);
- sp = lastval_addr + TYPE_LENGTH (value_type (lastval));
+ sp = lastval_addr + value_type (lastval)->length ();
}
if (gdbarch_frame_align_p (gdbarch))
if (info.trivially_copy_constructible)
{
- int length = TYPE_LENGTH (param_type);
+ int length = param_type->length ();
write_memory (addr, value_contents (args[i]).data (), length);
}
else