diff options
author | David Carlton <carlton@bactrian.org> | 2002-09-27 20:03:29 +0000 |
---|---|---|
committer | David Carlton <carlton@bactrian.org> | 2002-09-27 20:03:29 +0000 |
commit | 3e844c0ae62d377296dd9ec86ed60641ae12bbee (patch) | |
tree | fe02a7723a8a012acf831f98d7d17e033bb2a4fa /gdb/varobj.c | |
parent | 9e5e2fe9360dc6ac81b0616c447c6ceec0aca661 (diff) | |
download | gdb-3e844c0ae62d377296dd9ec86ed60641ae12bbee.zip gdb-3e844c0ae62d377296dd9ec86ed60641ae12bbee.tar.gz gdb-3e844c0ae62d377296dd9ec86ed60641ae12bbee.tar.bz2 |
Merge with mainline; tag is carlton_dictionary-20020927-merge
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r-- | gdb/varobj.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c index 4ae046a..16ba528 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -1345,7 +1345,10 @@ make_cleanup_free_variable (struct varobj *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. */ + 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) { @@ -1374,7 +1377,10 @@ get_type_deref (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) { @@ -1959,7 +1965,7 @@ c_type_of_child (struct varobj *parent, int index) 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: @@ -1968,7 +1974,7 @@ c_type_of_child (struct varobj *parent, int index) 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: @@ -1976,7 +1982,7 @@ c_type_of_child (struct varobj *parent, int index) break; default: - type = TYPE_TARGET_TYPE (parent->type); + type = get_target_type (parent->type); break; } break; |