From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5043 invoked by alias); 18 Apr 2012 02:37:09 -0000 Received: (qmail 4415 invoked by uid 22791); 18 Apr 2012 02:37:07 -0000 X-SWARE-Spam-Status: No, hits=-7.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,TW_XF,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; Wed, 18 Apr 2012 02:36:34 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3I2aYtu026536 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 17 Apr 2012 22:36:34 -0400 Received: from spoyarek (vpn-226-139.phx2.redhat.com [10.3.226.139]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3I2aQxO027599; Tue, 17 Apr 2012 22:36:28 -0400 Date: Wed, 18 Apr 2012 02:53:00 -0000 From: Siddhesh Poyarekar To: Jan Kratochvil Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH] Allow 64-bit enum values Message-ID: <20120418080720.240a03c5@spoyarek> In-Reply-To: <20120417135819.GA28916@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> <20120305080512.GA12311@host2.jankratochvil.net> <20120321100630.GA14496@spoyarek.pnq.redhat.com> <20120327165950.GA1734@host2.jankratochvil.net> <20120328095037.254b22ed@spoyarek> <20120330161521.GA19069@host2.jankratochvil.net> <20120417135819.GA28916@host2.jankratochvil.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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-04/txt/msg00534.txt.bz2 On Tue, 17 Apr 2012 15:58:19 +0200, Jan wrote: > According to Tom it should the review should not depend on C++ so: > > I made there these changes, particularly to really test 64-bit enums: > > ### a/gdb/gdbtypes.c > - TYPE_FIELD_ENUMVAL (type, i)); > + TYPE_FIELD_ENUMVAL (type, i)); > ### a/gdb/python/py-type.c > - if (TYPE_CODE(type) == TYPE_CODE_ENUM) > + if (TYPE_CODE (type) == TYPE_CODE_ENUM) > - arg = PyLong_FromLong (TYPE_FIELD_ENUMVAL (type, field)); > + arg = gdb_py_long_from_longest (TYPE_FIELD_ENUMVAL (type, > field)); ### a/gdb/testsuite/gdb.base/enumval.c > -enum e { I, J = 0xffffffffU } e = J; > +enum e { I, J = 0xffffffffU, K = 0xf000000000000000ULL } e = J, f = > K; ### a/gdb/testsuite/gdb.base/enumval.exp > +gdb_test "print f" "= K" > +gdb_test "print K" "= K" > > The patch needs small rebase on HEAD due to other changes and due to: > [commit] Do not rely on FIELD_LOC_KIND_BITPOS being zero > http://sourceware.org/ml/gdb-patches/2012-04/msg00460.html > > and it should be checked in along with: > [patch!] Support 64-bit constants/enums on 32-bit host [Re: > [PATCH] Allow 64-bit enum values] > http://sourceware.org/ml/gdb-patches/2012-04/msg00463.html > > OK to check it in with these changes. > Thanks, I will resubmit the patch with these changes and the rebase, hopefully by today or latest by tomorrow. -- Siddhesh