From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23167 invoked by alias); 27 Apr 2007 10:27:56 -0000 Received: (qmail 23157 invoked by uid 22791); 27 Apr 2007 10:27:56 -0000 X-Spam-Check-By: sourceware.org Received: from wx-out-0506.google.com (HELO wx-out-0506.google.com) (66.249.82.238) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 27 Apr 2007 11:27:53 +0100 Received: by wx-out-0506.google.com with SMTP id t13so812963wxc for ; Fri, 27 Apr 2007 03:27:51 -0700 (PDT) Received: by 10.78.131.8 with SMTP id e8mr785468hud.1177669669621; Fri, 27 Apr 2007 03:27:49 -0700 (PDT) Received: by 10.78.66.14 with HTTP; Fri, 27 Apr 2007 03:27:49 -0700 (PDT) Message-ID: <4053daab0704270327y37ad430el9b352c455f02e90b@mail.gmail.com> Date: Fri, 27 Apr 2007 10:37:00 -0000 From: "Pedro Alves" To: "Markus Deuling" Subject: Re: [rfc] Fix qC handling in gdbserver Cc: "GDB Patches" In-Reply-To: <4631ADC8.6000603@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4631ADC8.6000603@de.ibm.com> X-Google-Sender-Auth: 4fe12d34b03697c2 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-04/txt/msg00353.txt.bz2 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