The __attribute__((vector_size)) type output is sometimes wrong. On Fedora 16 with a recent gdb: (gdb) ptype $_siginfo type = struct { int si_signo; int si_errno; int si_code; union { int _pad__attribute__ ((vector_size(28))); There should be a space after "_pad".
CVSROOT: /cvs/src Module name: src Changes by: aburgess@sourceware.org 2012-10-31 09:26:22 Modified files: gdb : ChangeLog c-typeprint.c gdb/testsuite : ChangeLog gdb/testsuite/gdb.base: gnu_vector.c gnu_vector.exp Log message: 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. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.14765&r2=1.14766 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/c-typeprint.c.diff?cvsroot=src&r1=1.81&r2=1.82 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3431&r2=1.3432 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/gnu_vector.c.diff?cvsroot=src&r1=1.5&r2=1.6 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/gnu_vector.exp.diff?cvsroot=src&r1=1.9&r2=1.10
Fixed by recent commit.