From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1933 invoked by alias); 8 Feb 2010 23:17:55 -0000 Received: (qmail 1921 invoked by uid 22791); 8 Feb 2010 23:17:54 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00,HK_OBFDOM,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 08 Feb 2010 23:17:49 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o18NHlJc008584 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 8 Feb 2010 18:17:47 -0500 Received: from qcore.mollernet.net (vpn-248-21.phx2.redhat.com [10.3.248.21]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o18NHkli027848 for ; Mon, 8 Feb 2010 18:17:47 -0500 Message-ID: <4B709B9A.3050001@redhat.com> Date: Mon, 08 Feb 2010 23:17:00 -0000 From: Chris Moller User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: pr9164 patch Content-Type: multipart/mixed; boundary="------------050801040705060905050903" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-02/txt/msg00238.txt.bz2 This is a multi-part message in MIME format. --------------050801040705060905050903 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 311 I was rooting around in the gdb c++ bug list a bit ago and came across this one: "sizeof should have unsigned type in print expressions." Assuming that, as in C/C++, size_t is typedeffed from unsigned int, the fix is a one-line patch in c-exp.y, attached. If that assumption is wrong, well, never mind... --------------050801040705060905050903 Content-Type: text/plain; name="pr9164.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr9164.patch" Content-length: 4365 ? 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 + --------------050801040705060905050903 Content-Type: text/plain; name="pr9164-check.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr9164-check.diff" Content-length: 3106 --- gdb-virgin.sum 2010-02-08 18:09:17.076039923 -0500 +++ gdb-patched.sum 2010-02-08 17:57:58.351164638 -0500 @@ -1,4 +1,4 @@ -Test Run By moller on Mon Feb 8 17:59:40 2010 +Test Run By moller on Mon Feb 8 17:49:04 2010 Native configuration is i686-pc-linux-gnu === gdb tests === @@ -2696,9 +2696,9 @@ PASS: gdb.base/constvars.exp: ptype crass PASS: gdb.base/constvars.exp: ptype crisp Running ../../../src/gdb/testsuite/gdb.base/corefile.exp ... -PASS: gdb.base/corefile.exp: args: -core=coremaker.core (with bad program name) -PASS: gdb.base/corefile.exp: args: execfile -core=coremaker.core (with bad program name) -PASS: gdb.base/corefile.exp: core-file command (with bad program name) +PASS: gdb.base/corefile.exp: args: -core=coremaker.core +PASS: gdb.base/corefile.exp: args: execfile -core=coremaker.core +PASS: gdb.base/corefile.exp: core-file command PASS: gdb.base/corefile.exp: print coremaker_data PASS: gdb.base/corefile.exp: print coremaker_bss PASS: gdb.base/corefile.exp: print coremaker_ro @@ -5644,8 +5644,11 @@ PASS: gdb.base/pr11022.exp: breakpoint hit 2 PASS: gdb.base/pr11022.exp: set var x = 1 PASS: gdb.base/pr11022.exp: watchpoint hit 2 +Running ../../../src/gdb/testsuite/gdb.base/pr9164.exp ... +PASS: gdb.base/pr9164.exp: p -4u +PASS: gdb.base/pr9164.exp: p -sizeof(int) Running ../../../src/gdb/testsuite/gdb.base/prelink.exp ... -PASS: gdb.base/prelink.exp: prelink +FAIL: gdb.base/prelink.exp: prelink Running ../../../src/gdb/testsuite/gdb.base/printcmds.exp ... PASS: gdb.base/printcmds.exp: print $pc PASS: gdb.base/printcmds.exp: print "abc" @@ -12595,7 +12598,7 @@ PASS: gdb.mi/mi-nsmoribund.exp: resume all, thread specific breakpoint PASS: gdb.mi/mi-nsmoribund.exp: hit thread specific breakpoint PASS: gdb.mi/mi-nsmoribund.exp: thread state: all running except the breakpoint thread -FAIL: gdb.mi/mi-nsmoribund.exp: unexpected stop +PASS: gdb.mi/mi-nsmoribund.exp: resume all, program exited normally Running ../../../src/gdb/testsuite/gdb.mi/mi-nsthrexec.exp ... PASS: gdb.mi/mi-nsthrexec.exp: successfully compiled posix threads test case PASS: gdb.mi/mi-nsthrexec.exp: breakpoint at main @@ -14746,7 +14749,7 @@ PASS: gdb.server/server-mon.exp: monitor set remote-debug 0 Running ../../../src/gdb/testsuite/gdb.server/server-run.exp ... PASS: gdb.server/server-run.exp: loaded dynamic linker -PASS: gdb.server/server-run.exp: continue to main +FAIL: gdb.server/server-run.exp: continue to main Running ../../../src/gdb/testsuite/gdb.stabs/exclfwd.exp ... PASS: gdb.stabs/exclfwd.exp: ptype v1 PASS: gdb.stabs/exclfwd.exp: ptype v2 @@ -15501,7 +15504,7 @@ PASS: gdb.threads/watchthreads.exp: successfully compiled posix threads test case PASS: gdb.threads/watchthreads.exp: watch args[0] PASS: gdb.threads/watchthreads.exp: watch args[1] -PASS: gdb.threads/watchthreads.exp: disable 3 +PASS: gdb.threads/watchthreads.exp: disable 2 PASS: gdb.threads/watchthreads.exp: threaded watch loop PASS: gdb.threads/watchthreads.exp: first watchpoint on args[0] hit PASS: gdb.threads/watchthreads.exp: first watchpoint on args[1] hit --------------050801040705060905050903--