Move free_all_objfiles to program_space

This changes free_all_objfiles to be a method on program_space, in
line with the other changes to treat program_space as a container for
objfiles.

gdb/ChangeLog
2019-12-12  Tom Tromey  <tom@tromey.com>

	* symfile.c (symbol_file_clear): Update.
	* progspace.h (struct program_space) <free_all_objfiles>: Declare
	method.
	* progspace.c (program_space::free_all_objfiles): New method.
	* objfiles.h (free_all_objfiles): Don't declare.
	* objfiles.c (free_all_objfiles): Move to program_space.

Change-Id: I908b549d2981b6005f7ca181fc0e6d24fc8b7b6f
This commit is contained in:
Tom Tromey
2019-11-01 21:02:38 -06:00
parent d0801dd8f2
commit 343cc95202
6 changed files with 31 additions and 18 deletions

View File

@ -179,6 +179,9 @@ struct program_space
return objfiles_list.size () > 1;
}
/* Free all the objfiles associated with this program space. */
void free_all_objfiles ();
/* Pointer to next in linked list. */
struct program_space *next = NULL;