From: Daniel Jacobowitz <drow@false.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb@sources.redhat.com
Subject: Re: vCont request
Date: Sat, 09 Apr 2005 13:36:00 -0000 [thread overview]
Message-ID: <20050409133541.GA4061@nevyn.them.org> (raw)
In-Reply-To: <01c53cf6$Blat.v2.4$c2abfd80@zahav.net.il>
On Sat, Apr 09, 2005 at 02:23:55PM +0300, Eli Zaretskii wrote:
> Can someone please tell me what is the advantage of using the vCont
> request in the remote protocol?
>
> >From reading the sources, I see that remote.c:remote_resume uses an
> alternative method via the `c' or `s' packets, but it isn't clear why
> vCont is preferred. From various hints in the manual I vaguely
> understand that this involves resuming different threads with
> different conditions/signals, but the details are sketchy at best. In
> particular, what GDB user-level commands are affected by availability
> of vCont?
>
> I need this information to clarify the relevant manual sections.
That's right - it's about thread support, both for the existing
commands we have and some others that have been tossed about but never
implemented. I apologize if it's unclear; I wrote that entry.
The original way to control individual threads was to set the thread
number using 'Hc', and then continue using one of the [CcSs] packets.
Hc has options of "a specific thread", "all threads", or "any thread".
This is only a small set of the possible resume actions; vCont is more
thorough. One example of existing commands that could not be handled
well by the old method is "set scheduler-locking" - in fact, its
default setting, which is off - in combination with "thread". With
scheduler locking off, the "step" command means "step this thread, but
allow other threads to run freely while we do it". With it on, "step"
means "step only the current thread". HcTID followed by s means the
latter - we use this to step over a removed breakpoint. There's no
clear way to send a step request which affects a particular thread, so
the remote stub has to guess. Normally it guesses the last thread to
run; normally that's right. Very frustrating when it's wrong.
Another example that can be described by vCont but not by the existing
commands is pausing a specific thread; there's no GDB interface for
this today, but it's a reasonably intuitive operation. vCont can say
"please continue this specific set of threads only".
It's also marginally more efficient. A major bottleneck in the remote
protocol is latency rather than bandwidth; we only have to ack one
packet instead of two. And it reduces the statefulness of the
protocol.
--
Daniel Jacobowitz
CodeSourcery, LLC
next prev parent reply other threads:[~2005-04-09 13:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-09 11:28 Eli Zaretskii
2005-04-09 13:36 ` Daniel Jacobowitz [this message]
2005-04-09 15:18 ` Eli Zaretskii
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=20050409133541.GA4061@nevyn.them.org \
--to=drow@false.org \
--cc=eliz@gnu.org \
--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