From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5890 invoked by alias); 4 Jun 2007 19:27:26 -0000 Received: (qmail 5881 invoked by uid 22791); 4 Jun 2007 19:27:25 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 04 Jun 2007 19:27:19 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 5ACFA982E4; Mon, 4 Jun 2007 19:27:17 +0000 (GMT) Received: from caradoc.them.org (dsl093-172-095.pit1.dsl.speakeasy.net [66.93.172.95]) by nan.false.org (Postfix) with ESMTP id 0AFA1982E2; Mon, 4 Jun 2007 19:27:13 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1HvICW-00067a-Mx; Mon, 04 Jun 2007 15:26:48 -0400 Date: Mon, 04 Jun 2007 19:27:00 -0000 From: Daniel Jacobowitz To: Ulrich Weigand Cc: gdb-patches@sourceware.org Subject: Re: [rfc/rfa] [1/4] SPU enhancements: preparation Message-ID: <20070604192648.GA23516@caradoc.them.org> Mail-Followup-To: Ulrich Weigand , gdb-patches@sourceware.org References: <200706021931.l52JVBZQ005084@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200706021931.l52JVBZQ005084@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.15 (2007-04-09) 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: 2007-06/txt/msg00036.txt.bz2 On Sat, Jun 02, 2007 at 09:31:11PM +0200, Ulrich Weigand wrote: > Hello, > > this is a small fix in preparation for adding extended SPU query support. > Some files in spufs accessed via the spu_proc_xfer_spu routines in > spu-linux-nat.c and gdbserver/spu-low.c are non-seekable. Currently, > any attempt to access those at non-zero offset results in a failure. > > However, that is a problem when trying to use those files via the > target object mechanism. For example, the target_read routine will > first read a chunk at offset zero (which succeeds, and in fact is > generally sufficient to retrieve the full contents as the non-seekable > files are small). But then it attempts a second read at an offset > corresponding to the length of the first chunk read, which now fails. > > This patch changes spu_proc_xfer_spu to simply return zero (i.e. no > more data available) on any attempt to access a non-seekable spufs > file at non-zero offset. > > Tested on spu-elf in conjunction with the other patches. Seems reasonable to me. -- Daniel Jacobowitz CodeSourcery