From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23405 invoked by alias); 19 Apr 2002 20:35:59 -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 23330 invoked from network); 19 Apr 2002 20:35:57 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 19 Apr 2002 20:35:57 -0000 Received: from localhost.redhat.com (remus.sfbay.redhat.com [172.16.27.252]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id NAA12868; Fri, 19 Apr 2002 13:35:42 -0700 (PDT) Received: by localhost.redhat.com (Postfix, from userid 469) id BFA5411438; Fri, 19 Apr 2002 16:35:19 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15552.32647.630869.112512@localhost.redhat.com> Date: Fri, 19 Apr 2002 13:35:00 -0000 To: Michael Snyder Cc: Richard.Earnshaw@arm.com, Michael Snyder , gdb-patches@sources.redhat.com, cagney@redhat.com, rearnsha@arm.com Subject: Re: [RFA] Arm: change #defines to enums In-Reply-To: <3CC061EA.7118C72B@redhat.com> References: <200204191022.LAA17555@cam-mail2.cambridge.arm.com> <3CC061EA.7118C72B@redhat.com> X-SW-Source: 2002-04/txt/msg00635.txt.bz2 Michael Snyder writes: > 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. Actually, would it be better to put the regnums inside the tdep structure, like sh and powerpc do? That has really helped a lot when adding a variant that has different registers. Elena > > 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