From: Daniel Jacobowitz Date: Thu, 19 Jun 2003 20:40:40 +0000 (+0000) Subject: * varobj.c (get_type, get_target_type): Use check_typedef. X-Git-Tag: ezannoni_pie-20030916-branchpoint~1102 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6766a268ba1e52b0a8acc78ca4c07cb5b09da7fc;p=external%2Fbinutils.git * varobj.c (get_type, get_target_type): Use check_typedef. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b235fa2..badbac7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2003-06-19 Daniel Jacobowitz + * varobj.c (get_type, get_target_type): Use check_typedef. + +2003-06-19 Daniel Jacobowitz + * breakpoint.c (insert_catchpoint): Call internal_error. 2003-06-19 Theodore A. Roth diff --git a/gdb/varobj.c b/gdb/varobj.c index 0c9f048..1c5fc63 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -1379,9 +1379,8 @@ make_cleanup_free_variable (struct varobj *var) 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. */ @@ -1391,8 +1390,8 @@ get_type (struct varobj *var) 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; } @@ -1423,8 +1422,8 @@ get_target_type (struct type *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;