+2003-06-19 Daniel Jacobowitz <drow@mvista.com>
+
+ * varobj.c (get_type, get_target_type): Use check_typedef.
+
2003-06-19 Daniel Jacobowitz <drow@mvista.com>
* breakpoint.c (insert_catchpoint): Call internal_error.
return make_cleanup (do_free_variable_cleanup, var);
}
-/* 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.
+/* This returns the type of the variable. It also skips past typedefs
+ to return the real type of the variable.
NOTE: TYPE_TARGET_TYPE should NOT be used anywhere in this file
except within get_target_type and get_type. */
struct type *type;
type = var->type;
- while (type != NULL && TYPE_CODE (type) == TYPE_CODE_TYPEDEF)
- type = TYPE_TARGET_TYPE (type);
+ if (type != NULL)
+ type = check_typedef (type);
return type;
}
if (type != NULL)
{
type = TYPE_TARGET_TYPE (type);
- while (type != NULL && TYPE_CODE (type) == TYPE_CODE_TYPEDEF)
- type = TYPE_TARGET_TYPE (type);
+ if (type != NULL)
+ type = check_typedef (type);
}
return type;