From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11322 invoked by alias); 1 Jun 2012 18:10:26 -0000 Received: (qmail 11306 invoked by uid 22791); 1 Jun 2012 18:10:25 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,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 18:09:58 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q51I9r1m004559 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 1 Jun 2012 14:09:58 -0400 Received: from host2.jankratochvil.net (ovpn-116-47.ams2.redhat.com [10.36.116.47]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q51Hm91j005804 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 1 Jun 2012 13:48:12 -0400 Date: Fri, 01 Jun 2012 18:10:00 -0000 From: Jan Kratochvil To: Siddhesh Poyarekar Cc: gdb-patches@sourceware.org, Tom Tromey Subject: Re: [PATCH] Memory reads and writes should have size_t length Message-ID: <20120601174809.GA21938@host2.jankratochvil.net> References: <20120531125320.65ad1f8f@spoyarek> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120531125320.65ad1f8f@spoyarek> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2012-06/txt/msg00030.txt.bz2 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. The bfd/ change could also use ssize_t but I find the bfd-gdb interface could be more final. Thanks, Jan