From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17250 invoked by alias); 14 Feb 2002 04:10:03 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 17113 invoked from network); 14 Feb 2002 04:09:56 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.135.44) by sources.redhat.com with SMTP; 14 Feb 2002 04:09:56 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 794F63CC5; Wed, 13 Feb 2002 23:09:52 -0500 (EST) Message-ID: <3C6B3890.1040708@cygnus.com> Date: Wed, 13 Feb 2002 20:10:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.8) Gecko/20020210 X-Accept-Language: en-us MIME-Version: 1.0 To: Michael Snyder Cc: Greg McGary , gdb-patches@sources.redhat.com Subject: Re: PATCH: new "void" memory region attribute References: <3C6B2DB1.9060304@cygnus.com> <3C6B2D1B.5E551319@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-02/txt/msg00389.txt.bz2 > 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