public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb/doc: document MI -remove-inferior command
@ 2023-02-15 11:52 Andrew Burgess
  2023-02-15 13:55 ` Eli Zaretskii
  2023-02-15 15:33 ` Pedro Alves
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew Burgess @ 2023-02-15 11:52 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Burgess

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(+)

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 0beb45857c3..869c0724863 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -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
 

base-commit: 25a0d393c728314e257789b948c3a2c98aca7a70
-- 
2.25.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-02-16  8:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-15 11:52 [PATCH] gdb/doc: document MI -remove-inferior command Andrew Burgess
2023-02-15 13:55 ` Eli Zaretskii
2023-02-15 15:33 ` Pedro Alves
2023-02-16  8:44   ` Andrew Burgess

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).