Remote Serial Protocol -- reply to '?' when target running

Michael Eager eager@eagerm.com
Tue Aug 9 19:08:00 GMT 2016


On 08/09/2016 11:40 AM, taylor, david wrote:
>> From: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] On
>> Behalf Of Michael Eager
>
>
>> When gdb connects to a remote target, it asks about
>> features, and then sends a '?' packet, asking why the
>> target is stopped.  When the target connection is through
>> a JTAG pod, the pod may be able to respond to the feature
>> request, but not be able to determine what the current state of
>> the target is, likely because it is not stopped.  What should a
>> JTAG pod reply in this case?
>>
>> The GDB Remote Protocol doc doesn't seem to be entirely consistent.
>
> Sounds like you are in non-stop mode...  our stub
>
> In 'Remote Protocol Support for Non-Stop Mode' (part of appendix E), it says in part:
>
>      If all threads are running when the target receives the '?' packet,
>      or if the target is not attached to any process, it shall respond 'OK'.
>
> I don’t know about others, but we operate in non-stop mode and if there
>   are no stopped threads, we respond with 'OK'.

The JTAG pod I'm using does not respond with "QNonStop+" in response
to "qSupported".  Perhaps it should.

The JTAG pod does respond to '?' with OK.  After a few other exchanges,
gdb goes into a wait, waiting to receive something from the target.

What do you do?  Send a stop reply packet when the target stops?

-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077



More information about the Gdb mailing list