From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1352 invoked by alias); 19 Apr 2002 18:40:45 -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 1296 invoked from network); 19 Apr 2002 18:40:41 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 19 Apr 2002 18:40:41 -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 LAA01810; Fri, 19 Apr 2002 11:40:38 -0700 (PDT) Message-ID: <3CC061EA.7118C72B@redhat.com> Date: Fri, 19 Apr 2002 11:40: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: <200204191022.LAA17555@cam-mail2.cambridge.arm.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00630.txt.bz2 Richard Earnshaw wrote: > > > Is this OK with folks? > > > > 2002-04-18 Michael Snyder > > > > * arm-tdep.h: Change defines to enums for ease of debugging. > > I'm happy with the change to the regnums, but not with the other bits. > The other fields are really parts of a bitmask, not separate enums. > > For example, it doesn't make sense to me to have enums that should be > orred together, as in FLAG_N | FLAG_Z. > > I suspect that > > ! enum gdb_condition_flag { > ! FLAG_N = 0x80000000, > ! FLAG_Z = 0x40000000, > ! FLAG_C = 0x20000000, > ! FLAG_V = 0x10000000 > ! }; > > will trip the problem with displaying enums with the top bit set on 32-bit > platforms, so instead of making debugging easier, it will make it > impossible. (There's a PR about it). Hmmm, all right, I'll omit those... > > 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. Michael