This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH/doc] Remove fixme of packet "k"
- From: Pedro Alves <palves at redhat dot com>
- To: Hui Zhu <hui_zhu at mentor dot com>
- Cc: Eli Zaretskii <eliz at gnu dot org>, stanshebs at earthlink dot net, gdb-patches at sourceware dot org
- Date: Thu, 20 Mar 2014 10:49:13 +0000
- Subject: Re: [PATCH/doc] Remove fixme of packet "k"
- Authentication-results: sourceware.org; auth=none
- References: <5322AE41 dot 4050008 at mentor dot com> <5328B210 dot 9060702 at earthlink dot net> <53294F15 dot 4050503 at mentor dot com> <83d2hi9ngv dot fsf at gnu dot org> <532A6417 dot 1010106 at mentor dot com>
On 03/20/2014 03:44 AM, Hui Zhu wrote:
> @item k
> @cindex @samp{k} packet
> -Kill request.
> +Kill the target process or processes.
>
> -FIXME: @emph{There is no description of how to operate when a specific
> -thread context has been selected (i.e.@: does 'k' kill only that
> -thread?)}.
> +The exact effect of this packet is not specified. For a single-process
> +target, it will kill that process if possible.
This is looking good to me too, but I'd like to suggest further
extending it some. As is I think this may leave bare metal stub
developers wondering what does "kill the single-process target"
means. I'd leave the "Kill request" title unmodified. I'd
suggest using "may" instead of "will". I think we should mention
that even not replying an ack is OK. So here's my suggestion:
@item k
@cindex @samp{k} packet
Kill request.
The exact effect of this packet is not specified.
For a bare-metal target, it may power cycle or reset the target
system. For that reason, the @samp{k} packet has no reply.
For a single-process target, it may kill that process if possible.
A multiple-process target may choose to kill just one process, or all
that are under GDB's control. For more precise control, use the vKill
packet (@pxref{vKill packet}).
If the target system immediately closes the connection in response to
@samp{k}, @value{GDBN} does not consider the lack of packet
acknowledgment to be an error, and assumes the kill was successful.
If connected using @kbd{target extended-remote}, and the target does
not close the connection in response to a kill request, @value{GDBN}
probes the target state as if a new connection was opened (pxfer to
the status/"?" packet here).
> +
> +A multiple-process target may choose to kill just one process, or all
> +that are under GDB's control. For more precise control, use the
( Should be @value{GDBN}. )
--
Pedro Alves