From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGTKv-0004JY-Co for qemu-devel@nongnu.org; Fri, 15 Mar 2013 08:02:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UGTKr-00060U-Sa for qemu-devel@nongnu.org; Fri, 15 Mar 2013 08:02:13 -0400 Received: from mel.act-europe.fr ([194.98.77.210]:51289) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGTKr-00060J-Iu for qemu-devel@nongnu.org; Fri, 15 Mar 2013 08:02:09 -0400 Message-ID: <51430DBC.1080808@adacore.com> Date: Fri, 15 Mar 2013 13:02:04 +0100 From: Fabien Chouteau MIME-Version: 1.0 References: <1363109492-1901-1-git-send-email-chouteau@adacore.com> <1363109492-1901-2-git-send-email-chouteau@adacore.com> <51422A3D.7000308@siemens.com> <51423C00.1070101@linux.vnet.ibm.com> In-Reply-To: <51423C00.1070101@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4] Add GDB qAttached support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jesse Larrew Cc: Jan Kiszka , Anthony Liguori , "qemu-devel@nongnu.org" On 03/14/2013 10:07 PM, Jesse Larrew wrote: > On 03/14/2013 02:51 PM, Jan Kiszka wrote: >> With this patch QEMU handles qAttached request from gdb. When QEMU >> replies 1, GDB sends a "detach" command at the end of a debugging >> session otherwise GDB sends "kill". >> >> The default value for qAttached is 1 on system emulation and 0 on user >> emulation. >> >> Based on original version by Fabien Chouteau. >> >> Signed-off-by: Jan Kiszka >> --- >> >> As Fabien dropped his attempt to make this configurable, let's >> preserve the value of exposing this feature to gdb statically. >> >> gdbstub.c | 10 ++++++++++ >> 1 files changed, 10 insertions(+), 0 deletions(-) >> >> diff --git a/gdbstub.c b/gdbstub.c >> index e414ad9..9daee86 100644 >> --- a/gdbstub.c >> +++ b/gdbstub.c >> @@ -42,6 +42,12 @@ >> #include "sysemu/kvm.h" >> #include "qemu/bitops.h" >> >> +#ifdef CONFIG_USER_ONLY >> +#define GDB_ATTACHED "0" >> +#else >> +#define GDB_ATTACHED "1" >> +#endif >> + > > Yes, I like the #define better. Right, since we drop reconfigurability, this is more appropriate. -- Fabien Chouteau