From: Andrew Burgess Date: Wed, 15 Feb 2023 11:42:12 +0000 (+0000) Subject: gdb/doc: document MI -remove-inferior command X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=42af03dafee14cf7b3f4e324ceca1b0ababd1eb9;p=binutils-gdb.git gdb/doc: document MI -remove-inferior command 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 --- diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index bbb39e73c02..8c2cd23df18 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -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