Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Siddhesh Poyarekar <siddhesh@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org, Tom Tromey <tromey@redhat.com>
Subject: Re: [PATCH] Memory reads and writes should have size_t length
Date: Fri, 01 Jun 2012 19:59:00 -0000	[thread overview]
Message-ID: <20120602012958.4a6d9a7c@spoyarek> (raw)
In-Reply-To: <20120601174809.GA21938@host2.jankratochvil.net>

On Fri, 1 Jun 2012 19:48:09 +0200, Jan wrote:

> 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.
> 

I took the liberty of changing signs here because this patch in itself
is small enough (and independent) and if it does cause a regression, it
should be pretty easy to isolate even with a simple bisect, unlike the
last patch where we'd have to hunt through 6k lines of a patch to
figure out what went wrong.

This patch can be tested independently, so I figured this was OK. What
do you think?

Regards,
Siddhesh


  reply	other threads:[~2012-06-01 19:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-31  8:08 Siddhesh Poyarekar
2012-06-01 18:10 ` Jan Kratochvil
2012-06-01 19:59   ` Siddhesh Poyarekar [this message]
2012-06-04 21:54     ` Jan Kratochvil
2012-06-05  3:16       ` Siddhesh Poyarekar
2012-06-05 21:21         ` [commit] Change target_read_memory size_t->ssize_t [Re: [PATCH] Memory reads and writes should have size_t length] Jan Kratochvil
2012-06-05 21:23         ` [commit] [PATCH] Memory reads and writes should have size_t length Jan Kratochvil

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=20120602012958.4a6d9a7c@spoyarek \
    --to=siddhesh@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=tromey@redhat.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