+2002-09-24 Keith Seitz <keiths@redhat.com>
+
+ * varobj.c (c_type_of_child): Use get_target_type instead
+ of TYPE_TARGET_TYPE.
+
2002-09-22 Fernando Nasser <fnasser@redhat.com>
* source.c (get_current_or_default_source_symtab_and_line): Remove
/* This returns the type of the variable. This skips past typedefs
and returns the real type of the variable. It also dereferences
- pointers and references. */
+ pointers and references.
+
+ NOTE: TYPE_TARGET_TYPE should NOT be used anywhere in this file
+ except within get_target_type and get_type. */
static struct type *
get_type (struct varobj *var)
{
}
/* This returns the target type (or NULL) of TYPE, also skipping
- past typedefs, just like get_type (). */
+ past typedefs, just like get_type ().
+
+ NOTE: TYPE_TARGET_TYPE should NOT be used anywhere in this file
+ except within get_target_type and get_type. */
static struct type *
get_target_type (struct type *type)
{
switch (TYPE_CODE (parent->type))
{
case TYPE_CODE_ARRAY:
- type = TYPE_TARGET_TYPE (parent->type);
+ type = get_target_type (parent->type);
break;
case TYPE_CODE_STRUCT:
break;
case TYPE_CODE_PTR:
- switch (TYPE_CODE (TYPE_TARGET_TYPE (parent->type)))
+ switch (TYPE_CODE (get_target_type (parent->type)))
{
case TYPE_CODE_STRUCT:
case TYPE_CODE_UNION:
break;
default:
- type = TYPE_TARGET_TYPE (parent->type);
+ type = get_target_type (parent->type);
break;
}
break;