Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb@sources.redhat.com
Subject: Re: Always cache memory and registers
Date: Mon, 23 Jun 2003 14:13:00 -0000	[thread overview]
Message-ID: <3EF6FEC9.9080906@redhat.com> (raw)
In-Reply-To: <20030623035625.GA19125@nevyn.them.org>

> On Sun, Jun 22, 2003 at 06:54:48PM -0400, Andrew Cagney wrote:
> 
>> 
> 
>> >>The only proviso being that the the current cache and target vector 
>> >>would need to be modified so that the cache only ever requested the data 
>> >>needed, leaving it to the target to supply more if available (much like 
>> >>registers do today).  The current dcache doesn't do this, it instead 
>> >>pads out small reads :-(
> 
>> >
>> >
>> >It needs tweaking for other reasons too.  It should probably have a
>> >much higher threshold before it starts throwing out data, for one
>> >thing.
>> >
>> >Padding out small reads isn't such a bad idea.  It generally seems to
>> >be the latency that's a real problem, esp. for remote targets.  I think
>> >both NetBSD and GNU/Linux do fast bulk reads native now?  I'd almost
>> >want to increase the padding.
> 
>> 
>> No, other way.
>> 
>> Having GDB pad out small reads can be a disaster - read one too many 
>> bytes and ``foomp''.  This is one of the reasons why the dcache was 
>> never enabled.
> 
> 
> What do you mean?  I would have thought this was the responsibility of
> the stub to manage...

>> However, it is totally reasonable for the target (not GDB) to supply 
>> megabytes of memory mapped data when GDB only asked for a single byte! 
>> The key point is that it is the target that makes any padding / transfer 
>> decisions, and not core GDB.  If the remote target fetches too much data 
>> and `foomp' then, hey not our fault, we didn't tell it to read that 
>> address :-^
> 
> 
> Oh, I see what you're getting at.  Hmm, this would require fudging the
> interfaces a bit, in order for the target to return excess memory.  It
> could be done.  Hm....

Well, given that the target interface is up for an overhaul anyway, this 
fudging is, er, in the hoise.  supply_register(), for instance, needs to 
get parameterized with something meaningful.

In terms of the remote protocol, nothing saying that a T packet can't 
return memory, or that a register/memory fetch can't respond with extra 
info.

For the target vector, my guess is something like:

	target->fetch{register,memory} (<what>, supply-methods)

so that a target can supply anything for a given memory/register request.

Andrew



  reply	other threads:[~2003-06-23 14:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-22 22:26 Andrew Cagney
2003-06-22 22:34 ` Daniel Jacobowitz
2003-06-22 22:55   ` Andrew Cagney
2003-06-23  3:57     ` Daniel Jacobowitz
2003-06-23 14:13       ` Andrew Cagney [this message]
2003-06-23 19:02 ` Discrepency between gdbarch_frame_locals_address and get_frame_locals_address? Paul N. Hilfinger
2003-06-23 19:47   ` Andrew Cagney
     [not found] <1056381193.18735.ezmlm@sources.redhat.com>
2003-06-23 20:11 ` Always cache memory and registers John S. Yates, Jr.

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=3EF6FEC9.9080906@redhat.com \
    --to=ac131313@redhat.com \
    --cc=drow@mvista.com \
    --cc=gdb@sources.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