From 7e955d83c4128ec773d84b92487ed1cdfed09938 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 15 Jan 2019 17:06:38 -0700 Subject: Change all_objfiles_safe adapter to be a method on program_space This changes the all_objfiles_safe range adapter to be a method on the program space, and fixes up all the users. gdb/ChangeLog 2019-01-15 Tom Tromey * progspace.h (program_space) : New typedef. : New method. * objfiles.h (class all_objfiles_safe): Remove. * objfiles.c (free_all_objfiles, objfile_purge_solibs): Update. * jit.c (jit_inferior_exit_hook): Update. --- gdb/objfiles.h | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'gdb/objfiles.h') diff --git a/gdb/objfiles.h b/gdb/objfiles.h index eca46e59f8a..599d8a1bce9 100644 --- a/gdb/objfiles.h +++ b/gdb/objfiles.h @@ -553,28 +553,6 @@ extern void default_iterate_over_objfiles_in_search_order void *cb_data, struct objfile *current_objfile); -/* An iterarable object that can be used to iterate over all - objfiles. The basic use is in a foreach, like: - - for (objfile *objf : all_objfiles_safe (pspace)) { ... } - - This variant uses a basic_safe_iterator so that objfiles can be - deleted during iteration. */ - -class all_objfiles_safe - : public next_adapter>> -{ -public: - - explicit all_objfiles_safe (struct program_space *pspace) - : next_adapter>> - (pspace->objfiles_head) - { - } -}; - /* A range adapter that makes it possible to iterate over all compunits in one objfile. */ -- cgit v1.2.1