From: Andrew Cagney <ac131313@cygnus.com>
To: Michael Snyder <msnyder@redhat.com>
Cc: Greg McGary <gkm@kayak.mcgary.org>, gdb-patches@sources.redhat.com
Subject: Re: PATCH: new "void" memory region attribute
Date: Wed, 13 Feb 2002 20:10:00 -0000 [thread overview]
Message-ID: <3C6B3890.1040708@cygnus.com> (raw)
In-Reply-To: <3C6B2D1B.5E551319@redhat.com>
> Andrew Cagney wrote:
>
>>
>
>> > enum mem_access_mode
>> > {
>> > - MEM_RW, /* read/write */
>> > - MEM_RO, /* read only */
>> > - MEM_WO /* write only */
>> > + MEM_VOID = 0,
>> > + MEM_READ = 1,
>> > + MEM_WRITE = 2,
>> > + MEM_RW = MEM_READ | MEM_WRITE,
>> > };
>> >
>
>>
>> Greg, I'm just wondering why this part change? Wouldn't just adding a
>> MEM_VOID entry have been easier?
>
>
> No, it's because (attr != MEM_RO) is no longer a sufficient test
> to see if a section is writeable. There are now two modes that are
> not writeable -- MEM_RO and MEM_VOID. He could have made the tests
> more complex, he simply chose to do it this way instead.
Ah, ok. I see why I'm confused. The command set is an enumeration:
void ro ro rw
but the internal representation is now:
r, w
Greg, might as well go the whole hog, make it a set: rwx (don't wan't a
programmer trying to jump into a device :-)
Otherwize ok.
Andrew
next prev parent reply other threads:[~2002-02-14 4:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-13 16:25 Greg McGary
2002-02-13 17:42 ` Michael Snyder
2002-02-13 18:06 ` Greg McGary
2002-02-13 19:23 ` Andrew Cagney
2002-02-13 19:29 ` Michael Snyder
2002-02-13 20:10 ` Andrew Cagney [this message]
2002-02-14 2:24 ` Eli Zaretskii
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=3C6B3890.1040708@cygnus.com \
--to=ac131313@cygnus.com \
--cc=gdb-patches@sources.redhat.com \
--cc=gkm@kayak.mcgary.org \
--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