From: Daniel Jacobowitz <drow@false.org>
To: Paul Pluzhnikov <ppluzhnikov@google.com>
Cc: Joel Brobecker <brobecker@adacore.com>,
Tom Tromey <tromey@redhat.com>,
gdb-patches@sourceware.org
Subject: Re: [RFC] Make target_read_string faster over high-latency links.
Date: Mon, 25 Jul 2011 14:42:00 -0000 [thread overview]
Message-ID: <CAN9gPaHxHbj4wwdiyWxQUSS=wyeqo3vs2sZgBpRNyzkEv54v9A@mail.gmail.com> (raw)
In-Reply-To: <CALoOobNY5aFN3JD63q_cxADUpPCDXY6OiomZg3kQCgPr+azNGA@mail.gmail.com>
On Fri, Jul 22, 2011 at 12:52 PM, Paul Pluzhnikov
<ppluzhnikov@google.com> wrote:
> On Fri, Jul 22, 2011 at 9:43 AM, Joel Brobecker <brobecker@adacore.com> wrote:
>
>>> Paul> 1. is it ok to read strings 128 bytes at a time, or are there
>>> Paul> scenarios (JTAG?) where the latency is low but throughput is also
>>> Paul> low (and so reading "unnecessary" data is expensive) ?
>>>
>>> I don't know, but I assume so.
>>
>> I think that the risk is to attempt a read that gets past the
>> readable memory region.
>
> That shouldn't be a risk (I think): target_read will (is supposed to)
> return partial results.
The problem's the other way around; you can't always rely on the
target to know what areas of memory not to read. If you read a big
chunk of a string off of the stack on uClinux (e.g. auxv or
environment), you'll wander up into unmapped memory - and who knows
what will happen then! (More recent versions of uClinux manage to
catch this in ptrace, thankfully).
--
Thanks,
Daniel
next prev parent reply other threads:[~2011-07-25 14:17 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
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 [this message]
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='CAN9gPaHxHbj4wwdiyWxQUSS=wyeqo3vs2sZgBpRNyzkEv54v9A@mail.gmail.com' \
--to=drow@false.org \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--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