Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@redhat.com>
To: Richard.Earnshaw@arm.com
Cc: 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 11:40:00 -0000	[thread overview]
Message-ID: <3CC061EA.7118C72B@redhat.com> (raw)
In-Reply-To: <200204191022.LAA17555@cam-mail2.cambridge.arm.com>

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.
> 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 18:40 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 [this message]
2002-04-19 13:35     ` Elena Zannoni
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=3CC061EA.7118C72B@redhat.com \
    --to=msnyder@redhat.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=cagney@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=msnyder@cygnus.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