This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb ignoring vCont supported commands


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]