This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA/RFC/DOC] Fix the different between behavior of "detach inferior" "kill inferior" and doc
- From: Hui Zhu <teawater at gmail dot com>
- To: gdb-patches ml <gdb-patches at sourceware dot org>
- Cc: Eli Zaretskii <eliz at gnu dot org>
- Date: Fri, 30 Jul 2010 16:13:42 +0800
- Subject: [RFA/RFC/DOC] Fix the different between behavior of "detach inferior" "kill inferior" and doc
Hi,
The doc said:
@kindex detach inferior @var{infno}
@item detach inferior @var{infno}
Detach from the inferior identified by @value{GDBN} inferior number
@var{infno}, and remove it from the inferior list.
@kindex kill inferior @var{infno}
@item kill inferior @var{infno}
Kill the inferior identified by @value{GDBN} inferior number
@var{infno}, and remove it from the inferior list.
But when I try this command:
(gdb) info inferiors
Num Description Executable
* 2 <null>
1 process 12089 /home/teawater/gdb/1
(gdb) kill inferior 1
(gdb) info inferiors
Num Description Executable
2 <null>
* 1 <null> /home/teawater/gdb/1
(gdb)
Inferior 1 is not removed from list.
And I check the code in inferior.c:
switch_to_thread (tp->ptid);
target_kill ();
bfd_cache_close_all ();
}
Look it doesn't want remove it from inferior list.
So I make a patch to update the doc.
Thanks,
Hui
2010-07-30 Hui Zhu <teawater@gmail.com>
* gdb.texinfo (Inferiors and Programs): Update the introduce of
"detach inferior" and "kill inferior".
---
doc/gdb.texinfo | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/doc/gdb.texinfo
+++ b/doc/gdb.texinfo
@@ -2481,12 +2481,12 @@ using the @w{@code{kill inferior}} comma
@kindex detach inferior @var{infno}
@item detach inferior @var{infno}
Detach from the inferior identified by @value{GDBN} inferior number
-@var{infno}, and remove it from the inferior list.
+@var{infno}.
@kindex kill inferior @var{infno}
@item kill inferior @var{infno}
Kill the inferior identified by @value{GDBN} inferior number
-@var{infno}, and remove it from the inferior list.
+@var{infno}.
@end table
After the successful completion of a command such as @code{detach},