From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16824 invoked by alias); 22 Apr 2002 10:36:04 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16817 invoked from network); 22 Apr 2002 10:36:02 -0000 Received: from unknown (HELO fw-cam.cambridge.arm.com) (193.131.176.3) by sources.redhat.com with SMTP; 22 Apr 2002 10:36:02 -0000 Received: by fw-cam.cambridge.arm.com; id LAA15451; Mon, 22 Apr 2002 11:35:59 +0100 (BST) Received: from unknown(172.16.1.2) by fw-cam.cambridge.arm.com via smap (V5.5) id xma015028; Mon, 22 Apr 02 11:35:40 +0100 Received: from cam-mail2.cambridge.arm.com (localhost [127.0.0.1]) by cam-admin0.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id LAA04986; Mon, 22 Apr 2002 11:35:39 +0100 (BST) Received: from sun18.cambridge.arm.com (sun18.cambridge.arm.com [172.16.2.18]) by cam-mail2.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id LAA03470; Mon, 22 Apr 2002 11:35:38 +0100 (BST) Message-Id: <200204221035.LAA03470@cam-mail2.cambridge.arm.com> To: Michael Snyder cc: Richard.Earnshaw@arm.com, Michael Snyder , gdb-patches@sources.redhat.com, cagney@redhat.com, rearnsha@arm.com Reply-To: Richard.Earnshaw@arm.com Organization: ARM Ltd. X-Telephone: +44 1223 400569 (direct+voicemail), +44 1223 400400 (switchbd) X-Fax: +44 1223 400410 X-Address: ARM Ltd., 110 Fulbourn Road, Cherry Hinton, Cambridge CB1 9NJ. X-Url: http://www.arm.com/ Subject: Re: [RFA] Arm: change #defines to enums In-reply-to: Your message of "Fri, 19 Apr 2002 11:28:58 PDT." <3CC061EA.7118C72B@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 22 Apr 2002 03:36:00 -0000 From: Richard Earnshaw X-SW-Source: 2002-04/txt/msg00781.txt.bz2 > > > > I also can't really see how > > > > ! enum gdb_arm_const { > > ! INT_REGISTER_RAW_SIZE = 4, > > ! INT_REGISTER_VIRTUAL_SIZE = 4, > > ! > > ... > > > > will make debugging easier, in fact I would say it would be more > > confusing, since gdb won't know which one to use when displaying a value. > > The idea is just that, if I'm debugging and I see > INT_REGISTER_RAW_SIZE in an expression, I can find out > what its value is. (Well, dwarf2 debug info should be able to tell you (if you've turned the level up enough to add that detail :-) However, The main problem I have with the above, is that ..._RAW_SIZE and .._VIRTUAL_SIZE should be in different enums. Just because C doesn't apply a strict typing model to enums (sadly), is no reason to abuse these. A variable holding a RAW_SIZE value shouldn't also be holding a VIRTUAL_SIZE, the two are different and hence the enums describing them should be also. R.