This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: new "void" memory region attribute


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]