Hc packet 0 and -1?

Nathan J. Williams nathanw@wasabisystems.com
Thu Jan 12 20:27:00 GMT 2006


Is it generally accepted that a remote packet sequence "Hc0" "c" -
documented as "continue any thread" - is to be interpreted as
"continue all threads"? This seems to be what the following logic in
remote.c:remote_resume() does:

  /* All other supported resume packets do use Hc, so call
  set_thread.  */
  if (pid == -1)
    set_thread (0, 0);          /* Run any thread.  */
  else
    set_thread (pid, 0);        /* Run this thread.  */

Why is this done, when Hc-1 is what is documented to have that effect?
I note that this code goes back "forever" (to the start of CVS,
anyway), and that gdbserver appears to treat Hc0 and Hc-1
equivalently.

It seems like we should cause pid==-1 to send Hc-1 (trivial patch), or
fix up the protocol documentation again.

        - Nathan




More information about the Gdb mailing list