Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Elena Zannoni <ezannoni@redhat.com>
To: Michael Snyder <msnyder@redhat.com>
Cc: Richard.Earnshaw@arm.com, Michael Snyder <msnyder@cygnus.com>,
	gdb-patches@sources.redhat.com, cagney@redhat.com,
	rearnsha@arm.com
Subject: Re: [RFA] Arm: change #defines to enums
Date: Fri, 19 Apr 2002 13:35:00 -0000	[thread overview]
Message-ID: <15552.32647.630869.112512@localhost.redhat.com> (raw)
In-Reply-To: <3CC061EA.7118C72B@redhat.com>

Michael Snyder writes:
 > Richard Earnshaw wrote:
 > > 
 > > > Is this OK with folks?
 > > >
 > > > 2002-04-18  Michael Snyder  <msnyder@redhat.com>
 > > >
 > > >       * 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


  reply	other threads:[~2002-04-19 20:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-18 15:26 Michael Snyder
2002-04-19  3:23 ` Richard Earnshaw
2002-04-19 11:40   ` Michael Snyder
2002-04-19 13:35     ` Elena Zannoni [this message]
2002-04-19 16:42       ` Michael Snyder
2002-04-22  3:36     ` Richard Earnshaw
2002-04-22 15:47       ` Michael Snyder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15552.32647.630869.112512@localhost.redhat.com \
    --to=ezannoni@redhat.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=cagney@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=msnyder@cygnus.com \
    --cc=msnyder@redhat.com \
    --cc=rearnsha@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox