Re: gdb ignoring vCont supported commands
Bill Morgan <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <CAM4wpo9EgNZeQsW1Bhv9F-AdO_=mwLNo-euAtKd7A6BeKdgHwA@mail.gmail.com> |
On Tue, Oct 9, 2018 at 1:30 PM Pedro Alves <[email protected]> wrote: > 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.) > ~~~~~~~~~~~~~~~~~~~~~~~~ > > I get a warning that vContSupported is unrecognized: Sending packet: $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+#df...Ack Packet received: PacketSize=3fff;QPassSignals+;qXfer:features:read+;qXfer:threads:read+;vContSupported Packet qSupported (supported-packets) is supported warning: unrecognized item "vContSupported" in "qSupported" response I am using this version: GNU gdb (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 8.0.50.20171128-git > Thanks, > Pedro Alves >