This is the mail archive of the gdb-patches@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]

Re: [rfc] Fix qC handling in gdbserver


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


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