gdb/doc: document MI -remove-inferior command
authorAndrew Burgess <aburgess@redhat.com>
Wed, 15 Feb 2023 11:42:12 +0000 (11:42 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Thu, 16 Feb 2023 08:42:48 +0000 (08:42 +0000)
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.

Approved-By: Eli Zaretskii <eliz@gnu.org>
gdb/doc/gdb.texinfo

index bbb39e73c0285da5aabb1c21b7dd12ba335c2af1..8c2cd23df18c72d82ec84050cc4e2fab21b5bdce 100644 (file)
@@ -3388,6 +3388,7 @@ Added inferior 2.
 
 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
@@ -38360,6 +38361,39 @@ The corresponding @value{GDBN} command is @samp{add-inferior}
 ^done,inferior="i3"
 @end smallexample
 
+@findex -remove-inferior
+@subheading The @code{-remove-inferior} Command
+
+@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
+
 @findex -interpreter-exec
 @subheading The @code{-interpreter-exec} Command