This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc] Correct semantics of target_read_partial, add target_read_whole


> Date: Wed, 5 Jul 2006 15:06:39 -0400
> From: Daniel Jacobowitz <drow@false.org>
> 
> 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  <dan@codesourcery.com>
> 
> 	* 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]