This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC][patch] Avoid repeated calls to solib_add on initial attach.
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