From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24293 invoked by alias); 1 Aug 2012 13:56:43 -0000 Received: (qmail 24256 invoked by uid 22791); 1 Aug 2012 13:56:40 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,FROM_12LTRDOM,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; Wed, 01 Aug 2012 13:56:05 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1SwZPA-0003KB-DI from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Wed, 01 Aug 2012 06:56:04 -0700 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 1 Aug 2012 06:56:04 -0700 Received: from qiyao.dyndns.org.dyndns.org (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.1.289.1; Wed, 1 Aug 2012 06:56:03 -0700 From: Yao Qi To: Subject: [RFC 0/3] New var_types var_zuinteger_unlimited Date: Wed, 01 Aug 2012 13:56:00 -0000 Message-ID: <1343829334-3151-1-git-send-email-yao@codesourcery.com> In-Reply-To: <7A6A55B4-0293-4AD6-AB1F-B3169F8ADCC1@cs.umd.edu> References: <7A6A55B4-0293-4AD6-AB1F-B3169F8ADCC1@cs.umd.edu> MIME-Version: 1.0 Content-Type: text/plain 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-08/txt/msg00020.txt.bz2 On Friday, July 27, 2012 01:40:06 PM Khoo Yit Phang wrote: > > else if (val >= INT_MAX) > > error (_("integer %u out of range"), val); > > 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). > > 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 listsize > 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. When looking at the issue of 'set listsize -1', I found the following patch and the discussion, [RFC] Clean up var_integer/var_uinteger/var_zinteger mess http://sourceware.org/ml/gdb-patches/2006-01/msg00488.html I don't know why this patch wasn't committed, but this patch looks good to me. I pick up part of it but adding a new var_types 'var_zuinteger_unlimited', because command 'set listsize' requires both 0 and unlimited (-1), which doesn't map to any enum var_types so far. After I examined the usage of command registrations in GDB, I find there are more places (patch 2/3 and 3/3) require both 0 and unlimited, so I decide to add 'var_zuinteger_unlimited'. Comments are appreciated. Regression tested on x86_64-linux for patch 1/3 and 2/3. Rebuild GDB with --enable-targets=all for patch 3/3.