public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: gdb@sourceware.org
Subject: [remote] Checking for supported packets
Date: Tue, 14 Mar 2006 02:15:00 -0000	[thread overview]
Message-ID: <20060314021526.GA802@nevyn.them.org> (raw)

I've been working, for the last couple of months, on a wide variety
of projects that involve new remote protocol packets.  I'm planning
to submit each and every one of them; I've just been busy, and
also some of them aren't quite fully baked yet.

Before I start doing that, though, I'd like to trigger a little
conversation about a topic that's been bothering me.  When we
connect to a target, there's a number of packets that we need
to send right away, to find out if they're supported or to get
information about the target's current state.  Here's a current
sample:

Sending packet: $Hc-1#09...Ack
Packet received:
Sending packet: $qC#b4...Ack
Packet received:
Sending packet: $qOffsets#4b...Ack
Packet received:
Sending packet: $?#3f...Ack
Packet received: S00
Sending packet: $Hg0#df...Ack
Packet received:
Sending packet: $pf#d6...Ack
Packet received: 00000000
Packet p (fetch-register) is supported
Sending packet: $m0,4#fd...Ack
Packet received: 1000ffe7

qC and qOffsets are both probes.  [Hc/Hg we don't even notice that
the target has failed to support, so we keep sending them.  That's
unrelated.]

I've got at least two more packets on my list that would have
to be probed for at connect: one to read available features (the
XML bits on my branch, which are coming along well), and another
very useful probe that asks the target how big of a packet it
can handle.  That's a huge performance help on any link with latency
measurable in respect to its bandwidth; it's especially useful over
TCP, whether to a local system or to one far away.

Every new packet of this type has to be probed for on each new
target connection.  This takes a noticeable amount of time.

So, I'm wondering, can we cut that number down, and should we?
Something like this:

-> qPackets?
<- qPackets,qPacketSize+,qOffsets-,qPart:available+,qC-

"I support the qPacketSize and qPart:available queries, but don't
bother probing for qOffsets or qC, they won't work".

This isn't the most useful as it is.  There's a lot of possible
alternatives, for instance:

  1. If qPackets is not present, assume new packets are not supported;
     i.e. require the stub to respond to qPackets before trying
     qPart:available.

  2. If the qPackets response does not mention a packet, assume it
     is not supported.

  3. Or, if the qPackets response does not mention a packet, probe
     for it.

I'm guessing that the most useful interpretation would be something
like 1 && 2, but I mention 3 because implementing #2 could prove
to be a problem for some designs of remote stub (with separate
halves for the protocol bits and the controlling hardware bits).
Anyone think this is likely to be a problem in practice?  Other
possible approaches?

-- 
Daniel Jacobowitz
CodeSourcery

             reply	other threads:[~2006-03-14  2:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-14  2:15 Daniel Jacobowitz [this message]
2006-03-21 14:28 ` Daniel Jacobowitz
2006-03-22 16:39   ` Paul Koning
2006-03-31  6:38   ` [PROPOSAL] " Daniel Jacobowitz
2006-03-31  9:51     ` Eli Zaretskii
2006-03-31 14:09       ` Daniel Jacobowitz
     [not found]         ` <uvetuaep4.fsf@gnu.org>
     [not found]           ` <20060331141958.GA28073@nevyn.them.org>
2006-04-01 10:22             ` Eli Zaretskii
2006-05-10  7:21               ` [PROPOSAL] Checking for supported packets - revised Daniel Jacobowitz
2006-05-10 18:44                 ` Eli Zaretskii
2006-05-10 21:49                   ` Daniel Jacobowitz
2006-05-11  6:02                     ` Eli Zaretskii
2006-05-11  0:19                 ` Jim Blandy
2006-05-11  2:26                   ` Daniel Jacobowitz
2006-05-11  2:36                     ` Jim Blandy
2006-05-12 13:55                       ` Daniel Jacobowitz
2006-05-12 18:24                         ` PAUL GILLIAM
2006-05-23 22:11                         ` Data for: " Daniel Jacobowitz
2006-05-26 22:12                           ` Take three: [PROPOSAL] Checking for supported packets Daniel Jacobowitz

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=20060314021526.GA802@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).