diff options
author | Andrew Burgess <aburgess@broadcom.com> | 2012-10-31 09:26:22 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@broadcom.com> | 2012-10-31 09:26:22 +0000 |
commit | 2f27adfe297378d226b6578ff18993c0c1e41fba (patch) | |
tree | bbae337d248dc221d58e456dd4f665ea31b278cf /gdb/testsuite/gdb.base/gnu_vector.exp | |
parent | 65f4dd4721a30c7c17f5164b1c0486f9e2cd1755 (diff) | |
download | gdb-2f27adfe297378d226b6578ff18993c0c1e41fba.zip gdb-2f27adfe297378d226b6578ff18993c0c1e41fba.tar.gz gdb-2f27adfe297378d226b6578ff18993c0c1e41fba.tar.bz2 |
http://sourceware.org/ml/gdb-patches/2012-10/msg00525.html
gdb/ChangeLog
PR cli/14772
* c-typeprint.c (c_print_type): Don't print a space for vector
types, this is handled within the suffix.
(c_type_print_varspec_suffix): Add a space to vector suffix
gdb/testsuite/ChangeLog
PR cli/14772
* gdb.base/gnu_vector.c (union_with_vector_1)
(struct_with_vector_1): Add new struct and union for testing
ptype.
* gdb.base/gnu_vector.exp: Add testing of ptype on vectors, and
structs / unions containing vectors.
Diffstat (limited to 'gdb/testsuite/gdb.base/gnu_vector.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/gnu_vector.exp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/gnu_vector.exp b/gdb/testsuite/gdb.base/gnu_vector.exp index a1443a55..baba119 100644 --- a/gdb/testsuite/gdb.base/gnu_vector.exp +++ b/gdb/testsuite/gdb.base/gnu_vector.exp @@ -130,3 +130,13 @@ gdb_test "print i2 + i4a" "Cannot perform operation on vectors with different ty gdb_test "print f4a + f2" "Cannot perform operation on vectors with different types" gdb_test "print f2 + f4a" "Cannot perform operation on vectors with different types" +# Test ptype on vector types. +gdb_test "ptype c4" "type = char __attribute__ \\(\\(vector_size\\(4\\)\\)\\)" +gdb_test "ptype char4" "type = char __attribute__ \\(\\(vector_size\\(4\\)\\)\\)" +gdb_test "ptype i4a" "type = int __attribute__ \\(\\(vector_size\\(4\\)\\)\\)" +gdb_test "ptype int4" "type = int __attribute__ \\(\\(vector_size\\(4\\)\\)\\)" +gdb_test "ptype f4b" "type = float __attribute__ \\(\\(vector_size\\(4\\)\\)\\)" +gdb_test "ptype float4" "type = float __attribute__ \\(\\(vector_size\\(4\\)\\)\\)" + +gdb_test "ptype union_with_vector_1" "type = union {\r\n\[\t \]+int i;\r\n\[\t \]+char cv __attribute__ \\(\\(vector_size\\(4\\)\\)\\);\r\n}" +gdb_test "ptype struct_with_vector_1" "type = struct {\r\n\[\t \]+int i;\r\n\[\t \]+char cv __attribute__ \\(\\(vector_size\\(4\\)\\)\\);\r\n\[\t \]+float4 f4;\r\n}" |