qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gdbstub: Fix client Ctrl-C handling


From: Michael Tokarev
Subject: Re: [PATCH] gdbstub: Fix client Ctrl-C handling
Date: Wed, 12 Jul 2023 13:39:03 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

12.07.2023 05:13, Nicholas Piggin wrote:
On Tue Jul 11, 2023 at 6:59 PM AEST, Nicholas Piggin wrote:
The gdb remote protocol has a special interrupt character (0x03) that is
transmitted outside the regular packet processing, and represents a
Ctrl-C pressed in the client. Despite not being a regular packet, it
does expect a regular stop response if the stub successfully stops the
running program.

See: https://sourceware.org/gdb/onlinedocs/gdb/Interrupts.html

Inhibiting the stop reply packet can lead to gdb client hang. So permit
a stop response when receiving a character from gdb that stops the vm.
Additionally, add a warning if that was not a 0x03 character, because
the gdb session is likely to end up getting confused if this happens.

Cc: qemu-stable@nongnu.org

Oh, I should note that this doesn't apply to any stable
branches I'm sorry. Will be more careful with the tag...

That's entirely Okay, since the Fixes: tag helps to determine if it fits
or not, and 758370052fb is v8.0.0-803-g758370052f.  It's worse to miss
something important :)

Thank you!

/mjt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]