This is the mail archive of the gdb@sources.redhat.com 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]

remote ack to [CcSs]


J.T.

 From remote.c:

   /* The s/S/c/C packets do not return status.  So if the target does
      not support the S or C packets, the debug agent returns an empty
      string which is detected in remote_wait().  This protocol defect
      is fixed in the e/E packets. */

Thinking about it, I don't think there is anything actually wrong with 
this behavour and I'm wondering if the [Ee] packet should have adopted 
the same behavour as the [CcSs].

Consider what happens if the code is strictly event driven.  Regardless 
of which of the [SsCc] or [Ee] packets is used, the code will need to 
return to the event-loop and then wait for a response.  It would then be 
left to remote_wait() to analyze the response and compare it agains the 
current target state.  If remote_wait() got "" after remote_resume() 
issued a [Ee] then remote_wait() (and not remote_resume()) would try 
[SsEc] resuming the target by other means and finally returning 
non-event to WFI.

	Andrew


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