From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@redhat.com>,
Paul Pluzhnikov <ppluzhnikov@google.com>,
Luis Machado <lgustavo@codesourcery.com>
Subject: Re: [RFC][patch] Avoid repeated calls to solib_add on initial attach.
Date: Fri, 22 Jul 2011 17:43:00 -0000 [thread overview]
Message-ID: <201107221836.33031.pedro@codesourcery.com> (raw)
In-Reply-To: <m339hyxm3g.fsf@fleche.redhat.com>
On Friday 22 July 2011 18:26:59, Tom Tromey wrote:
> Paul> Going back to the new packet proposal to speed up target_read_string;
> Paul> do you have any additional comments on
> Paul> qStr {addr},{maxlen},{terminator}
> Paul> format? Should {terminator} be optional? Should I avoid it altogether
> Paul> (it doesn't solve any current problem, so perhaps it's over-design) ?
>
> I haven't run across code in gdb that needs to read memory using a
> delimiter other than \0. So I would suggest leaving it out.
I think we should at least have a terminator width for wide chars.
If we're adding this, we should keep in mind valprint.c:read_string.
(It occured to be that we can emulate this packet
with two packets: qSearch:memory (target_search_memory),
to look for the terminator, like a remote strlen, and then a
normal memory read, though that would not be as efficient,
and certainly would be worse for small strings.)
--
Pedro Alves
prev parent reply other threads:[~2011-07-22 17:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-15 20:58 Paul Pluzhnikov
2011-07-20 13:56 ` Gary Benson
2011-07-20 14:59 ` Pedro Alves
2011-07-20 16:15 ` Paul Pluzhnikov
2011-07-20 16:56 ` Pedro Alves
2011-07-20 16:59 ` Paul Pluzhnikov
2011-07-20 17:36 ` Pedro Alves
2011-07-20 18:38 ` Pedro Alves
2011-07-22 17:27 ` Paul Pluzhnikov
2011-07-22 17:51 ` Pedro Alves
2011-07-22 17:36 ` Tom Tromey
2011-07-22 17:43 ` Pedro Alves [this message]
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=201107221836.33031.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=lgustavo@codesourcery.com \
--cc=ppluzhnikov@google.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