From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18088 invoked by alias); 1 Jun 2012 19:54:09 -0000 Received: (qmail 18074 invoked by uid 22791); 1 Jun 2012 19:54:07 -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:53:49 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q51Jrjv2010199 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 1 Jun 2012 15:53:45 -0400 Received: from spoyarek (vpn-232-169.phx2.redhat.com [10.3.232.169]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q51JrhkO031615; Fri, 1 Jun 2012 15:53:44 -0400 Date: Fri, 01 Jun 2012 19:54:00 -0000 From: Siddhesh Poyarekar To: Hans-Peter Nilsson Cc: binutils@sourceware.org, gdb-patches@sourceware.org Subject: Re: [PATCH] bfd: Use size_t for length argument totarget_read_memory function passed into bfd_elf_bfd_from_remote_memory Message-ID: <20120602012410.43f5fdf6@spoyarek> In-Reply-To: <201206011824.q51IOEA8029007@ignucius.se.axis.com> References: <20120528143520.29254d79@spoyarek> <201206011824.q51IOEA8029007@ignucius.se.axis.com> 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/msg00038.txt.bz2 On Fri, 1 Jun 2012 20:24:14 +0200, Hans-Peter wrote: > There's always bfd_size_type, though I haven't checked if it > fits your needs. Should be OK as long as it always matches the size_t definition in the stddef.h that gcc ships. They're both typically unsigned long, but if that is so, then bfd_size_type should have been typedef'd to size_t anyway. > This caused failure to build for simulators for (at least) the > following targets: > > cris-elf, frv-elf, h8300-elf, iq2000-elf, m32r-elf, mips-elf, and > mn10300-elf. > > They fail building either of sim/common/cgen-utils.c, > sim/common/sim-command.c, sim/mips/interp.c, or > sim/common/nrun.c all due to lack of size_t definition; a > missing include of stddef.h before its use. > > Should bfd.h include sysdep.h or what is missing? An stddef.h include in bfd.h should fix this. That or I can fix my patch to use bfd_size_type provided its size is always equal to size_t, so that the include is not needed. Which way would be preferable? Regards, Siddhesh