From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1215 invoked by alias); 5 Jul 2006 19:34:56 -0000 Received: (qmail 1207 invoked by uid 22791); 5 Jul 2006 19:34:56 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 05 Jul 2006 19:34:53 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.4/8.13.4) with ESMTP id k65JYH4L026708; Wed, 5 Jul 2006 21:34:18 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6) with ESMTP id k65JYHIh030286; Wed, 5 Jul 2006 21:34:17 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6/Submit) id k65JYHQk000845; Wed, 5 Jul 2006 21:34:17 +0200 (CEST) Date: Wed, 05 Jul 2006 19:34:00 -0000 Message-Id: <200607051934.k65JYHQk000845@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: gdb-patches@sourceware.org In-reply-to: <20060705190639.GA26278@nevyn.them.org> (message from Daniel Jacobowitz on Wed, 5 Jul 2006 15:06:39 -0400) Subject: Re: [rfc] Correct semantics of target_read_partial, add target_read_whole References: <20060622032355.GA27566@nevyn.them.org> <20060705190639.GA26278@nevyn.them.org> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00013.txt.bz2 > Date: Wed, 5 Jul 2006 15:06:39 -0400 > From: Daniel Jacobowitz > > Here is an improved version of my previous patch. According to > suggestions I received, I've renamed target_read_whole to the hopefully > clearer target_read_object_alloc (since it reads an entire object, and > allocates memory for it). Hmm, target_read also reads objects (although not necessary complete objects), but doesn't have "object" in its name. Perhaps I have an unhealthy sense for symmetry, but I'd rather have the new function named target_read_alloc. It's shorter too ;-). Otherwise, this really lloks good! > 2006-07-05 Daniel Jacobowitz > > * target.c (target_read): Stop if target_read_partial returns 0 > when some bytes have already been read. > (target_write): Likewise for target_write_partial. > (target_read_partial, target_write_partial): Make static. > (target_read_object_alloc): New. > * target.h: Doc fixes. > (target_read_partial, target_write_partial): Delete prototypes. > (target_read_object_alloc): New prototype. > > * auxv.c (target_auxv_read): Delete. > (target_auxv_search, fprint_target_auxv): Use target_read_object_alloc. > * auxv.h (target_auxv_read): Delete prototype. > * avr-tdep.c (avr_io_reg_read_command): Use target_read_object_alloc. > * ia64-tdep.c (getunwind_table, get_kernel_table): Likewise. > * linux-nat.c (linux_nat_make_corefile_notes): Likewise. > * procfs.c (procfs_make_note_section): Likewise. > * remote.c (remote_xfer_partial): Don't loop here. > * sparc-tdep.c (sparc_fetch_wcookie): Use target_read.