gdb/doc: document MI -remove-inferior command
Commit Message
Back in 2010 the -remove-inferior command was added in commit
a79b8f6ea8c2, unfortunately this command was never added to the
documentation.
This commit addresses that oversight.
---
gdb/doc/gdb.texinfo | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
base-commit: 25a0d393c728314e257789b948c3a2c98aca7a70
Comments
> Cc: Andrew Burgess <aburgess@redhat.com>
> Date: Wed, 15 Feb 2023 11:52:16 +0000
> From: Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org>
>
> Back in 2010 the -remove-inferior command was added in commit
> a79b8f6ea8c2, unfortunately this command was never added to the
> documentation.
>
> This commit addresses that oversight.
> ---
> gdb/doc/gdb.texinfo | 34 ++++++++++++++++++++++++++++++++++
> 1 file changed, 34 insertions(+)
Thanks, this is okay.
Approved-By: Eli Zaretskii <eliz@gnu.org>
Hi!
On 2023-02-15 11:52 a.m., Andrew Burgess via Gdb-patches wrote:
>
> +@subheading The @code{-remove-inferior} Command
> +@findex -remove-inferior
Sorry for the extra trouble, but please put the @findex before the @subheading, as per:
https://inbox.sourceware.org/gdb-patches/83zg9hec14.fsf@gnu.org/T/#m9adb943b330c10be31774a0009767b0236cbd1f9
Pedro Alves
Pedro Alves <pedro@palves.net> writes:
> Hi!
>
> On 2023-02-15 11:52 a.m., Andrew Burgess via Gdb-patches wrote:
>>
>> +@subheading The @code{-remove-inferior} Command
>> +@findex -remove-inferior
>
> Sorry for the extra trouble, but please put the @findex before the @subheading, as per:
>
> https://inbox.sourceware.org/gdb-patches/83zg9hec14.fsf@gnu.org/T/#m9adb943b330c10be31774a0009767b0236cbd1f9
Not a problem. I moved the @findex and pushed this patch.
Thanks,
Andrew
@@ -3384,6 +3384,7 @@
You can now simply switch focus to inferior 2 and run it.
+@anchor{remove_inferiors_cli}
@kindex remove-inferiors
@item remove-inferiors @var{infno}@dots{}
Removes the inferior or inferiors @var{infno}@dots{}. It is not
@@ -38302,6 +38303,39 @@
^done,inferior="i3"
@end smallexample
+@subheading The @code{-remove-inferior} Command
+@findex -remove-inferior
+
+@subsubheading Synopsis
+
+@smallexample
+-remove-inferior @var{inferior-id}
+@end smallexample
+
+Removes an inferior (@pxref{Inferiors Connections and Programs}).
+Only inferiors that have exited can be removed. The @var{inferior-id}
+is the inferior to be removed, and should be the same id string as
+returned by the @samp{-add-inferior} command.
+
+When an inferior is successfully removed a
+@code{=thread-group-removed} notification (@pxref{GDB/MI Async
+Records}) is emitted, the @var{id} field of which contains the
+@var{inferior-id} for the removed inferior.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{remove-inferiors}
+(@pxref{remove_inferiors_cli,,@samp{remove-inferiors}}).
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-remove-inferior i3
+=thread-group-removed,id="i3"
+^done
+@end smallexample
+
@subheading The @code{-interpreter-exec} Command
@findex -interpreter-exec