From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28456 invoked by alias); 22 Apr 2002 22:47:47 -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 28449 invoked from network); 22 Apr 2002 22:47:45 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 22 Apr 2002 22:47:45 -0000 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id PAA05031; Mon, 22 Apr 2002 15:45:20 -0700 (PDT) Message-ID: <3CC48FB5.DE3C66FC@redhat.com> Date: Mon, 22 Apr 2002 15:47:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: Richard.Earnshaw@arm.com CC: Michael Snyder , gdb-patches@sources.redhat.com, cagney@redhat.com, rearnsha@arm.com Subject: Re: [RFA] Arm: change #defines to enums References: <200204221035.LAA03470@cam-mail2.cambridge.arm.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00811.txt.bz2 Richard Earnshaw wrote: > > > > > > > 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. OK then -- I've committed only the regnums. Michael