From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DD5uB-0005CI-Rz for qemu-devel@nongnu.org; Sun, 20 Mar 2005 14:16:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DD5u5-00058F-B4 for qemu-devel@nongnu.org; Sun, 20 Mar 2005 14:16:03 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DD5u3-00055k-5V for qemu-devel@nongnu.org; Sun, 20 Mar 2005 14:15:59 -0500 Received: from [65.74.133.9] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1DD5S1-0007C7-5R for qemu-devel@nongnu.org; Sun, 20 Mar 2005 13:47:01 -0500 From: Paul Brook Date: Sun, 20 Mar 2005 18:46:57 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200503201846.57812.paul@codesourcery.com> Subject: [Qemu-devel] [patch] GDB error return codes Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org The gdb remote protocol uses the response "ENN" to report an error, where NN is an errno code, not a literal string. Patch below fixes this. Paul Index: gdbstub.c =================================================================== RCS file: /cvsroot/qemu/qemu/gdbstub.c,v retrieving revision 1.23 diff -u -p -r1.23 gdbstub.c --- gdbstub.c 17 Jan 2005 22:03:16 -0000 1.23 +++ gdbstub.c 20 Mar 2005 18:39:09 -0000 @@ -424,7 +479,7 @@ static int gdb_handle_packet(GDBState *s p++; hextomem(mem_buf, p, len); if (cpu_memory_rw_debug(env, addr, mem_buf, len, 1) != 0) - put_packet(s, "ENN"); + put_packet(s, "E14"); else put_packet(s, "OK"); break; @@ -442,7 +497,7 @@ static int gdb_handle_packet(GDBState *s put_packet(s, "OK"); } else { breakpoint_error: - put_packet(s, "ENN"); + put_packet(s, "E22"); } break; case 'z':