From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21368 invoked by alias); 1 Jun 2012 19:59:47 -0000 Received: (qmail 21358 invoked by uid 22791); 1 Jun 2012 19:59:46 -0000 X-SWARE-Spam-Status: No, hits=-7.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Jun 2012 19:59:33 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q51JxXHD013079 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 1 Jun 2012 15:59:33 -0400 Received: from spoyarek (vpn-232-169.phx2.redhat.com [10.3.232.169]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q51JxV0r012860; Fri, 1 Jun 2012 15:59:32 -0400 Date: Fri, 01 Jun 2012 19:59:00 -0000 From: Siddhesh Poyarekar To: Jan Kratochvil Cc: gdb-patches@sourceware.org, Tom Tromey Subject: Re: [PATCH] Memory reads and writes should have size_t length Message-ID: <20120602012958.4a6d9a7c@spoyarek> In-Reply-To: <20120601174809.GA21938@host2.jankratochvil.net> References: <20120531125320.65ad1f8f@spoyarek> <20120601174809.GA21938@host2.jankratochvil.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: 2012-06/txt/msg00040.txt.bz2 On Fri, 1 Jun 2012 19:48:09 +0200, Jan wrote: > On Thu, 31 May 2012 09:23:20 +0200, Siddhesh Poyarekar wrote: > > --- a/gdb/corefile.c > > +++ b/gdb/corefile.c > > @@ -213,7 +213,7 @@ memory_error (int status, CORE_ADDR memaddr) > > /* Same as target_read_memory, but report an error if can't read. > > */ > > void > > -read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len) > > +read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, size_t len) > > This patch goes again more far than what is needed, couldn't this be > ssize_t? Making it unsigned could be some other cleanup. > I took the liberty of changing signs here because this patch in itself is small enough (and independent) and if it does cause a regression, it should be pretty easy to isolate even with a simple bisect, unlike the last patch where we'd have to hunt through 6k lines of a patch to figure out what went wrong. This patch can be tested independently, so I figured this was OK. What do you think? Regards, Siddhesh