From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5587 invoked by alias); 14 Feb 2002 03:29:20 -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 5492 invoked from network); 14 Feb 2002 03:29:19 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 14 Feb 2002 03:29:19 -0000 Received: from redhat.com (notinuse.cygnus.com [205.180.231.12]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id TAA23539; Wed, 13 Feb 2002 19:28:43 -0800 (PST) Message-ID: <3C6B2D1B.5E551319@redhat.com> Date: Wed, 13 Feb 2002 19:29:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Andrew Cagney CC: Greg McGary , gdb-patches@sources.redhat.com Subject: Re: PATCH: new "void" memory region attribute References: <3C6B2DB1.9060304@cygnus.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-02/txt/msg00386.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.