diff options
author | aburgess <aburgess> | 2012-10-31 09:26:18 +0000 |
---|---|---|
committer | aburgess <aburgess> | 2012-10-31 09:26:18 +0000 |
commit | e281722af34b2af1d618a76b424380647d87acb2 (patch) | |
tree | 124084e37134e3b251980eb7e4e78d22a49b8784 /gdb/c-typeprint.c | |
parent | e40e26d3d76034c65bdfddbce8e3403a1d596b43 (diff) | |
download | gdb-e281722af34b2af1d618a76b424380647d87acb2.tar.gz |
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/c-typeprint.c')
-rw-r--r-- | gdb/c-typeprint.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c index 8b5bc2170ac..a43dfce707a 100644 --- a/gdb/c-typeprint.c +++ b/gdb/c-typeprint.c @@ -67,7 +67,8 @@ c_print_type (struct type *type, || ((show > 0 || TYPE_NAME (type) == 0) && (code == TYPE_CODE_PTR || code == TYPE_CODE_FUNC || code == TYPE_CODE_METHOD - || code == TYPE_CODE_ARRAY + || (code == TYPE_CODE_ARRAY + && !TYPE_VECTOR (type)) || code == TYPE_CODE_MEMBERPTR || code == TYPE_CODE_METHODPTR || code == TYPE_CODE_REF))) @@ -619,7 +620,7 @@ c_type_print_varspec_suffix (struct type *type, fprintf_filtered (stream, ")"); fprintf_filtered (stream, (is_vector ? - "__attribute__ ((vector_size(" : "[")); + " __attribute__ ((vector_size(" : "[")); if (get_array_bounds (type, &low_bound, &high_bound)) fprintf_filtered (stream, "%s", plongest (high_bound - low_bound + 1)); |