From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16969 invoked by alias); 5 Mar 2012 08:05:38 -0000 Received: (qmail 16955 invoked by uid 22791); 5 Mar 2012 08:05:35 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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, 05 Mar 2012 08:05:17 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2585GDm027661 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 5 Mar 2012 03:05:16 -0500 Received: from host2.jankratochvil.net (ovpn-116-19.ams2.redhat.com [10.36.116.19]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q2585C81030321 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 5 Mar 2012 03:05:15 -0500 Date: Mon, 05 Mar 2012 08:05:00 -0000 From: Jan Kratochvil To: Siddhesh Poyarekar Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH] Expand bitpos to LONGEST to allow access to large offsets within a struct Message-ID: <20120305080512.GA12311@host2.jankratochvil.net> References: <20120220132724.GB4753@spoyarek.pnq.redhat.com> <87d397syts.fsf@fleche.redhat.com> <20120229135148.GA32128@spoyarek.pnq.redhat.com> <20120301224428.GA30631@host2.jankratochvil.net> <20120305063542.GA30196@spoyarek.pnq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120305063542.GA30196@spoyarek.pnq.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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-03/txt/msg00132.txt.bz2 On Mon, 05 Mar 2012 07:35:43 +0100, Siddhesh Poyarekar wrote: > On Thu, Mar 01, 2012 at 11:44:28PM +0100, Jan Kratochvil wrote: > > warning if there is incorrectly used 'long' instead of LONGEST'. > > I think it should give this warning on ia32, since there is a storage > size mismatch there. That said, I need to test on 32-bit the next time > too. True, good idea. > > > - ((TYPE_UNSIGNED (type) ? ax_zero_ext : ax_ext) (ax, end - start)); > > > + ((TYPE_UNSIGNED (type) ? ax_zero_ext : ax_ext) (ax, (int)(end - start))); > > > > Here I think ax_zero_ext and ax_ext should use LONGEST instead of the cast. > > (OK, one may argue a bit about it.) > > The reason I cast it down to INT is because the eventual call to > generic_ext() requires N to be between 0 and 255. But I guess we might > want to keep the value intact to catch any internal bugs that may > trigger this? Yes, I meant that. > Thanks for your very detailed review. I'll fix up the patch and also > expand type->length. Maybe you can keep that patch as a separate one; but I do not mind much. Thanks, Jan