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 2/4] Change to_xfer_partial 'len' type to ULONGEST.


On 01/08/2014 07:27 AM, Yao Qi wrote:
> @@ -178,7 +178,10 @@ ld_so_xfer_auxv (gdb_byte *readbuf,
>  	}
>  
>        data_address += block;
> -      len -= block;
> +      if (len < block)
> +	len = 0;
> +      else
> +	len -= block;

Is this a bug fix (if so, it should go is separately)?

But, AFAICS, we have:

      if (block > len)
	block = len;

above, so it shouldn't be necessary.

>  darwin_read_write_inferior (task_t task, CORE_ADDR addr,
>  			    gdb_byte *rdaddr, const gdb_byte *wraddr,
> -			    int length)
> +			    ULONGEST length)
>  {

...

> @@ -1772,7 +1772,7 @@ darwin_read_write_inferior (task_t task, CORE_ADDR addr,
>    mach_vm_address_t region_address;
>    mach_vm_size_t region_length;
>
> -  inferior_debug (8, _("darwin_read_write_inferior(task=0x%x, %s, len=%d)\n"),
> +  inferior_debug (8, _("darwin_read_write_inferior(task=0x%x, %s, len=%u)\n"),
>  		  task, core_addr_to_string (addr), length);

Should be %s/pulongest.

Otherwise looks good to me.

-- 
Pedro Alves


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