qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Sandra Loosemore <sandra@codesourcery.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	QEMU Trivial <qemu-trivial@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] gdbstub: Send a reply to the vKill packet.
Date: Thu, 14 Feb 2019 11:27:28 -0700	[thread overview]
Message-ID: <fdba9c20-3ffb-7862-51c5-f78852b68238@codesourcery.com> (raw)
In-Reply-To: <CAFEAcA8eFexmymsaur-DtgYdKcyJB0ia7dW_vp358hbySsyBDw@mail.gmail.com>

On 2/14/19 10:48 AM, Peter Maydell wrote:
> On Tue, 12 Feb 2019 at 21:52, Sandra Loosemore <sandra@codesourcery.com> wrote:
>>
>> Per the GDB remote protocol documentation
>>
>> https://sourceware.org/gdb/current/onlinedocs/gdb/Packets.html#index-vKill-packet
>>
>> the debug stub is expected to send a reply to the 'vKill' packet.  At
>> least some versions of GDB crash if the gdb stub simply exits without
>> sending a reply.  This patch fixes QEMU's gdb stub to conform to the
>> expected behavior.
>>
>> Note that QEMU's existing handling of the legacy 'k' packet is
>> correct: in that case GDB does not expect a reply, and QEMU does not
>> send one.
>>
>> Signed-off-by: Sandra Loosemore <sandra@codesourcery.com>
> 
> Thanks, applied to target-arm.next.
> 
> As an aside, do you know if there is any kind of test suite for
> the remote protocol that implementors of a debug stub can use to
> check that they're conforming to it?

Well, I discovered this problem by running the GDB testsuite (using QEMU 
for nios2-elf target with the other target-specific patches I recently 
posted).  I'm not sure if it's designed to exhaustively test the entire 
remote protocol, but it does a pretty good job of covering user-visible 
GDB features that depend on the remote target doing something 
reasonable, even if it's just saying "Huh?  I don't know how to do 
that."  :-)

-Sandra

  reply	other threads:[~2019-02-14 18:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12 21:47 [Qemu-devel] [PATCH] gdbstub: Send a reply to the vKill packet Sandra Loosemore
2019-02-14 17:48 ` Peter Maydell
2019-02-14 18:27   ` Sandra Loosemore [this message]
2019-08-27 22:20     ` Aleksandar Markovic

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=fdba9c20-3ffb-7862-51c5-f78852b68238@codesourcery.com \
    --to=sandra@codesourcery.com \
    --cc=peter.maydell@linaro.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).