From: Andrew Cagney <cagney@gnu.org>
To: Daniel Jacobowitz <drow@false.org>, Jim Blandy <jimb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFA: make sim interface use gdbarch methods for collect/supply
Date: Fri, 02 Jul 2004 15:39:00 -0000 [thread overview]
Message-ID: <40E581BD.6010405@gnu.org> (raw)
In-Reply-To: <20040701184832.GA18339@nevyn.them.org>
> On Thu, Jul 01, 2004 at 01:44:53PM -0500, Jim Blandy wrote:
>
>>>
>>> Daniel Jacobowitz <drow@false.org> writes:
>>
>>>> > GDB won't have to know where to place their contents in the buffer!
>>>> > That's the point of using a regset. You convert the 'g' packet output
>>>> > to a binary blob in the obvious way, and then that's your regset. The
>>>> > target architecture supplies a regset that expects the format provided
>>>> > by the 'g' packet. Is there some problem with that plan?
>>
>>>
>>> No, regsets are perfect for 'g'. I was thinking of the single-
>>> register case (all under the assumption that we'd like to restrict
>>> uses of supply_register and collect_register to regset functions).
>>> What do you do with, say, the individual registers from your fancy 'T'
>>> reply?
>
>
> I have no idea. Good question.
(I've attached a few of comments that go with TARGET_OBJECT, check the
archives for qPart)
For regsets, the ``void *buffer/long length'' pair can be replaced by a
single ``byte array'' object.
The regset code can then send offset/length xfer requests to that ``byte
array''. For cores, the byte array would extract the bytes from the
core file; for ptrace, the byte array would extract the bytes using the
relevant ptrace call; and for the remote inferior, the request would be
converted into one or more qPart packets (sending the
regset/offset/length across the wire).
When it comes to a `T' reply, the remote inferior can push
regset/offset/length data for parts of the regset buffer that it thinks
are interesting.
>>> As far as I can tell, regsets don't serve this case well, which makes
>>> them (in their current state) less than suitable as a universal
>>> register transfer interface.
Andrew
/* Request the transfer of up to LEN 8-bit bytes of the target's
OBJECT. The OFFSET, for a seekable object, specifies the starting
point. The ANNEX can be used to provide additional data-specific
information to the target.
Return the number of bytes actually transfered, zero when no
further transfer is possible, and -1 when the transfer is not
supported.
NOTE: cagney/2003-10-17: The current interface does not support a
"retry" mechanism. Instead it assumes that at least one byte will
be transfered on each call.
NOTE: cagney/2003-10-17: The current interface can lead to
fragmented transfers. Lower target levels should not implement
hacks, such as enlarging the transfer, in an attempt to compensate
for this. Instead, the target stack should be extended so that it
implements supply/collect methods and a look-aside object cache.
With that available, the lowest target can safely and freely "push"
data up the stack.
next prev parent reply other threads:[~2004-07-02 15:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-30 15:48 Jim Blandy
2004-06-30 15:53 ` Daniel Jacobowitz
2004-06-30 17:00 ` Jim Blandy
2004-07-01 2:48 ` Daniel Jacobowitz
2004-07-01 17:23 ` Jim Blandy
2004-07-01 17:31 ` Daniel Jacobowitz
2004-07-01 18:45 ` Jim Blandy
2004-07-01 18:48 ` Daniel Jacobowitz
2004-07-02 15:39 ` Andrew Cagney [this message]
2004-07-06 15:38 ` Daniel Jacobowitz
2004-07-06 17:10 ` Jim Blandy
2004-07-06 17:17 ` Daniel Jacobowitz
2004-07-15 18:35 ` Jim Blandy
2004-07-16 15:01 ` Daniel Jacobowitz
2004-07-06 17:43 ` Andrew Cagney
2004-07-06 18:31 ` Daniel Jacobowitz
2004-07-02 15:19 ` Andrew Cagney
2004-07-02 22:13 ` Jim Blandy
2004-07-06 15:18 ` Andrew Cagney
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=40E581BD.6010405@gnu.org \
--to=cagney@gnu.org \
--cc=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=jimb@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