This is the mail archive of the gdb-patches@sourceware.org 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: [commit] Fix compilation warning in procfs.c on mips-irix


On Thursday 16 April 2009 20:51:53, Daniel Jacobowitz wrote:
> On Thu, Apr 16, 2009 at 11:45:39AM -0700, Joel Brobecker wrote:
> > > -  return (*func) ((CORE_ADDR) map->pr_vaddr,
> > > +  return (*func) ((CORE_ADDR) (uintptr_t) map->pr_vaddr,
> > >                   map->pr_size,
> > >                   (map->pr_mflags & MA_READ) != 0,
> > >                   (map->pr_mflags & MA_WRITE) != 0,
> > > 
> > > Isn't this a problem for MIPS, due to pointer sign-extension?
> > 
> > Hmmm, you are probably right. I reverted the patch for now, and will look
> > further into your suggestion a bit later.

Eh, it was a legit question, not a request for reverting!

> Note, if you don't have any code above 0x80000000, it doesn't much
> matter... I don't remember how the MIPS bits ever came to be used, or
> if they were theoretical.  Threaded code on 32-bit MIPS Linux is
> always going to be below KSEG0 at 0x80000000.

Yeah... I assumed that since we had that handling in proc-service.c
that mips-linux could have user code above 0x80000000.  If that's not
the case on irix as well (it seems likely, since those KSEG
things are hardware-decided mappings?), then we don't have to worry
about this here.  In addition, these warning have surely been
there for a long while, it's just that up until recently procfs.c
was always built with -Werror disabled.

-- 
Pedro Alves


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