All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Pedro Alves <palves@redhat.com>,  qemu-trivial <qemu-trivial@nongnu.org>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/2] Add GDB qAttached support
Date: Wed, 04 Feb 2015 15:06:07 +0100	[thread overview]
Message-ID: <54D2274F.4040008@web.de> (raw)
In-Reply-To: <54D2204B.3010903@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 887 bytes --]

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;
>>          }
>> +        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 for the remark! Will update the patch using the easier readable
second variant.

Jan



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Jan Kiszka <jan.kiszka@web.de>
To: Pedro Alves <palves@redhat.com>, qemu-trivial <qemu-trivial@nongnu.org>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	Fabien Chouteau <chouteau@adacore.com>
Subject: Re: [Qemu-devel] [PATCH 1/2] Add GDB qAttached support
Date: Wed, 04 Feb 2015 15:06:07 +0100	[thread overview]
Message-ID: <54D2274F.4040008@web.de> (raw)
In-Reply-To: <54D2204B.3010903@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 887 bytes --]

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;
>>          }
>> +        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 for the remark! Will update the patch using the easier readable
second variant.

Jan



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2015-02-04 14:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-31  9:28 [Qemu-trivial] [PATCH 1/2] Add GDB qAttached support Jan Kiszka
2015-01-31  9:28 ` [Qemu-devel] " Jan Kiszka
2015-01-31  9:29 ` [Qemu-trivial] [PATCH 2/2] Revert "gdbstub: Do not kill target in system emulation mode" Jan Kiszka
2015-01-31  9:29   ` [Qemu-devel] " Jan Kiszka
2015-02-04 13:36 ` [Qemu-trivial] [Qemu-devel] [PATCH 1/2] Add GDB qAttached support Pedro Alves
2015-02-04 13:36   ` Pedro Alves
2015-02-04 14:06   ` Jan Kiszka [this message]
2015-02-04 14:06     ` Jan Kiszka
2015-02-04 14:30   ` [Qemu-trivial] " Peter Maydell
2015-02-04 14:30     ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54D2274F.4040008@web.de \
    --to=jan.kiszka@web.de \
    --cc=palves@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.