Re: [Qemu-devel] [PATCH 1/2] Add GDB qAttached support

2015-02-04 Thread Peter Maydell
On 4 February 2015 at 13:36, Pedro Alves wrote: > > 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 || s

Re: [Qemu-devel] [PATCH 1/2] Add GDB qAttached support

2015-02-04 Thread Jan Kiszka
On 2015-02-04 14:36, Pedro Alves wrote: > 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;

Re: [Qemu-devel] [PATCH 1/2] Add GDB qAttached support

2015-02-04 Thread Pedro Alves
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"

[Qemu-devel] [PATCH 1/2] Add GDB qAttached support

2015-01-31 Thread Jan Kiszka
From: Jan Kiszka 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 b

Re: [Qemu-devel] [PATCH 1/2] Add GDB qAttached support

2013-03-12 Thread Jan Kiszka
On 2013-03-12 15:31, Fabien Chouteau 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 > em

[Qemu-devel] [PATCH 1/2] Add GDB qAttached support

2013-03-12 Thread Fabien Chouteau
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. We introduce a new command line option. It's a

Re: [Qemu-devel] [PATCH 1/2] Add GDB qAttached support

2013-03-11 Thread Fabien Chouteau
On 03/11/2013 12:36 PM, Jan Kiszka wrote: > On 2013-03-11 12:22, Fabien Chouteau wrote: >> On 03/10/2013 09:06 AM, Jan Kiszka wrote: diff --git a/qemu-options.hx b/qemu-options.hx index 6f9334a..026d3eb 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2988,6 +2988,13

Re: [Qemu-devel] [PATCH 1/2] Add GDB qAttached support

2013-03-11 Thread Jan Kiszka
On 2013-03-11 12:22, Fabien Chouteau wrote: > On 03/10/2013 09:06 AM, Jan Kiszka wrote: >>> @@ -2491,6 +2493,10 @@ static int gdb_handle_packet(GDBState *s, const char >>> *line_buf) >>> break; >>> } >>> #endif >>> +if (strncmp(p, "Attached", 8) == 0) { >>> +

Re: [Qemu-devel] [PATCH 1/2] Add GDB qAttached support

2013-03-11 Thread Fabien Chouteau
On 03/10/2013 09:06 AM, Jan Kiszka wrote: >> @@ -2491,6 +2493,10 @@ static int gdb_handle_packet(GDBState *s, const char >> *line_buf) >> break; >> } >> #endif >> +if (strncmp(p, "Attached", 8) == 0) { >> +put_packet(s, gdb_attached ? "1" : "0"); >> +

Re: [Qemu-devel] [PATCH 1/2] Add GDB qAttached support

2013-03-10 Thread Jan Kiszka
On 2013-03-05 17:03, Fabien Chouteau wrote: > With this patch GDB will issue a "detach" command at the end of a > debugging session instead of a "kill". This behavior can be inverted > with the new option -gdb-not-attached. > > This patch implements the requirement described in Jan Kiszka's patch:

[Qemu-devel] [PATCH 1/2] Add GDB qAttached support

2013-03-05 Thread Fabien Chouteau
With this patch GDB will issue a "detach" command at the end of a debugging session instead of a "kill". This behavior can be inverted with the new option -gdb-not-attached. This patch implements the requirement described in Jan Kiszka's patch: "gdbstub: Do not kill target in system emulation mode