From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20357 invoked by alias); 17 Apr 2009 13:27:45 -0000 Received: (qmail 20349 invoked by uid 22791); 17 Apr 2009 13:27:44 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Apr 2009 13:27:36 +0000 Received: (qmail 13160 invoked from network); 17 Apr 2009 13:27:34 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 17 Apr 2009 13:27:34 -0000 From: Pedro Alves To: Daniel Jacobowitz Subject: Re: [commit] Fix compilation warning in procfs.c on mips-irix Date: Fri, 17 Apr 2009 13:27:00 -0000 User-Agent: KMail/1.9.10 Cc: Joel Brobecker , gdb-patches@sourceware.org References: <20090416173025.GO7557@adacore.com> <20090416184539.GI7585@adacore.com> <20090416195153.GA19478@caradoc.them.org> In-Reply-To: <20090416195153.GA19478@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904171427.45825.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-04/txt/msg00429.txt.bz2 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