This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Hc packet 0 and -1?
- From: "Nathan J. Williams" <nathanw at wasabisystems dot com>
- To: gdb at sourceware dot org
- Date: 12 Jan 2006 15:26:59 -0500
- Subject: 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