From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26371 invoked by alias); 29 Jul 2012 14:25:51 -0000 Received: (qmail 26306 invoked by uid 22791); 29 Jul 2012 14:25:50 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 29 Jul 2012 14:25:30 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1SvUQx-0001QT-Uc from Yao_Qi@mentor.com ; Sun, 29 Jul 2012 07:25:27 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Sun, 29 Jul 2012 07:25:27 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.1.289.1; Sun, 29 Jul 2012 07:25:21 -0700 From: Yao Qi To: CC: Khoo Yit Phang Subject: Re: [PATCH] Handle var_uinteger/var_zuinteger and case var_integer/var_zinteger together. Date: Sun, 29 Jul 2012 14:25:00 -0000 Message-ID: <10196574.m2l2JHpJM3@qiyao.dyndns.org> User-Agent: KMail/4.8.3 (Linux/3.3.7-1.fc16.i686; KDE/4.8.3; i686; ; ) In-Reply-To: <7A6A55B4-0293-4AD6-AB1F-B3169F8ADCC1@cs.umd.edu> References: <1342637512-2018-1-git-send-email-yao@codesourcery.com> <7A6A55B4-0293-4AD6-AB1F-B3169F8ADCC1@cs.umd.edu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-IsSubscribed: yes 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: 2012-07/txt/msg00725.txt.bz2 On Friday, July 27, 2012 01:40:06 PM Khoo Yit Phang wrote: > This patch broke "set remote hardware-breakpoint-limit -1" ("integer=20 4294967295 out of range"), which treats -1 as unlimited. The problem is the= =20 following lines: > > case var_integer: > > + case var_zinteger: > > { > > unsigned int val; >=20 > Since val is unsigned, -1 gets casted to UINT_MAX which subsequently fail= s: > > else if (val >=3D INT_MAX) > > error (_("integer %u out of range"), val); >=20 > I tried changing val to LONGEST, but that subsequently broke the "set > listsize -1" test in the testsuite (or at least, it fails one of the test > cases in testsuite/gdb.base/list.exp). >=20 > Actually, it's not clear to me what "set listsize -1" is supposed to do: = in > one place in the testsuite, it's supposed to be unlimited and "set listsi= ze > 0" is supposed to suppress printing, but in another place, "set listsize = 0" > is supposed to be unlimited. But running "set listsize -1", without my > change, also leads to an error ("integer 4294967295 out of range"). The > documentation does not make it clear either. The inconsistency is confusing here. I've started looking at this issue. = We=20 did have a discussion on this problem in 2006. I'll go through the archive= s,=20 and give a reasonable fix to this. --=20 Yao (=E9=BD=90=E5=B0=A7)