From: Richard Earnshaw <rearnsha@arm.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: Mon, 22 Apr 2002 03:36:00 -0000 [thread overview]
Message-ID: <200204221035.LAA03470@cam-mail2.cambridge.arm.com> (raw)
In-Reply-To: Your message of "Fri, 19 Apr 2002 11:28:58 PDT." <3CC061EA.7118C72B@redhat.com>
> >
> > 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.
(Well, dwarf2 debug info should be able to tell you (if you've turned the
level up enough to add that detail :-)
However, The main problem I have with the above, is that ..._RAW_SIZE and
.._VIRTUAL_SIZE should be in different enums.
Just because C doesn't apply a strict typing model to enums (sadly), is no
reason to abuse these. A variable holding a RAW_SIZE value shouldn't also
be holding a VIRTUAL_SIZE, the two are different and hence the enums
describing them should be also.
R.
next prev parent reply other threads:[~2002-04-22 10:36 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
2002-04-19 16:42 ` Michael Snyder
2002-04-22 3:36 ` Richard Earnshaw [this message]
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=200204221035.LAA03470@cam-mail2.cambridge.arm.com \
--to=rearnsha@arm.com \
--cc=Richard.Earnshaw@arm.com \
--cc=cagney@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=msnyder@cygnus.com \
--cc=msnyder@redhat.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