From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10986 invoked by alias); 9 Feb 2013 07:39:37 -0000 Received: (qmail 10978 invoked by uid 22791); 9 Feb 2013 07:39:36 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_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; Sat, 09 Feb 2013 07:39:28 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r197dRX7014803 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 9 Feb 2013 02:39:27 -0500 Received: from host2.jankratochvil.net (ovpn-116-18.ams2.redhat.com [10.36.116.18]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r197dNSp020789 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sat, 9 Feb 2013 02:39:26 -0500 Date: Sat, 09 Feb 2013 07:39:00 -0000 From: Jan Kratochvil To: Sergio Durigan Junior Cc: GDB Patches Subject: Re: [PATCH] Handle bitfields inside inner structs for internalvars Message-ID: <20130209073923.GA13418@host2.jankratochvil.net> References: <20130208204702.GA22467@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: 2013-02/txt/msg00235.txt.bz2 On Sat, 09 Feb 2013 05:52:32 +0100, Sergio Durigan Junior wrote: > On Friday, February 08 2013, Jan Kratochvil wrote: > >> + if (value_bitsize (toval)) > >> + offset += value_offset (value_parent (toval)); > > > > value_address rather tests for value_parent existence; although value_bitsize > > is right as value_parent is currently not used elsewhere. > > > > if (value_parent (toval)) > > Do you think it's clearer to use `value_parent' here instead of > `value_bitsize'? Choose any way but therefore put there a comment that value_parent is non-NULL iff value_bitsize is non-zero. Otherwise I was curious - what to do if value_parent exists but TOVAL is not a bitfield? Isn't it a forgotten case? (It is not but...) Thanks, Jan