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: [PATCH] Memory reads and writes should have size_t length


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


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