This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb/remote: Don't use vKill if multi-process features are disabled
- From: Pedro Alves <palves at redhat dot com>
- To: Andrew Burgess <andrew dot burgess at embecosm dot com>, gdb-patches at sourceware dot org
- Date: Thu, 17 Mar 2016 22:21:05 +0000
- Subject: Re: [PATCH] gdb/remote: Don't use vKill if multi-process features are disabled
- Authentication-results: sourceware.org; auth=none
- References: <1458252144-3496-1-git-send-email-andrew dot burgess at embecosm dot com>
On 03/17/2016 10:02 PM, Andrew Burgess wrote:
> The below was tested using native gdbserver on x86-64 Fedora Linux
> with no regressions.
>
> ---
>
> The gdb remote protocol documentation is clear that the vKill command
> should not be used unless the multi-process feature is reported as
> supported by the remote target.
>
> Currently within gdb we check to see if the vKill packet is enabled or
> not before using the vKill command, however, the only way to disable
> vKill is from the gdb console, the result is that vKill will be sent to
> targets that don't support it, and never claimed to support it.
Why was that a problem?
>
> After this commit I guard use of vKill with a check to see if the
> multi-process feature is enabled or not. I have removed the ability to
> disable vkill specifically from the console, the user must now disable
> the whole multi-process feature set as one.
>
> I did consider leaving the separate vKill control switch in addition to
> the multi-process control switch, but this seemed unnecessary, and I
> worried that in the future another bug could be introduced where
> PACKET_vKill was used to guard sending a vKill.
Please leave the control switch in. It's useful for testing, to emulate
targets that don't support the packet.
Thanks,
Pedro Alves