This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/4] Change to_xfer_partial 'len' type to ULONGEST.
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 08 Jan 2014 12:34:10 +0000
- Subject: Re: [PATCH 2/4] Change to_xfer_partial 'len' type to ULONGEST.
- Authentication-results: sourceware.org; auth=none
- References: <1389166060-434-1-git-send-email-yao at codesourcery dot com> <1389166060-434-3-git-send-email-yao at codesourcery dot com>
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