Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Prune program spaces in remove-inferiors
@ 2014-03-02 21:23 Doug Evans
  2014-03-03 13:49 ` Pedro Alves
  2014-05-19 21:08 ` Tom Tromey
  0 siblings, 2 replies; 5+ messages in thread
From: Doug Evans @ 2014-03-02 21:23 UTC (permalink / raw)
  To: gdb-patches

Hi.

While writing a test for Guile program space support I found that
after I removed an inferior I would still see it show up in the
progspaces list.  And then if I did "mt info program-spaces" it would
then go away.  While info commands shouldn't in general exhibit side
effects like this, I'm not too worried here (*1).

But I think remove-inferiors should call prune_program_spaces.
Is there a reason for it to not to?

Regression tested on amd64-linux.

2014-03-02  Doug Evans  <xdje42@gmail.com>

	* inferior.c (prune_inferiors): Fix comment.
	(remove_inferior_command): Call prune_program_spaces.

diff --git a/gdb/inferior.c b/gdb/inferior.c
index 90d9649..23da0c7 100644
--- a/gdb/inferior.c
+++ b/gdb/inferior.c
@@ -475,8 +475,8 @@ have_live_inferiors (void)
   return inf != NULL;
 }
 
-/* Prune away automatically added program spaces that aren't required
-   anymore.  */
+/* Prune away any unused inferiors, and then prune away no longer used
+   program spaces.  */
 
 void
 prune_inferiors (void)
@@ -788,6 +788,8 @@ remove_inferior_command (char *args, int from_tty)
 
       delete_inferior_1 (inf, 1);
     }
+
+  prune_program_spaces ();
 }
 
 struct inferior *


---
(*1): For reference sake, "info threads" is a more serious
case of this when debugging remotely, ref: "Finding new threads in the
inferior" in https://sourceware.org/gdb/wiki/LocalRemoteFeatureParity


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

end of thread, other threads:[~2014-05-19 21:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-02 21:23 [PATCH] Prune program spaces in remove-inferiors Doug Evans
2014-03-03 13:49 ` Pedro Alves
2014-05-17 19:00   ` Doug Evans
2014-05-19 21:08 ` Tom Tromey
2014-05-19 21:23   ` Doug Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox