* [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* Re: [PATCH] Prune program spaces in remove-inferiors
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
1 sibling, 1 reply; 5+ messages in thread
From: Pedro Alves @ 2014-03-03 13:49 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
On 03/02/2014 09:23 PM, Doug Evans wrote:
> 2014-03-02 Doug Evans <xdje42@gmail.com>
>
> * inferior.c (prune_inferiors): Fix comment.
> (remove_inferior_command): Call prune_program_spaces.
Looks fine to me.
Thanks,
--
Pedro Alves
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Prune program spaces in remove-inferiors
2014-03-03 13:49 ` Pedro Alves
@ 2014-05-17 19:00 ` Doug Evans
0 siblings, 0 replies; 5+ messages in thread
From: Doug Evans @ 2014-05-17 19:00 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches
On Mon, Mar 3, 2014 at 5:49 AM, Pedro Alves <palves@redhat.com> wrote:
> On 03/02/2014 09:23 PM, Doug Evans wrote:
>
>> 2014-03-02 Doug Evans <xdje42@gmail.com>
>>
>> * inferior.c (prune_inferiors): Fix comment.
>> (remove_inferior_command): Call prune_program_spaces.
>
> Looks fine to me.
>
> Thanks,
Committed.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Prune program spaces in remove-inferiors
2014-03-02 21:23 [PATCH] Prune program spaces in remove-inferiors Doug Evans
2014-03-03 13:49 ` Pedro Alves
@ 2014-05-19 21:08 ` Tom Tromey
2014-05-19 21:23 ` Doug Evans
1 sibling, 1 reply; 5+ messages in thread
From: Tom Tromey @ 2014-05-19 21:08 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
Doug> Regression tested on amd64-linux.
Doug> 2014-03-02 Doug Evans <xdje42@gmail.com>
Doug> * inferior.c (prune_inferiors): Fix comment.
Doug> (remove_inferior_command): Call prune_program_spaces.
This patch causes gdb to crash in gdb.multi/base.exp for me.
Tom
^ 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