? testsuite/gdb.base/sizeof Index: ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.11335 diff -u -r1.11335 ChangeLog --- ChangeLog 8 Feb 2010 18:27:53 -0000 1.11335 +++ ChangeLog 8 Feb 2010 23:02:36 -0000 @@ -1,4 +1,12 @@ -Mon Feb 8 13:17:10 2010 Chris Moller +2010-02-08 Chris Moller + + PR gdb/9164 + * c-exp.y (SIZEOF '(' type ')'): Replaced builtin_int with + builtin_unsigned_int to have gdb "sizeof" return "unsigned int." + (This seems to be consistent the C/C++ standard of returning + size_t from sizeof, where size_t is synonymous with "unsigned int.") + +2010-02-08 Chris Moller PR gdb/10728 * valarith.c (value_ptrdiff): Added a test for a zero type length, Index: c-exp.y =================================================================== RCS file: /cvs/src/src/gdb/c-exp.y,v retrieving revision 1.69 diff -u -r1.69 c-exp.y --- c-exp.y 18 Jan 2010 20:54:33 -0000 1.69 +++ c-exp.y 8 Feb 2010 23:02:38 -0000 @@ -586,7 +586,7 @@ exp : SIZEOF '(' type ')' %prec UNARY { write_exp_elt_opcode (OP_LONG); - write_exp_elt_type (parse_type->builtin_int); + write_exp_elt_type (parse_type->builtin_unsigned_int); CHECK_TYPEDEF ($3); write_exp_elt_longcst ((LONGEST) TYPE_LENGTH ($3)); write_exp_elt_opcode (OP_LONG); } Index: testsuite/ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/testsuite/ChangeLog,v retrieving revision 1.2126 diff -u -r1.2126 ChangeLog --- testsuite/ChangeLog 8 Feb 2010 18:27:53 -0000 1.2126 +++ testsuite/ChangeLog 8 Feb 2010 23:02:54 -0000 @@ -1,4 +1,10 @@ -Mon Feb 8 13:18:22 2010 Chris Moller +2010-02-08 Chris Moller + + PR gdb/9164 + * gdb.base/pr9164.exp: New file. + * gdb.base/Makefile.in (EXECUTABLES): Add pr9164. + +2010-02-08 Chris Moller PR gdb/10728 * gdb.cp/pr10728-x.h: New file. @@ -6,8 +12,7 @@ * gdb.cp/pr10728-y.cc: New file. * gdb.cp/pr10728.exp: New file. * gdb.cp/Makefile.in (EXECUTABLES): Add pr10728 - -Mon Feb 8 12:54:54 2010 Chris Moller +2010-02-08 Chris Moller PR gdb/9067 * gdb.cp/pr9067.exp: New Index: testsuite/gdb.base/Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/Makefile.in,v retrieving revision 1.5 diff -u -r1.5 Makefile.in --- testsuite/gdb.base/Makefile.in 15 Sep 2009 03:30:08 -0000 1.5 +++ testsuite/gdb.base/Makefile.in 8 Feb 2010 23:02:55 -0000 @@ -12,7 +12,8 @@ scope section_command setshow setvar shmain sigall signals \ solib solib_sl so-impl-ld so-indr-cl \ step-line step-test structs structs2 \ - twice-tmp varargs vforked-prog watchpoint whatis catch-syscall + twice-tmp varargs vforked-prog watchpoint whatis catch-syscall \ + pr9164 MISCELLANEOUS = coremmap.data ../foobar.baz \ shr1.sl shr2.sl solib_sl.sl solib1.sl solib2.sl Index: testsuite/gdb.base/pr9164.exp =================================================================== RCS file: testsuite/gdb.base/pr9164.exp diff -N testsuite/gdb.base/pr9164.exp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ testsuite/gdb.base/pr9164.exp 8 Feb 2010 23:02:55 -0000 @@ -0,0 +1,34 @@ +# This testcase is part of GDB, the GNU debugger. + +# Copyright 2010 +# Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +if $tracelevel { + strace $tracelevel +} + +set prms_id 0 +set bug_id 0 + +gdb_exit +gdb_start + +gdb_test "p -4u" ".*4294967292.*" +gdb_test "p -sizeof(int)" ".*4294967292.*" + +gdb_exit +return 0 +