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]

Hc packet 0 and -1?


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



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