* gdbtypes.h (struct main_type): Remove flag_nottext.
	(enum type_flag_value): Remove TYPE_FLAG_NOTTEXT.
	(enum type_instance_flag_value): Add TYPE_INSTANCE_FLAG_NOTTEXT.
	(TYPE_NOTTEXT): Use TYPE_INSTANCE_FLAG_NOTTEXT instead of flag_nottext.
	* gdbtypes.c (make_vector_type): Use TYPE_INSTANCE_FLAG_NOTTEXT instead
	of TYPE_FLAG_NOTTEXT.
	(init_type): Remove the initialization of the flag_nottext field.
	(gdbtypes_post_init): Use TYPE_INSTANCE_FLAG_NOTTEXT instead of
	TYPE_FLAG_NOTTEXT.
	* c-valprint.c (c_val_print): Remove TYPE_VECTOR check.
gdb/testsuite:
	* gdb.base/gnu_vector.c: Add variable c4.
	* gdb.base/gnu_vector.exp: Add tests for character vector printing.
	* gdb.arch/altivec-abi.exp: Fix expect pattern of character vectors.
This commit is contained in:
Ken Werner
2010-10-06 08:44:15 +00:00
parent 9ae92b05cc
commit 2844d6b5a2
8 changed files with 45 additions and 23 deletions

View File

@@ -942,7 +942,7 @@ make_vector_type (struct type *array_type)
elt_type = TYPE_TARGET_TYPE (inner_array);
if (TYPE_CODE (elt_type) == TYPE_CODE_INT)
{
flags = TYPE_INSTANCE_FLAGS (elt_type) | TYPE_FLAG_NOTTEXT;
flags = TYPE_INSTANCE_FLAGS (elt_type) | TYPE_INSTANCE_FLAG_NOTTEXT;
elt_type = make_qualified_type (elt_type, flags, NULL);
TYPE_TARGET_TYPE (inner_array) = elt_type;
}
@@ -1801,8 +1801,6 @@ init_type (enum type_code code, int length, int flags,
TYPE_VECTOR (type) = 1;
if (flags & TYPE_FLAG_STUB_SUPPORTED)
TYPE_STUB_SUPPORTED (type) = 1;
if (flags & TYPE_FLAG_NOTTEXT)
TYPE_NOTTEXT (type) = 1;
if (flags & TYPE_FLAG_FIXED_INSTANCE)
TYPE_FIXED_INSTANCE (type) = 1;
@@ -3490,8 +3488,10 @@ gdbtypes_post_init (struct gdbarch *gdbarch)
= arch_integer_type (gdbarch, 128, 0, "int128_t");
builtin_type->builtin_uint128
= arch_integer_type (gdbarch, 128, 1, "uint128_t");
TYPE_NOTTEXT (builtin_type->builtin_int8) = 1;
TYPE_NOTTEXT (builtin_type->builtin_uint8) = 1;
TYPE_INSTANCE_FLAGS (builtin_type->builtin_int8) |=
TYPE_INSTANCE_FLAG_NOTTEXT;
TYPE_INSTANCE_FLAGS (builtin_type->builtin_uint8) |=
TYPE_INSTANCE_FLAG_NOTTEXT;
/* Wide character types. */
builtin_type->builtin_char16