This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Arm: change #defines to enums
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Michael Snyder <msnyder at cygnus dot com>
- Cc: gdb-patches at sources dot redhat dot com, cagney at redhat dot com, rearnsha at arm dot com
- Date: Fri, 19 Apr 2002 11:22:37 +0100
- Subject: Re: [RFA] Arm: change #defines to enums
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> 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).
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.
R.