public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Delete program spaces directly when removing inferiors
@ 2015-07-08 15:32 sergiodj+buildbot
  2015-07-08 15:32 ` Failures on Debian-i686, branch master sergiodj+buildbot
                   ` (26 more replies)
  0 siblings, 27 replies; 29+ messages in thread
From: sergiodj+buildbot @ 2015-07-08 15:32 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 0560c645c02eba2828a053039dcfdf676cdd1d00 ***

Author: Simon Marchi <simon.marchi@ericsson.com>
Branch: master
Commit: 0560c645c02eba2828a053039dcfdf676cdd1d00

Delete program spaces directly when removing inferiors
When deleting an inferior, delete the associated program space as well
if it becomes unused. This replaces the "pruning" approach, with which
you could forget to call prune_program_spaces (as seen, with the
-remove-inferior command, see [1]).

This allows to remove the prune_program_spaces function. At the same
time, I was able to clean up the delete_inferior* family.
delete_inferior_silent and delete_inferior were unused, which allowed
renaming delete_inferior_1 to delete_inferior. Also, since all calls to
it were with silent=1, I removed that parameter completely.

I renamed pspace_empty_p to program_space_empty_p. I prefer if the
"exported" functions have a more explicit and standard name.

Tested on Ubuntu 14.10.

This obsoletes my previous patch "Add call to prune_program_spaces in
mi_cmd_remove_inferior" [1].

[1] https://sourceware.org/ml/gdb-patches/2014-09/msg00717.html

gdb/Changelog:

	* inferior.c (delete_inferior_1): Rename to ...
	(delete_inferior): ..., remove 'silent' parameter, delete
	program space when unused and remove call to prune_program_spaces.
	Remove the old, unused, delete_inferior.
	(delete_inferior_silent): Remove.
	(prune_inferiors): Change call from delete_inferior_1 to
	delete_inferior and remove 'silent' parameter. Remove call to
	prune_program_spaces.
	(remove_inferior_command): Idem.
	* inferior.h (delete_inferior_1): Rename to...
	(delete_inferior): ..., remove 'silent' parameter and remove the
	original delete_inferior.
	(delete_inferior_silent): Remove.
	* mi/mi-main.c (mi_cmd_remove_inferior): Change call from
	delete_inferior_1 to delete_inferior and remove 'silent'
	parameter.
	* progspace.c (prune_program_spaces): Remove.
	(pspace_empty_p): Rename to...
	(program_space_empty_p): ... and make non-static.
	(delete_program_space): New.
	* progspace.h (prune_program_spaces): Remove declaration.
	(program_space_empty_p): New declaration.
	(delete_program_space): New declaration.


^ permalink raw reply	[flat|nested] 29+ messages in thread
* [binutils-gdb] Delete program spaces directly when removing inferiors
@ 2015-07-08 20:04 sergiodj+buildbot
  0 siblings, 0 replies; 29+ messages in thread
From: sergiodj+buildbot @ 2015-07-08 20:04 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 7a41607e01b505db895fcebcad618606cfab1ecf ***

Author: Simon Marchi <simon.marchi@ericsson.com>
Branch: master
Commit: 7a41607e01b505db895fcebcad618606cfab1ecf

Delete program spaces directly when removing inferiors
When deleting an inferior, delete the associated program space as well
if it becomes unused. This replaces the "pruning" approach, with which
you could forget to call prune_program_spaces (as seen, with the
-remove-inferior command, see [1]).

This allows to remove the prune_program_spaces function. At the same
time, I was able to clean up the delete_inferior* family:

 - delete_inferior is unused
 - delete_inferior_silent is only used in monitor_close, but is replaced
   with discard_all_inferiors [2], so it becomes unused
 - All remaining calls to delete_inferior_1 are with silent=1, so the
   parameter is removed
 - delete_inferior_1 is renamed to delete_inferior

I renamed pspace_empty_p to program_space_empty_p. I prefer if the
"exported" functions have a more explicit and standard name.

Tested on Ubuntu 14.10.

[1] https://sourceware.org/ml/gdb-patches/2014-09/msg00717.html
[2] See https://sourceware.org/ml/gdb-patches/2015-07/msg00228.html and
    follow-ups for details.

gdb/Changelog:

	* inferior.c (delete_inferior_1): Rename to ...
	(delete_inferior): ..., remove 'silent' parameter, delete
	program space when unused and remove call to prune_program_spaces.
	Remove the old, unused, delete_inferior.
	(delete_inferior_silent): Remove.
	(prune_inferiors): Change call from delete_inferior_1 to
	delete_inferior and remove 'silent' parameter. Remove call to
	prune_program_spaces.
	(remove_inferior_command): Idem.
	* inferior.h (delete_inferior_1): Rename to...
	(delete_inferior): ..., remove 'silent' parameter and remove the
	original delete_inferior.
	(delete_inferior_silent): Remove.
	* mi/mi-main.c (mi_cmd_remove_inferior): Change call from
	delete_inferior_1 to delete_inferior and remove 'silent'
	parameter.
	* progspace.c (prune_program_spaces): Remove.
	(pspace_empty_p): Rename to...
	(program_space_empty_p): ... and make non-static.
	(delete_program_space): New.
	* progspace.h (prune_program_spaces): Remove declaration.
	(program_space_empty_p): New declaration.
	(delete_program_space): New declaration.
	* monitor.c (monitor_close): Replace call to
	delete_thread_silent and delete_inferior_silent with
	discard_all_inferiors.


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

end of thread, other threads:[~2015-07-09  6:20 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-08 15:32 [binutils-gdb] Delete program spaces directly when removing inferiors sergiodj+buildbot
2015-07-08 15:32 ` Failures on Debian-i686, branch master sergiodj+buildbot
2015-07-08 15:32 ` Failures on Debian-s390x-native-extended-gdbserver-m64, " sergiodj+buildbot
2015-07-08 15:34 ` Failures on Debian-s390x-m64, " sergiodj+buildbot
2015-07-08 15:35 ` Failures on Debian-i686-native-gdbserver, " sergiodj+buildbot
2015-07-08 15:37 ` Failures on Debian-i686-native-extended-gdbserver, " sergiodj+buildbot
2015-07-08 15:37 ` Failures on Debian-s390x-native-gdbserver-m64, " sergiodj+buildbot
2015-07-08 15:44 ` Failures on Debian-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2015-07-08 15:45 ` Failures on Fedora-s390x-m64, " sergiodj+buildbot
2015-07-08 15:54 ` Failures on Debian-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2015-07-08 15:55 ` Failures on AIX-POWER7-plain, " sergiodj+buildbot
2015-07-08 16:23 ` Failures on Fedora-ppc64be-cc-with-index, " sergiodj+buildbot
2015-07-08 16:28 ` Failures on Fedora-ppc64be-m64, " sergiodj+buildbot
2015-07-08 16:33 ` Failures on Fedora-ppc64be-native-gdbserver-m64, " sergiodj+buildbot
2015-07-08 16:38 ` Failures on Fedora-ppc64be-native-extended-gdbserver-m64, " sergiodj+buildbot
2015-07-08 17:51 ` Failures on Fedora-ppc64le-native-extended-gdbserver-m64, " sergiodj+buildbot
2015-07-08 17:55 ` Failures on Fedora-ppc64le-cc-with-index, " sergiodj+buildbot
2015-07-08 18:00 ` Failures on Fedora-ppc64le-native-gdbserver-m64, " sergiodj+buildbot
2015-07-08 18:04 ` Failures on Fedora-ppc64le-m64, " sergiodj+buildbot
2015-07-09  5:23 ` Failures on Fedora-i686, " sergiodj+buildbot
2015-07-09  5:35 ` Failures on Fedora-x86_64-m32, " sergiodj+buildbot
2015-07-09  5:47 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
2015-07-09  5:55 ` Failures on Fedora-x86_64-cc-with-index, " sergiodj+buildbot
2015-07-09  5:58 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2015-07-09  6:06 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2015-07-09  6:08 ` Failures on Fedora-x86_64-m64, " sergiodj+buildbot
2015-07-09  6:18 ` Failures on Fedora-x86_64-cxx-build-m64, " sergiodj+buildbot
2015-07-09  6:20 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot
2015-07-08 20:04 [binutils-gdb] Delete program spaces directly when removing inferiors sergiodj+buildbot

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).