for (fieldno = 0; fieldno < TYPE_NFIELDS (struct_type);
fieldno++)
{
- char *field_name = TYPE_FIELD_NAME (struct_type, fieldno);
+ const char *field_name =
+ TYPE_FIELD_NAME (struct_type, fieldno);
if (field_name != NULL && strcmp (field_name, label) == 0)
{
for (fieldno = 0; fieldno < TYPE_NFIELDS (struct_type);
fieldno++)
{
- char *field_name = TYPE_FIELD_NAME (struct_type, fieldno);
+ const char *field_name =
+ TYPE_FIELD_NAME (struct_type, fieldno);
field_type = TYPE_FIELD_TYPE (struct_type, fieldno);
if ((field_name == 0 || *field_name == '\0')
struct type *type;
int nargs;
struct value **argvec;
- int upper, lower;
+ int lower;
int code;
int ix;
long mem_offset;
val_type = expect_type;
}
- struct_return = using_struct_return (exp->gdbarch,
- value_type (method),
+ struct_return = using_struct_return (exp->gdbarch, method,
val_type);
}
else if (expect_type != NULL)
if (opts.objectprint && TYPE_TARGET_TYPE(type)
&& (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_CLASS))
{
- real_type = value_rtti_target_type (arg1, &full, &top, &using_enc);
+ real_type = value_rtti_indirect_type (arg1, &full, &top,
+ &using_enc);
if (real_type)
- {
- if (TYPE_CODE (type) == TYPE_CODE_PTR)
- real_type = lookup_pointer_type (real_type);
- else
- real_type = lookup_reference_type (real_type);
-
arg1 = value_cast (real_type, arg1);
- }
}
}
case TYPE_CODE_MEMBERPTR:
/* Now, convert these values to an address. */
- arg1 = value_cast (lookup_pointer_type (TYPE_DOMAIN_TYPE (type)),
- arg1);
+ arg1 = value_cast_pointers (lookup_pointer_type (TYPE_DOMAIN_TYPE (type)),
+ arg1, 1);
mem_offset = value_as_long (arg2);