This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Fix qC handling in gdbserver
- From: "Pedro Alves" <pedro_alves at portugalmail dot pt>
- To: "Markus Deuling" <deuling at de dot ibm dot com>
- Cc: "GDB Patches" <gdb-patches at sourceware dot org>
- Date: Fri, 27 Apr 2007 11:27:49 +0100
- Subject: Re: [rfc] Fix qC handling in gdbserver
- References: <4631ADC8.6000603@de.ibm.com>
On 4/27/07, Markus Deuling wrote:
+ /* Reply the current thread id. */
+ if (own_buf[0] == 'q' && own_buf[1] == 'C')
+ {
All the other tests in the function seem to check for an
extra '\0', ',' or ':' after the query name. Shouldn't you do the
same here? Otherwise you are answering
to all future queries starting with qC (Think or a gdbserver
installed in rom in a board in the field, and connecting
to it with gdb-cvs2020 :) )
something like:
+ if (strcmp (own_buf, "qC") == 0)
or
+ if (own_buf[0] == 'q' && own_buf[1] == 'C'&& own_buf[2] == '\0')
?
Cheers,
Pedro Alves