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]

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


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.

The description for '?' is
  Indicate the reason the target halted. The reply is the
  same as for step and continue.

The description for Stop Reply Packet says the following:
  The ‘C’, ‘c’, ‘S’, ‘s’, ‘vCont’, ‘vAttach’, ‘vRun’, ‘vStopped’,
  and ‘?’ packets can receive any of the below as a reply. Except
  for ‘?’ and ‘vStopped’, that reply is only returned when the
  target halts.

This suggests that the target can reply to '?' even if it is not
stopped, which seems to contradict the description for '?'.  But
none of the listed replies seem to be appropriate.  None of the
replies look like "Don't bother me, I'm busy".

How should the JTAG pod respond?  What do most do in this situation?

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


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