public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/4] Change to_xfer_partial 'len' type to ULONGEST.
Date: Wed, 08 Jan 2014 12:34:00 -0000	[thread overview]
Message-ID: <52CD45C2.8050507@redhat.com> (raw)
In-Reply-To: <1389166060-434-3-git-send-email-yao@codesourcery.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

  reply	other threads:[~2014-01-08 12:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-08  7:29 [PATCH 0/4] Change 'len' of to_xfer_partial " Yao Qi
2014-01-08  7:29 ` [PATCH 1/4] Use target_xfer_partial_ftype for rs6000_xfer_shared_libraries Yao Qi
2014-01-08  7:49   ` Joel Brobecker
2014-01-08  7:29 ` [PATCH 4/4] Change 'len''s type from LONGEST to ULONGEST: gdbarch methods core_xfer_shared_libraries and core_xfer_shared_libraries_aix Yao Qi
2014-01-08 12:35   ` Pedro Alves
2014-01-08  7:29 ` [PATCH 3/4] Change 'len' of linux_common_xfer_osdata to ULONGEST Yao Qi
2014-01-08 12:35   ` Pedro Alves
2014-01-08  7:29 ` [PATCH 2/4] Change to_xfer_partial 'len' type " Yao Qi
2014-01-08 12:34   ` Pedro Alves [this message]
2014-01-08 15:31     ` Yao Qi
2014-01-08 12:38 ` [PATCH 0/4] Change 'len' of to_xfer_partial " Pedro Alves
2014-01-08 15:29   ` Yao Qi
2014-01-14 14:31     ` Yao Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52CD45C2.8050507@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=yao@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).