diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index ecec2291fc..f27dd22030 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2011-02-16 Ken Werner + + * gdb.opencl/datatypes.exp: Allow "false" when printing the content of + a bool variable. Expect correct OpenCL names for vector types. Use the + uc3 variable name instead of referring to the uchar3 built-in type. + Escape the asterisk at the half pointer test. + 2011-02-16 Pedro Alves * collection.c (globalarr2): New global. diff --git a/gdb/testsuite/gdb.opencl/datatypes.exp b/gdb/testsuite/gdb.opencl/datatypes.exp index 0de92708cb..970c00bde2 100644 --- a/gdb/testsuite/gdb.opencl/datatypes.exp +++ b/gdb/testsuite/gdb.opencl/datatypes.exp @@ -230,177 +230,177 @@ set have_cl_khr_fp16 [get_integer_valueof "have_cl_khr_fp16" 0] # Check OpenCL data types (DWARF) gdb_test "whatis b" "type = bool" gdb_test "p sizeof(b)" " = 1" -gdb_test "print b" " = 0" +gdb_test "print b" " = (false|0)" gdb_test "whatis c" "type = char" gdb_test "p sizeof(c)" " = 1" gdb_test "print/d c" " = 1" -gdb_test "whatis c2" "type = char \\\[2\\\]" +gdb_test "whatis c2" "type = char(2| \\\[2\\\])" gdb_test "p sizeof(c2)" " = 2" gdb_test "print c2" " = \\{1, 2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis c3" "type = char \\\[3\\\]" + gdb_test "whatis c3" "type = char(3| \\\[3\\\])" gdb_test "p sizeof(c3)" " = 4" gdb_test "print c3" " = \\{1, 2, 3\\}" } -gdb_test "whatis c4" "type = char \\\[4\\\]" +gdb_test "whatis c4" "type = char(4| \\\[4\\\])" gdb_test "p sizeof(c4)" " = 4" gdb_test "print c4" " = \\{1, 2, 3, 4\\}" -gdb_test "whatis c8" "type = char \\\[8\\\]" +gdb_test "whatis c8" "type = char(8| \\\[8\\\])" gdb_test "p sizeof(c8)" " = 8" gdb_test "print c8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}" -gdb_test "whatis c16" "type = char \\\[16\\\]" +gdb_test "whatis c16" "type = char(16| \\\[16\\\])" gdb_test "p sizeof(c16)" " = 16" gdb_test "print c16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}" gdb_test "whatis uc" "type = (uchar|unsigned char)" gdb_test "p sizeof(uc)" " = 1" gdb_test "print/d uc" " = 1" -gdb_test "whatis uc2" "type = (uchar|unsigned char) \\\[2\\\]" +gdb_test "whatis uc2" "type = (uchar2|(uchar|unsigned char) \\\[2\\\])" gdb_test "p sizeof(uc2)" " = 2" gdb_test "print uc2" " = \\{1, 2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis uc3" "type = (uchar|unsigned char) \\\[3\\\]" - gdb_test "p sizeof(uchar3)" " = 4" + gdb_test "whatis uc3" "type = (uchar3|(uchar|unsigned char) \\\[3\\\])" + gdb_test "p sizeof(uc3)" " = 4" gdb_test "print uc3" " = \\{1, 2, 3\\}" } -gdb_test "whatis uc4" "type = (uchar|unsigned char) \\\[4\\\]" +gdb_test "whatis uc4" "type = (uchar4|(uchar|unsigned char) \\\[4\\\])" gdb_test "p sizeof(uc4)" " = 4" gdb_test "print uc4" " = \\{1, 2, 3, 4\\}" -gdb_test "whatis uc8" "type = (uchar|unsigned char) \\\[8\\\]" +gdb_test "whatis uc8" "type = (uchar8|(uchar|unsigned char) \\\[8\\\])" gdb_test "p sizeof(uc8)" " = 8" gdb_test "print uc8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}" -gdb_test "whatis uc16" "type = (uchar|unsigned char) \\\[16\\\]" +gdb_test "whatis uc16" "type = (uchar16|(uchar|unsigned char) \\\[16\\\])" gdb_test "p sizeof(uc16)" " = 16" gdb_test "print uc16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}" gdb_test "whatis s" "type = short" gdb_test "p sizeof(s)" " = 2" gdb_test "print s" " = -1" -gdb_test "whatis s2" "type = short \\\[2\\\]" +gdb_test "whatis s2" "type = short(2| \\\[2\\\])" gdb_test "p sizeof(s2)" " = 4" gdb_test "print s2" " = \\{-1, -2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis s3" "type = short \\\[3\\\]" + gdb_test "whatis s3" "type = short(3| \\\[3\\\])" gdb_test "p sizeof(s3)" " = 8" gdb_test "print s3" " = \\{-1, -2, -3\\}" } -gdb_test "whatis s4" "type = short \\\[4\\\]" +gdb_test "whatis s4" "type = short(4| \\\[4\\\])" gdb_test "p sizeof(s4)" " = 8" gdb_test "print s4" " = \\{-1, -2, -3, -4\\}" -gdb_test "whatis s8" "type = short \\\[8\\\]" +gdb_test "whatis s8" "type = short(8| \\\[8\\\])" gdb_test "p sizeof(s8)" " = 16" gdb_test "print s8" " = \\{-1, -2, -3, -4, -5, -6, -7, -8\\}" -gdb_test "whatis s16" "type = short \\\[16\\\]" +gdb_test "whatis s16" "type = short(16| \\\[16\\\])" gdb_test "p sizeof(s16)" " = 32" gdb_test "print s16" " = \\{-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16\\}" gdb_test "whatis us" "type = (ushort|unsigned short)" gdb_test "p sizeof(us)" " = 2" gdb_test "print us" " = 1" -gdb_test "whatis us2" "type = (ushort|unsigned short) \\\[2\\\]" +gdb_test "whatis us2" "type = (ushort2|(ushort|unsigned short) \\\[2\\\])" gdb_test "p sizeof(us2)" " = 4" gdb_test "print us2" " = \\{1, 2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis us3" "type = (ushort|unsigned short) \\\[3\\\]" + gdb_test "whatis us3" "type = (ushort3|(ushort|unsigned short) \\\[3\\\])" gdb_test "p sizeof(us3)" " = 8" gdb_test "print us3" " = \\{1, 2, 3\\}" } -gdb_test "whatis us4" "type = (ushort|unsigned short) \\\[4\\\]" +gdb_test "whatis us4" "type = (ushort4|(ushort|unsigned short) \\\[4\\\])" gdb_test "p sizeof(us4)" " = 8" gdb_test "print us4" " = \\{1, 2, 3, 4\\}" -gdb_test "whatis us8" "type = (ushort|unsigned short) \\\[8\\\]" +gdb_test "whatis us8" "type = (ushort8|(ushort|unsigned short) \\\[8\\\])" gdb_test "p sizeof(us8)" " = 16" gdb_test "print us8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}" -gdb_test "whatis us16" "type = (ushort|unsigned short) \\\[16\\\]" +gdb_test "whatis us16" "type = (ushort16|(ushort|unsigned short) \\\[16\\\])" gdb_test "p sizeof(us16)" " = 32" gdb_test "print us16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}" gdb_test "whatis i" "type = int" gdb_test "p sizeof(i)" " = 4" gdb_test "print i" " = -1" -gdb_test "whatis i2" "type = int \\\[2\\\]" +gdb_test "whatis i2" "type = int(2| \\\[2\\\])" gdb_test "p sizeof(i2)" " = 8" gdb_test "print i2" " = \\{-1, -2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis i3" "type = int \\\[3\\\]" + gdb_test "whatis i3" "type = int(3| \\\[3\\\])" gdb_test "p sizeof(i3)" " = 16" gdb_test "print i3" " = \\{-1, -2, -3\\}" } -gdb_test "whatis i4" "type = int \\\[4\\\]" +gdb_test "whatis i4" "type = int(4| \\\[4\\\])" gdb_test "p sizeof(i4)" " = 16" gdb_test "print i4" " = \\{-1, -2, -3, -4\\}" -gdb_test "whatis i8" "type = int \\\[8\\\]" +gdb_test "whatis i8" "type = int(8| \\\[8\\\])" gdb_test "p sizeof(i8)" " = 32" gdb_test "print i8" " = \\{-1, -2, -3, -4, -5, -6, -7, -8\\}" -gdb_test "whatis i16" "type = int \\\[16\\\]" +gdb_test "whatis i16" "type = int(16| \\\[16\\\])" gdb_test "p sizeof(i16)" " = 64" gdb_test "print i16" " = \\{-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16\\}" gdb_test "whatis ui" "type = (uint|unsigned int)" gdb_test "p sizeof(ui)" " = 4" gdb_test "print ui" " = 1" -gdb_test "whatis ui2" "type = (uint|unsigned int) \\\[2\\\]" +gdb_test "whatis ui2" "type = (uint2|(uint|unsigned int) \\\[2\\\])" gdb_test "p sizeof(ui2)" " = 8" gdb_test "print ui2" " = \\{1, 2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis ui3" "type = (uint|unsigned int) \\\[3\\\]" + gdb_test "whatis ui3" "type = (uint3|(uint|unsigned int) \\\[3\\\])" gdb_test "p sizeof(ui3)" " = 16" gdb_test "print ui3" " = \\{1, 2, 3\\}" } -gdb_test "whatis ui4" "type = (uint|unsigned int) \\\[4\\\]" +gdb_test "whatis ui4" "type = (uint4|(uint|unsigned int) \\\[4\\\])" gdb_test "p sizeof(ui4)" " = 16" gdb_test "print ui4" " = \\{1, 2, 3, 4\\}" -gdb_test "whatis ui8" "type = (uint|unsigned int) \\\[8\\\]" +gdb_test "whatis ui8" "type = (uint8|(uint|unsigned int) \\\[8\\\])" gdb_test "p sizeof(ui8)" " = 32" gdb_test "print ui8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}" -gdb_test "whatis ui16" "type = (uint|unsigned int) \\\[16\\\]" +gdb_test "whatis ui16" "type = (uint16|(uint|unsigned int) \\\[16\\\])" gdb_test "p sizeof(ui16)" " = 64" gdb_test "print ui16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}" gdb_test "whatis l" "type = long" gdb_test "p sizeof(l)" " = 8" gdb_test "print l" " = -1" -gdb_test "whatis l2" "type = long \\\[2\\\]" +gdb_test "whatis l2" "type = long(2| \\\[2\\\])" gdb_test "p sizeof(l2)" " = 16" gdb_test "print l2" " = \\{-1, -2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis l3" "type = long \\\[3\\\]" + gdb_test "whatis l3" "type = long(3| \\\[3\\\])" gdb_test "p sizeof(l3)" " = 32" gdb_test "print l3" " = \\{-1, -2, -3\\}" } -gdb_test "whatis l4" "type = long \\\[4\\\]" +gdb_test "whatis l4" "type = long(4| \\\[4\\\])" gdb_test "p sizeof(l4)" " = 32" gdb_test "print l4" " = \\{-1, -2, -3, -4\\}" -gdb_test "whatis l8" "type = long \\\[8\\\]" +gdb_test "whatis l8" "type = long(8| \\\[8\\\])" gdb_test "p sizeof(l8)" " = 64" gdb_test "print l8" " = \\{-1, -2, -3, -4, -5, -6, -7, -8\\}" -gdb_test "whatis l16" "type = long \\\[16\\\]" +gdb_test "whatis l16" "type = long(16| \\\[16\\\])" gdb_test "p sizeof(l16)" " = 128" gdb_test "print l16" " = \\{-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16\\}" gdb_test "whatis ul" "type = (ulong|unsigned long)" gdb_test "p sizeof(ul)" " = 8" gdb_test "print ul" " = 1" -gdb_test "whatis ul2" "type = (ulong|unsigned long) \\\[2\\\]" +gdb_test "whatis ul2" "type = (ulong2|(ulong|unsigned long) \\\[2\\\])" gdb_test "p sizeof(ul2)" " = 16" gdb_test "print ul2" " = \\{1, 2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis ul3" "type = (ulong|unsigned long) \\\[3\\\]" + gdb_test "whatis ul3" "type = (ulong3|(ulong|unsigned long) \\\[3\\\])" gdb_test "p sizeof(ul3)" " = 32" gdb_test "print ul3" " = \\{1, 2, 3\\}" } -gdb_test "whatis ul4" "type = (ulong|unsigned long) \\\[4\\\]" +gdb_test "whatis ul4" "type = (ulong4|(ulong|unsigned long) \\\[4\\\])" gdb_test "p sizeof(ul4)" " = 32" gdb_test "print ul4" " = \\{1, 2, 3, 4\\}" -gdb_test "whatis ul8" "type = (ulong|unsigned long) \\\[8\\\]" +gdb_test "whatis ul8" "type = (ulong8|(ulong|unsigned long) \\\[8\\\])" gdb_test "p sizeof(ul8)" " = 64" gdb_test "print ul8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}" -gdb_test "whatis ul16" "type = (ulong|unsigned long) \\\[16\\\]" +gdb_test "whatis ul16" "type = (ulong16|(ulong|unsigned long) \\\[16\\\])" gdb_test "p sizeof(ul16)" " = 128" gdb_test "print ul16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}" -gdb_test "whatis ph" "type = half *" +gdb_test "whatis ph" "type = half \\*" gdb_test "whatis *ph" "type = half" gdb_test "p sizeof(*ph)" " = 2" @@ -408,21 +408,21 @@ if { ${have_cl_khr_fp16} } { gdb_test "whatis h" "type = half" gdb_test "p sizeof(h)" " = 2" gdb_test "print h" " = 1" - gdb_test "whatis h2" "type = half \\\[2\\\]" + gdb_test "whatis h2" "type = half(2| \\\[2\\\])" gdb_test "p sizeof(h2)" " = 4" gdb_test "print h2" " = \\{1, 2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis h3" "type = half \\\[3\\\]" + gdb_test "whatis h3" "type = half(3| \\\[3\\\])" gdb_test "p sizeof(h3)" " = 8" gdb_test "print h3" " = \\{1, 2, 3\\}" } - gdb_test "whatis h4" "type = half \\\[4\\\]" + gdb_test "whatis h4" "type = half(4| \\\[4\\\])" gdb_test "p sizeof(h4)" " = 8" gdb_test "print h4" " = \\{1, 2, 3, 4\\}" - gdb_test "whatis h8" "type = half \\\[8\\\]" + gdb_test "whatis h8" "type = half(8| \\\[8\\\])" gdb_test "p sizeof(h8)" " = 16" gdb_test "print h8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}" - gdb_test "whatis h16" "type = half \\\[16\\\]" + gdb_test "whatis h16" "type = half(16| \\\[16\\\])" gdb_test "p sizeof(h16)" " = 16" gdb_test "print h16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}" } @@ -430,21 +430,21 @@ if { ${have_cl_khr_fp16} } { gdb_test "whatis f" "type = float" gdb_test "p sizeof(f)" " = 4" gdb_test "print f" " = 1" -gdb_test "whatis f2" "type = float \\\[2\\\]" +gdb_test "whatis f2" "type = float(2| \\\[2\\\])" gdb_test "p sizeof(f2)" " = 8" gdb_test "print f2" " = \\{1, 2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis f3" "type = float \\\[3\\\]" + gdb_test "whatis f3" "type = float(3| \\\[3\\\])" gdb_test "p sizeof(f3)" " = 16" gdb_test "print f3" " = \\{1, 2, 3\\}" } -gdb_test "whatis f4" "type = float \\\[4\\\]" +gdb_test "whatis f4" "type = float(4| \\\[4\\\])" gdb_test "p sizeof(f4)" " = 16" gdb_test "print f4" " = \\{1, 2, 3, 4\\}" -gdb_test "whatis f8" "type = float \\\[8\\\]" +gdb_test "whatis f8" "type = float(8| \\\[8\\\])" gdb_test "p sizeof(f8)" " = 32" gdb_test "print f8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}" -gdb_test "whatis f16" "type = float \\\[16\\\]" +gdb_test "whatis f16" "type = float(16| \\\[16\\\])" gdb_test "p sizeof(f16)" " = 64" gdb_test "print f16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}" @@ -452,21 +452,21 @@ if { ${have_cl_khr_fp64} } { gdb_test "whatis d" "type = double" gdb_test "p sizeof(d)" " = 8" gdb_test "print d" " = 1" - gdb_test "whatis d2" "type = double \\\[2\\\]" + gdb_test "whatis d2" "type = double(2| \\\[2\\\])" gdb_test "p sizeof(d2)" " = 16" gdb_test "print d2" " = \\{1, 2\\}" if { ${opencl_version} >= 110 } { - gdb_test "whatis d3" "type = double \\\[3\\\]" + gdb_test "whatis d3" "type = double(3| \\\[3\\\])" gdb_test "p sizeof(d3)" " = 32" gdb_test "print d3" " = \\{1, 2, 3\\}" } - gdb_test "whatis d4" "type = double \\\[4\\\]" + gdb_test "whatis d4" "type = double(4| \\\[4\\\])" gdb_test "p sizeof(d4)" " = 32" gdb_test "print d4" " = \\{1, 2, 3, 4\\}" - gdb_test "whatis d8" "type = double \\\[8\\\]" + gdb_test "whatis d8" "type = double(8| \\\[8\\\])" gdb_test "p sizeof(d8)" " = 64" gdb_test "print d8" " = \\{1, 2, 3, 4, 5, 6, 7, 8\\}" - gdb_test "whatis d16" "type = double \\\[16\\\]" + gdb_test "whatis d16" "type = double(16| \\\[16\\\])" gdb_test "p sizeof(d16)" " = 128" gdb_test "print d16" " = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16\\}" }