From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJ07y-0007UR-Og for qemu-devel@nongnu.org; Wed, 04 Feb 2015 08:36:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJ07t-0006z9-NF for qemu-devel@nongnu.org; Wed, 04 Feb 2015 08:36:22 -0500 Message-ID: <54D2204B.3010903@redhat.com> Date: Wed, 04 Feb 2015 14:36:11 +0100 From: Pedro Alves MIME-Version: 1.0 References: <54CCA038.8000704@web.de> In-Reply-To: <54CCA038.8000704@web.de> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] Add GDB qAttached support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka , qemu-trivial Cc: qemu-devel , Fabien Chouteau Hi, I was skimming the list, and noticed: On 01/31/2015 10:28 AM, Jan Kiszka wrote: > @@ -1187,6 +1193,10 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf) > put_packet_binary(s, buf, len + 1); > break; > } > + if (strncmp(p, "Attached", 8) == 0) { This looks like it'd mishandle a future qAttached2 packet. It should be doing something like: if (strncmp(p, "Attached", 8) == 0 && (p[8] == '\0' || p[8] == ':')) { or: if (strcmp(p, "Attached") == 0 || strncmp(p, "Attached:", 9) == 0) { Likewise other packets, if they have the same issue. (I'm not familiar with qemu's stub's internals.) Thanks, Pedro Alves