From 648cd113ef17e879ef867c1d37567d0c0138dd47 Mon Sep 17 00:00:00 2001 From: Ken Werner Date: Tue, 15 Feb 2011 20:10:13 +0000 Subject: [PATCH] gdb/ChangeLog 2011-02-15 Ken Werner * opencl-lang.c (build_opencl_types): Set the size of the built-in bool data type to a size of one byte. gdb/testsuite/ChangeLog 2011-02-15 Ken Werner * gdb.opencl/datatypes.exp: Expect the size of a bool to be one byte. --- gdb/ChangeLog | 5 +++++ gdb/opencl-lang.c | 2 +- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.opencl/datatypes.exp | 4 ++-- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9a68d8ac96c..b1edb2d0e03 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2011-02-15 Ken Werner + + * opencl-lang.c (build_opencl_types): Set the size of the built-in + bool data type to a size of one byte. + 2011-02-15 Pedro Alves Jan Kratochvil diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c index 169ee6bfa7c..26a84721b66 100644 --- a/gdb/opencl-lang.c +++ b/gdb/opencl-lang.c @@ -1172,7 +1172,7 @@ build_opencl_types (struct gdbarch *gdbarch) = arch_float_type (gdbarch, 64, "double", floatformats_ieee_double); BUILD_OCL_VTYPES (double); builtin_opencl_type->builtin_bool - = arch_boolean_type (gdbarch, 32, 1, "bool"); + = arch_boolean_type (gdbarch, 8, 1, "bool"); builtin_opencl_type->builtin_unsigned_char = arch_integer_type (gdbarch, 8, 1, "unsigned char"); builtin_opencl_type->builtin_unsigned_short diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 7b26a012639..6f915ba49bd 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-02-15 Ken Werner + + * gdb.opencl/datatypes.exp: Expect the size of a bool to be one byte. + 2011-02-15 Yao Qi PR tdep/12352 diff --git a/gdb/testsuite/gdb.opencl/datatypes.exp b/gdb/testsuite/gdb.opencl/datatypes.exp index 8dfcae043e0..0de92708cba 100644 --- a/gdb/testsuite/gdb.opencl/datatypes.exp +++ b/gdb/testsuite/gdb.opencl/datatypes.exp @@ -44,7 +44,7 @@ gdb_test_no_output "set language opencl" "No prompt when setting the language to # Check OpenCL data types (GDB) gdb_test "whatis bool" "type = bool" -gdb_test "p sizeof(bool)" " = 4" +gdb_test "p sizeof(bool)" " = 1" gdb_test "whatis char" "type = char" gdb_test "p sizeof(char)" " = 1" @@ -229,7 +229,7 @@ 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)" " = 4" +gdb_test "p sizeof(b)" " = 1" gdb_test "print b" " = 0" gdb_test "whatis c" "type = char" -- 2.30.2