+2015-07-14 Simon Marchi <simon.marchi@ericsson.com>
+
+ * gdbtypes.h (CHECK_TYPEDEF): Remove.
+ * aarch64-tdep.c (aarch64_return_in_memory): Replace CHECK_TYPEDEF
+ with check_typedef.
+ * ada-lang.c (decode_constrained_packed_array_type): Likewise.
+ (ada_array_length): Likewise.
+ (find_parallel_type_by_descriptive_type): Likewise.
+ (ada_check_typedef): Likewise.
+ * arm-tdep.c (arm_return_in_memory): Likewise.
+ * ax-gdb.c (gen_trace_static_fields): Likewise.
+ (gen_struct_ref_recursive): Likewise.
+ * c-exp.y (exp : SIZEOF '(' type ')' %prec UNARY): Likewise.
+ (variable: block COLONCOLON name): Likewise.
+ (qualified_name: TYPENAME COLONCOLON name): Likewise.
+ * c-lang.c (classify_type): Likewise.
+ * c-typeprint.c (c_print_type): Likewise.
+ (c_print_typedef): Likewise.
+ (c_type_print_base): Likewise.
+ * c-valprint.c (c_val_print): Likewise.
+ * compile/compile-c-types.c (convert_type): Likewise.
+ * compile/compile-object-load.c (get_out_value_type): Likewise.
+ * completer.c (add_struct_fields): Likewise.
+ (expression_completer): Likewise.
+ * cp-namespace.c (cp_find_type_baseclass_by_name): Likewise.
+ (cp_lookup_nested_symbol_1): Likewise.
+ (cp_lookup_nested_symbol): Likewise.
+ * cp-valprint.c (cp_print_value_fields): Likewise.
+ (cp_print_static_field): Likewise.
+ * d-valprint.c (d_val_print): Likewise.
+ * eval.c (evaluate_subexp_standard): Likewise.
+ (evaluate_subexp_for_sizeof): Likewise.
+ * f-exp.y (exp : SIZEOF '(' type ')' %prec UNARY): Likewise.
+ * f-typeprint.c (f_type_print_base): Likewise.
+ * f-valprint.c (f_val_print): Likewise.
+ * gdbtypes.c (get_discrete_bounds): Likewise.
+ (create_array_type_with_stride): Likewise.
+ (type_name_no_tag_or_error): Likewise.
+ (lookup_struct_elt_type): Likewise.
+ (get_unsigned_type_max): Likewise.
+ (internal_type_vptr_fieldno): Likewise.
+ (set_type_vptr_fieldno): Likewise.
+ (internal_type_vptr_basetype): Likewise.
+ (set_type_vptr_basetype): Likewise.
+ (get_vptr_fieldno): Likewise.
+ (is_integral_type): Likewise.
+ (is_scalar_type): Likewise.
+ (is_scalar_type_recursive): Likewise.
+ (distance_to_ancestor): Likewise.
+ (is_unique_ancestor_worker): Likewise.
+ (check_types_equal): Likewise.
+ * gnu-v2-abi.c (gnuv2_value_rtti_type): Likewise.
+
2015-07-14 Iain Buclaw <ibuclaw@gdcproject.org>
* dwarf2read.c (find_slot_in_mapped_hash): Extend language support to
int nRc;
enum type_code code;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
/* In the AArch64 ABI, "integer" like aggregate types are returned
in registers. For an aggregate type to be integer like, its size
lim_warning (_("could not find bounds information on packed array"));
return NULL;
}
- CHECK_TYPEDEF (shadow_type);
+ shadow_type = check_typedef (shadow_type);
if (TYPE_CODE (shadow_type) != TYPE_CODE_ARRAY)
{
high = value_as_long (desc_one_bound (desc_bounds (arr), n, 1));
}
- CHECK_TYPEDEF (arr_type);
+ arr_type = check_typedef (arr_type);
index_type = TYPE_INDEX_TYPE (arr_type);
if (index_type != NULL)
{
result = tmp;
else
{
- CHECK_TYPEDEF (result);
+ result = check_typedef (result);
if (HAVE_GNAT_AUX_INFO (result))
result = TYPE_DESCRIPTIVE_TYPE (result);
else
&& is_thick_pntr (ada_typedef_target_type (type)))
return type;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
if (type == NULL || TYPE_CODE (type) != TYPE_CODE_ENUM
|| !TYPE_STUB (type)
|| TYPE_TAG_NAME (type) == NULL)
int nRc;
enum type_code code;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
/* In the ARM ABI, "integer" like aggregate types are returned in
registers. For an aggregate type to be integer like, its size
int i, nbases = TYPE_N_BASECLASSES (type);
struct axs_value value;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
for (i = TYPE_NFIELDS (type) - 1; i >= nbases; i--)
{
int i, rslt;
int nbases = TYPE_N_BASECLASSES (type);
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
for (i = TYPE_NFIELDS (type) - 1; i >= nbases; i--)
{
(parse_language (pstate),
parse_gdbarch (pstate),
"int"));
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
/* $5.3.3/2 of the C++ Standard (n3290 draft)
says of sizeof: "When applied to a reference
qualified_name: TYPENAME COLONCOLON name
{
struct type *type = $1.type;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
if (!type_aggregate_p (type))
error (_("`%s' is not defined as an aggregate type."),
TYPE_SAFE_NAME (type));
struct stoken tmp_token;
char *buf;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
if (!type_aggregate_p (type))
error (_("`%s' is not defined as an aggregate type."),
TYPE_SAFE_NAME (type));
/* Perhaps check_typedef did not update the target type. In
this case, force the lookup again and hope it works out.
It never will for C, but it might for C++. */
- CHECK_TYPEDEF (elttype);
+ elttype = check_typedef (elttype);
}
}
const char *local_name;
if (show > 0)
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
local_name = find_typedef_in_hash (flags, type);
if (local_name != NULL)
struct symbol *new_symbol,
struct ui_file *stream)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
fprintf_filtered (stream, "typedef ");
type_print (type, "", stream, 0);
if (TYPE_NAME ((SYMBOL_TYPE (new_symbol))) == 0
return;
}
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
switch (TYPE_CODE (type))
{
{
struct type *unresolved_type = type;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
switch (TYPE_CODE (type))
{
case TYPE_CODE_ARRAY:
/* We don't ever have to deal with typedefs in this code, because
those are only needed as symbols by the C compiler. */
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
inst.type = type;
found = htab_find (context->type_map, &inst);
error (_("No \"%s\" symbol found"), COMPILE_I_EXPR_PTR_TYPE);
gdb_type = SYMBOL_TYPE (gdb_val_sym);
- CHECK_TYPEDEF (gdb_type);
+ gdb_type = check_typedef (gdb_type);
gdb_ptr_type_sym = block_lookup_symbol (block, COMPILE_I_EXPR_PTR_TYPE,
VAR_DOMAIN);
if (gdb_ptr_type_sym == NULL)
error (_("No \"%s\" symbol found"), COMPILE_I_EXPR_PTR_TYPE);
gdb_ptr_type = SYMBOL_TYPE (gdb_ptr_type_sym);
- CHECK_TYPEDEF (gdb_ptr_type);
+ gdb_ptr_type = check_typedef (gdb_ptr_type);
if (TYPE_CODE (gdb_ptr_type) != TYPE_CODE_PTR)
error (_("Type of \"%s\" is not a pointer"), COMPILE_I_EXPR_PTR_TYPE);
gdb_type_from_ptr = TYPE_TARGET_TYPE (gdb_ptr_type);
int computed_type_name = 0;
const char *type_name = NULL;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
for (i = 0; i < TYPE_NFIELDS (type); ++i)
{
if (i < TYPE_N_BASECLASSES (type))
{
for (;;)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
if (TYPE_CODE (type) != TYPE_CODE_PTR
&& TYPE_CODE (type) != TYPE_CODE_REF)
break;
{
int i;
- CHECK_TYPEDEF (parent_type);
+ parent_type = check_typedef (parent_type);
for (i = 0; i < TYPE_N_BASECLASSES (parent_type); ++i)
{
struct type *type = check_typedef (TYPE_BASECLASS (parent_type, i));
}
/* If this is a class with baseclasses, search them next. */
- CHECK_TYPEDEF (container_type);
+ container_type = check_typedef (container_type);
if (TYPE_N_BASECLASSES (container_type) > 0)
{
sym = find_symbol_in_baseclass (container_type, nested_name, block,
original type. */
struct type *saved_parent_type = parent_type;
- CHECK_TYPEDEF (parent_type);
+ parent_type = check_typedef (parent_type);
if (symbol_lookup_debug)
{
int fields_seen = 0;
static int last_set_recurse = -1;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
if (recurse == 0)
{
addr = value_address (val);
obstack_grow (&dont_print_statmem_obstack, (char *) &addr,
sizeof (CORE_ADDR));
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
cp_print_value_fields (type, value_enclosing_type (val),
value_contents_for_printing (val),
value_embedded_offset (val), addr,
{
int ret;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
switch (TYPE_CODE (type))
{
case TYPE_CODE_STRUCT:
block_for_pc (funaddr);
- CHECK_TYPEDEF (val_type);
+ val_type = check_typedef (val_type);
if ((val_type == NULL)
|| (TYPE_CODE(val_type) == TYPE_CODE_ERROR))
/* $5.3.3/2 of the C++ Standard (n3290 draft) says of sizeof:
"When applied to a reference or a reference type, the result is
the size of the referenced type." */
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
if (exp->language_defn->la_language == language_cplus
&& TYPE_CODE (type) == TYPE_CODE_REF)
type = check_typedef (TYPE_TARGET_TYPE (type));
write_exp_elt_type (pstate,
parse_f_type (pstate)
->builtin_integer);
- CHECK_TYPEDEF ($3);
+ $3 = check_typedef ($3);
write_exp_elt_longcst (pstate,
(LONGEST) TYPE_LENGTH ($3));
write_exp_elt_opcode (pstate, OP_LONG); }
}
if (TYPE_CODE (type) != TYPE_CODE_TYPEDEF)
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
switch (TYPE_CODE (type))
{
CORE_ADDR addr;
int index;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
switch (TYPE_CODE (type))
{
case TYPE_CODE_STRING:
int
get_discrete_bounds (struct type *type, LONGEST *lowp, LONGEST *highp)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
switch (TYPE_CODE (type))
{
case TYPE_CODE_RANGE:
if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0)
low_bound = high_bound = 0;
- CHECK_TYPEDEF (element_type);
+ element_type = check_typedef (element_type);
/* Be careful when setting the array length. Ada arrays can be
empty arrays with the high_bound being smaller than the low_bound.
In such cases, the array length should be zero. */
const char *name;
struct objfile *objfile;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
name = type_name_no_tag (type);
if (name != NULL)
for (;;)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
if (TYPE_CODE (type) != TYPE_CODE_PTR
&& TYPE_CODE (type) != TYPE_CODE_REF)
break;
{
unsigned int n;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
gdb_assert (TYPE_CODE (type) == TYPE_CODE_INT && TYPE_UNSIGNED (type));
gdb_assert (TYPE_LENGTH (type) <= sizeof (ULONGEST));
{
unsigned int n;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
gdb_assert (TYPE_CODE (type) == TYPE_CODE_INT && !TYPE_UNSIGNED (type));
gdb_assert (TYPE_LENGTH (type) <= sizeof (LONGEST));
int
internal_type_vptr_fieldno (struct type *type)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
gdb_assert (TYPE_CODE (type) == TYPE_CODE_STRUCT
|| TYPE_CODE (type) == TYPE_CODE_UNION);
if (!HAVE_CPLUS_STRUCT (type))
void
set_type_vptr_fieldno (struct type *type, int fieldno)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
gdb_assert (TYPE_CODE (type) == TYPE_CODE_STRUCT
|| TYPE_CODE (type) == TYPE_CODE_UNION);
if (!HAVE_CPLUS_STRUCT (type))
struct type *
internal_type_vptr_basetype (struct type *type)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
gdb_assert (TYPE_CODE (type) == TYPE_CODE_STRUCT
|| TYPE_CODE (type) == TYPE_CODE_UNION);
gdb_assert (TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_CPLUS_STUFF);
void
set_type_vptr_basetype (struct type *type, struct type *basetype)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
gdb_assert (TYPE_CODE (type) == TYPE_CODE_STRUCT
|| TYPE_CODE (type) == TYPE_CODE_UNION);
if (!HAVE_CPLUS_STRUCT (type))
int
get_vptr_fieldno (struct type *type, struct type **basetypep)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
if (TYPE_VPTR_FIELDNO (type) < 0)
{
{
/* FIXME: Should we return true for references as well as
pointers? */
- CHECK_TYPEDEF (t);
+ t = check_typedef (t);
return
(t != NULL
&& TYPE_CODE (t) == TYPE_CODE_PTR
int
is_integral_type (struct type *t)
{
- CHECK_TYPEDEF (t);
+ t = check_typedef (t);
return
((t != NULL)
&& ((TYPE_CODE (t) == TYPE_CODE_INT)
static int
is_scalar_type (struct type *type)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
switch (TYPE_CODE (type))
{
int
is_scalar_type_recursive (struct type *t)
{
- CHECK_TYPEDEF (t);
+ t = check_typedef (t);
if (is_scalar_type (t))
return 1;
int i;
int d;
- CHECK_TYPEDEF (base);
- CHECK_TYPEDEF (dclass);
+ base = check_typedef (base);
+ dclass = check_typedef (dclass);
if (class_types_same_p (base, dclass))
return 0;
{
int i, count = 0;
- CHECK_TYPEDEF (base);
- CHECK_TYPEDEF (dclass);
+ base = check_typedef (base);
+ dclass = check_typedef (dclass);
for (i = 0; i < TYPE_N_BASECLASSES (dclass) && count < 2; ++i)
{
check_types_equal (struct type *type1, struct type *type2,
VEC (type_equality_entry_d) **worklist)
{
- CHECK_TYPEDEF (type1);
- CHECK_TYPEDEF (type2);
+ type1 = check_typedef (type1);
+ type2 = check_typedef (type2);
if (type1 == type2)
return 1;
extern struct type *check_typedef (struct type *);
-#define CHECK_TYPEDEF(TYPE) \
- do { \
- (TYPE) = check_typedef (TYPE); \
- } while (0)
-
extern void check_stub_method_group (struct type *, int);
extern char *gdb_mangle_name (struct type *, int, int);
/* Get declared type. */
known_type = value_type (v);
- CHECK_TYPEDEF (known_type);
+ known_type = check_typedef (known_type);
/* RTTI works only or class objects. */
if (TYPE_CODE (known_type) != TYPE_CODE_STRUCT)
return NULL;
/* Make sure our basetype and known type match, otherwise, cast
so we can get at the vtable properly. */
btype = known_type_vptr_basetype;
- CHECK_TYPEDEF (btype);
+ btype = check_typedef (btype);
if (btype != known_type )
{
v = value_cast (btype, v);
{
int fieldnum, fieldelem;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
gdb_assert (TYPE_CODE (type) == TYPE_CODE_STRUCT
|| TYPE_CODE (type) == TYPE_CODE_UNION);
struct value *vtable_pointer;
CORE_ADDR vtable_address;
- CHECK_TYPEDEF (container_type);
+ container_type = check_typedef (container_type);
gdb_assert (TYPE_CODE (container_type) == TYPE_CODE_STRUCT);
/* If this type does not have a virtual table, don't read the first
{
int fieldnum, fieldelem;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
/* We're only interested in things that can have methods. */
if (TYPE_CODE (type) != TYPE_CODE_STRUCT
write_exp_elt_type
(pstate,
parse_type (pstate)->builtin_unsigned_int);
- CHECK_TYPEDEF ($3);
+ $3 = check_typedef ($3);
write_exp_elt_longcst (pstate,
(LONGEST) TYPE_LENGTH ($3));
write_exp_elt_opcode (pstate, OP_LONG);
struct type *type0 = TYPE_FIELD_TYPE (type, 0);
struct type *type1 = TYPE_FIELD_TYPE (type, 1);
- CHECK_TYPEDEF (type0);
- CHECK_TYPEDEF (type1);
+ type0 = check_typedef (type0);
+ type1 = check_typedef (type1);
if (TYPE_CODE (type0) == TYPE_CODE_PTR
&& strcmp (TYPE_FIELD_NAME (type, 0), "__data") == 0
{
struct type *target_type = TYPE_TARGET_TYPE (type0);
- CHECK_TYPEDEF (target_type);
+ target_type = check_typedef (target_type);
if (TYPE_CODE (target_type) == TYPE_CODE_INT
&& TYPE_LENGTH (target_type) == 1
enum go_type
go_classify_struct_type (struct type *type)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
/* Recognize strings as they're useful to be able to print without
pretty-printers. */
{
/* Borrowed from c-typeprint.c. */
if (show > 0)
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
/* Print the type of "abc" as "string", not char[4]. */
if (TYPE_CODE (type) == TYPE_CODE_ARRAY
const struct value *val,
const struct value_print_options *options)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
switch (TYPE_CODE (type))
{
struct type *ltype = value_type (arg1);
struct type *rtype = value_type (arg2);
- CHECK_TYPEDEF (ltype);
+ ltype = check_typedef (ltype);
ltype = STRIP_REFERENCE (ltype);
- CHECK_TYPEDEF (rtype);
+ rtype = check_typedef (rtype);
rtype = STRIP_REFERENCE (rtype);
if (TYPE_CODE (ltype) == TYPE_CODE_PTR
struct type *ltype = value_type (arg1);
struct type *rtype = value_type (arg2);
- CHECK_TYPEDEF (ltype);
+ ltype = check_typedef (ltype);
ltype = STRIP_REFERENCE (ltype);
- CHECK_TYPEDEF (rtype);
+ rtype = check_typedef (rtype);
rtype = STRIP_REFERENCE (rtype);
if (TYPE_CODE (ltype) == TYPE_CODE_PTR
= make_cleanup_value_free_to_mark (value_mark ());
type = value_type (value);
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
if (((TYPE_CODE (type) == TYPE_CODE_PTR)
|| (TYPE_CODE (type) == TYPE_CODE_REF))
TRY
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
length = TYPE_LENGTH (type);
contents = value_contents (value);
}
TRY
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
}
CATCH (except, RETURN_MASK_ALL)
{
TRY
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
}
CATCH (except, RETURN_MASK_ALL)
{
TRY
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
}
CATCH (except, RETURN_MASK_ALL)
{
if (!values_type)
values_type = builtin_type (gdbarch)->builtin_int;
- CHECK_TYPEDEF (values_type);
+ values_type = check_typedef (values_type);
/* Are we returning a value using a structure return (passing a
hidden argument pointing to storage) or a normal value return?
gdbarch = get_regcache_arch (stop_regs);
- CHECK_TYPEDEF (value_type);
+ value_type = check_typedef (value_type);
gdb_assert (TYPE_CODE (value_type) != TYPE_CODE_VOID);
/* FIXME: 2003-09-27: When returning from a nested inferior function
int
is_object_type (struct type *type)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
if (TYPE_CODE (type) == TYPE_CODE_PTR)
{
struct type *ttype = check_typedef (TYPE_TARGET_TYPE (type));
return;
}
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
switch (TYPE_CODE (type))
{
{
int i, len, n_baseclasses;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
fprintf_filtered (stream, "{");
len = TYPE_NFIELDS (type);
struct type *target_type;
CORE_ADDR addr;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
switch (TYPE_CODE (type))
{
case TYPE_CODE_PTR:
{
int method_counter;
- CHECK_TYPEDEF (t);
+ t = check_typedef (t);
/* Loop over each method name. At this level, all overloads of a name
are counted as a single name. There is an inner loop which loops over
return 1; /* Continue iterating. */
t = SYMBOL_TYPE (sym);
- CHECK_TYPEDEF (t);
+ t = check_typedef (t);
if (TYPE_CODE (t) != TYPE_CODE_STRUCT
&& TYPE_CODE (t) != TYPE_CODE_UNION
&& TYPE_CODE (t) != TYPE_CODE_NAMESPACE)
int show, int level,
const struct type_print_options *flags)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
QUIT;
m2_print_typedef (struct type *type, struct symbol *new_symbol,
struct ui_file *stream)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
fprintf_filtered (stream, "TYPE ");
if (!TYPE_NAME (SYMBOL_TYPE (new_symbol))
|| strcmp (TYPE_NAME ((SYMBOL_TYPE (new_symbol))),
static int
m2_get_discrete_bounds (struct type *type, LONGEST *lowp, LONGEST *highp)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
switch (TYPE_CODE (type))
{
case TYPE_CODE_CHAR:
struct type *target;
int bitval;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
fprintf_filtered (stream, "{");
len = TYPE_NFIELDS (type);
LONGEST len;
struct value *val;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
content_type = TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, 0));
addr = unpack_pointer (TYPE_FIELD_TYPE (type, 0),
const struct value_print_options *options,
int len)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
if (TYPE_LENGTH (type) > 0)
{
struct type *elttype;
CORE_ADDR addr;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
switch (TYPE_CODE (type))
{
case TYPE_CODE_ARRAY:
case TYPE_CODE_SET:
elttype = TYPE_INDEX_TYPE (type);
- CHECK_TYPEDEF (elttype);
+ elttype = check_typedef (elttype);
if (TYPE_STUB (elttype))
{
fprintf_filtered (stream, _("<incomplete type>"));
be printed using their TYPE_NAME. */
if (show > 0)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
if (TYPE_CODE (type) == TYPE_CODE_ARRAY && TYPE_VECTOR (type)
&& TYPE_NAME (type) != NULL)
show = 0;
write_exp_elt_type (pstate,
parse_type (pstate)->builtin_int);
current_type = parse_type (pstate)->builtin_int;
- CHECK_TYPEDEF ($3);
+ $3 = check_typedef ($3);
write_exp_elt_longcst (pstate,
(LONGEST) TYPE_LENGTH ($3));
write_exp_elt_opcode (pstate, OP_LONG); }
code = TYPE_CODE (type);
if (show > 0)
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
if ((code == TYPE_CODE_FUNC
|| code == TYPE_CODE_METHOD))
pascal_print_typedef (struct type *type, struct symbol *new_symbol,
struct ui_file *stream)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
fprintf_filtered (stream, "type ");
fprintf_filtered (stream, "%s = ", SYMBOL_PRINT_NAME (new_symbol));
type_print (type, "", stream, 0);
return;
}
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
switch (TYPE_CODE (type))
{
CORE_ADDR addr;
int want_space = 0;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
switch (TYPE_CODE (type))
{
case TYPE_CODE_ARRAY:
case TYPE_CODE_SET:
elttype = TYPE_INDEX_TYPE (type);
- CHECK_TYPEDEF (elttype);
+ elttype = check_typedef (elttype);
if (TYPE_STUB (elttype))
{
fprintf_filtered (stream, "<incomplete type>");
int i, len, n_baseclasses;
char *last_dont_print = obstack_next_free (&dont_print_statmem_obstack);
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
fprintf_filtered (stream, "{");
len = TYPE_NFIELDS (type);
obstack_grow (&dont_print_statmem_obstack, (char *) &addr,
sizeof (CORE_ADDR));
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
pascal_object_print_value_fields (type,
value_contents_for_printing (val),
value_embedded_offset (val),
TRY
{
- CHECK_TYPEDEF (checked_type);
+ checked_type = check_typedef (checked_type);
}
CATCH (except, RETURN_MASK_ALL)
{
{
TRY
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
}
CATCH (except, RETURN_MASK_ALL)
{
struct cleanup *cleanup = make_cleanup_value_free_to_mark (value_mark ());
type = value_type (val);
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
if (((TYPE_CODE (type) == TYPE_CODE_PTR)
|| (TYPE_CODE (type) == TYPE_CODE_REF))
struct type *ltype = value_type (arg1);
struct type *rtype = value_type (arg2);
- CHECK_TYPEDEF (ltype);
+ ltype = check_typedef (ltype);
ltype = STRIP_REFERENCE (ltype);
- CHECK_TYPEDEF (rtype);
+ rtype = check_typedef (rtype);
rtype = STRIP_REFERENCE (rtype);
handled = 1;
struct type *ltype = value_type (arg1);
struct type *rtype = value_type (arg2);
- CHECK_TYPEDEF (ltype);
+ ltype = check_typedef (ltype);
ltype = STRIP_REFERENCE (ltype);
- CHECK_TYPEDEF (rtype);
+ rtype = check_typedef (rtype);
rtype = STRIP_REFERENCE (rtype);
handled = 1;
TRY
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
if (!is_integral_type (type)
&& TYPE_CODE (type) != TYPE_CODE_PTR)
TRY
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
if (TYPE_CODE (type) != TYPE_CODE_FLT)
error (_("Cannot convert value to float."));
return_type = value_type (return_value);
}
do_cleanups (old_chain);
- CHECK_TYPEDEF (return_type);
+ return_type = check_typedef (return_type);
return_value = value_cast (return_type, return_value);
/* Make sure the value is fully evaluated. It may live in the
int i;
/* The type may be a stub. */
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
for (i = TYPE_NFIELDS (type) - 1; i >= TYPE_N_BASECLASSES (type); i--)
{
/* I'm not really sure that type of this can ever
be typedefed; just be safe. */
- CHECK_TYPEDEF (t);
+ t = check_typedef (t);
if (TYPE_CODE (t) == TYPE_CODE_PTR
|| TYPE_CODE (t) == TYPE_CODE_REF)
t = TYPE_TARGET_TYPE (t);
{
if (type != NULL)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
if (language_pass_by_reference (type))
return RETURN_VALUE_STRUCT_CONVENTION;
}
unsigned int i;
unsigned len;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
switch (TYPE_CODE (type))
{
LONGEST low_bound, high_bound;
int i;
- CHECK_TYPEDEF (vector_type);
+ vector_type = check_typedef (vector_type);
gdb_assert (TYPE_CODE (vector_type) == TYPE_CODE_ARRAY
&& TYPE_VECTOR (vector_type));
/* We deref the value and then do the cast. */
return value_cast (type, coerce_ref (arg2));
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
code1 = TYPE_CODE (type);
arg2 = coerce_ref (arg2);
type2 = check_typedef (value_type (arg2));
fromval = coerce_array (fromval);
}
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
/* Since modifying a register can trash the frame chain, and
modifying memory can trash the frame cache, we save the old frame
int i;
int nbases;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
nbases = TYPE_N_BASECLASSES (type);
if (!looking_for_baseclass)
int name_matched = 0;
char dem_opname[64];
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
for (i = TYPE_NFN_FIELDS (type) - 1; i >= 0; i--)
{
const char *t_field_name = TYPE_FN_FIELDLIST_NAME (type, i);
VEC (xmethod_worker_ptr) *worker_vec = NULL, *new_vec = NULL;
gdb_assert (fn_list != NULL && xm_worker_vec != NULL);
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
/* First check in object itself.
This function is called recursively to search through base classes.
int
val_print_scalar_type_p (struct type *type)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
while (TYPE_CODE (type) == TYPE_CODE_REF)
{
type = TYPE_TARGET_TYPE (type);
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
}
switch (TYPE_CODE (type))
{
int embedded_offset,
const struct value *val)
{
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
if (TYPE_CODE (type) != TYPE_CODE_UNION
&& TYPE_CODE (type) != TYPE_CODE_STRUCT
LONGEST val;
CORE_ADDR addr;
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
switch (TYPE_CODE (type))
{
case TYPE_CODE_ARRAY:
int nosign;
*invp = 0; /* Assume valid. */
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
code = TYPE_CODE (type);
len = TYPE_LENGTH (type);
nosign = TYPE_UNSIGNED (type);
struct value *v;
struct type *type;
- CHECK_TYPEDEF (arg_type);
+ arg_type = check_typedef (arg_type);
type = TYPE_FIELD_TYPE (arg_type, fieldno);
/* Call check_typedef on our type to make sure that, if TYPE
/* Read the minimum number of bytes required; there may not be
enough bytes to read an entire ULONGEST. */
- CHECK_TYPEDEF (field_type);
+ field_type = check_typedef (field_type);
if (bitsize)
bytes_read = ((bitpos % 8) + bitsize + 7) / 8;
else