From: Pedro Alves <palves@redhat.com>
To: Bill Morgan <arthurwilliammorgan@gmail.com>, gdb@sourceware.org
Subject: Re: gdb ignoring vCont supported commands
Date: Tue, 09 Oct 2018 18:30:00 -0000 [thread overview]
Message-ID: <0eeb55ca-d4e1-4db4-e601-74ca7e1151e2@redhat.com> (raw)
In-Reply-To: <CAM4wpo_0SNkU7FSo8_=YBShWfmqJMa73=+DL7P-yTKXzHpLO9Q@mail.gmail.com>
On 10/09/2018 02:42 PM, Bill Morgan wrote:
> I tell gdb that I support only vCont c and C, so it sends me s. Why is it
> sending s when I don't support that?
>
> (gdb) s
> Sending packet:
> $QPassSignals:e;10;14;17;1a;1b;1c;21;24;25;2c;4c;97;#0a...Ack
> Packet received: OK
> Sending packet: $vCont?#49...Ack
> Packet received: vCont;c;C
> Packet vCont (verbose-resume) is supported
> Sending packet: $vCont;s:13;c#f4...Ack
> Packet received: E01
> warning: Remote failure reply: E01
That's historical behavior, and GDB cannot change it, unfortunately.
But the good news is that in more recent GDBs there is a protocol
extension to tell GDB to trust the set of reported supported
vCont actions.
Copying what I said here:
https://sourceware.org/ml/gdb-patches/2018-09/msg00359.html
~~~~~~~~~~~~~~~~~~~~~~~~
GDB can't trust "vCont;c;C" alone, because for a long
while GDBserver would send "vCont;c;s;C;S" even if the target
did not support hardware stepping. So what a stub needs to do
is:
Return "vCont;c;C" to "vCont?" _AND_ include "vContSupported"
in the reported "qSupported" features. The latter tells GDB
to trust that the actions included in "vCont?" are really the
supported ones. (I wish we had implemented this a little bit
differently, but that ship has sailed, and although a bit
cumbersome, it works.)
~~~~~~~~~~~~~~~~~~~~~~~~
Thanks,
Pedro Alves
next prev parent reply other threads:[~2018-10-09 18:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-09 13:42 Bill Morgan
2018-10-09 18:30 ` Pedro Alves [this message]
2018-10-09 20:12 ` Bill Morgan
2018-10-09 20:17 ` Simon Marchi
2018-10-09 20:29 ` Bill Morgan
2018-10-09 21:12 ` Pedro Alves
2018-10-09 21:17 ` Bill Morgan
2018-10-09 21:34 ` Bill Morgan
2018-10-19 13:40 ` Pedro Alves
2018-10-19 21:18 ` Bill Morgan
2018-10-11 17:23 ` Bill Morgan
2018-10-18 13:42 ` Bill Morgan
2018-10-19 13:35 ` Pedro Alves
2018-10-19 17:12 ` Bill Morgan
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=0eeb55ca-d4e1-4db4-e601-74ca7e1151e2@redhat.com \
--to=palves@redhat.com \
--cc=arthurwilliammorgan@gmail.com \
--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