Re: Remote Serial Protocol -- reply to '?' when target running
Michael Eager <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
On 08/09/2016 11:40 AM, taylor, david wrote: >> From: [email protected] [mailto:[email protected]] 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 [email protected] 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077