Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] Make target_read_string faster over high-latency links.
Date: Mon, 18 Jul 2011 19:01:00 -0000	[thread overview]
Message-ID: <CALoOobMZEbQDQOWM4iPOP9ORm5DLDaLoqZXO5YYHaf+hV+DS6g@mail.gmail.com> (raw)
In-Reply-To: <m3k4bf7byo.fsf@fleche.redhat.com>

On Mon, Jul 18, 2011 at 10:09 AM, Tom Tromey <tromey@redhat.com> wrote:

> Paul> 2. Current target_read_string aligns reads on a 4-byte boundary. Code
> Paul>    could be simplified quite a bit if it didn't do that.
> Paul>    Are there targets where such alignment is required?
>
> I don't know this either, sorry.

In gdb.texinfo, Node Packets:

  @item m @var{addr},@var{length}
  @cindex @samp{m} packet
  Read @var{length} bytes of memory starting at address @var{addr}.
  Note that @var{addr} may not be aligned to any particular boundary.

I *think* this suggests that alignment is not really necessary here.

> What about making it possible for gdbserver to do the string-reading
> itself, with a fallback to the existing code for older versions?  Then
> you don't need a parameter or any tuning.

Just to clarify, you are suggesting a new packet, e.g.
  qStr {addr},{maxlen}
in response to which gdbserver will read up to either terminating NUL,
or maxlen.

That sounds like a good idea, except I would also add {terminator} byte, so
you could read "memory from addr to {terminator} but no more than {maxlen}".

Terminator could be optional.

Don't know if it's really necessary, but it could come in handy if you
want to read up to '\n' or some such.

Thanks,
-- 
Paul Pluzhnikov


  reply	other threads:[~2011-07-18 18:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-15 18:09 Paul Pluzhnikov
2011-07-18 18:06 ` Tom Tromey
2011-07-18 19:01   ` Paul Pluzhnikov [this message]
2011-07-19 17:44     ` Paul Pluzhnikov
2011-07-19 17:52       ` Tom Tromey
2011-07-22 16:53   ` Joel Brobecker
2011-07-22 17:01     ` Paul Pluzhnikov
2011-07-25 14:42       ` Daniel Jacobowitz
2011-07-26 11:15 ` 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=CALoOobMZEbQDQOWM4iPOP9ORm5DLDaLoqZXO5YYHaf+hV+DS6g@mail.gmail.com \
    --to=ppluzhnikov@google.com \
    --cc=gdb-patches@sourceware.org \
    --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