aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-01-15 17:06:38 -0700
committerTom Tromey <tom@tromey.com>2019-01-17 15:42:00 -0700
commit7e955d83c4128ec773d84b92487ed1cdfed09938 (patch)
tree95fd2b230aa1ec340efdf069c98423ae73a6d6bd /gdb/objfiles.c
parent2030c079717475f5b6fad837bb81758891f3b802 (diff)
downloadgdb-7e955d83c4128ec773d84b92487ed1cdfed09938.zip
gdb-7e955d83c4128ec773d84b92487ed1cdfed09938.tar.gz
gdb-7e955d83c4128ec773d84b92487ed1cdfed09938.tar.bz2
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 <tom@tromey.com> * progspace.h (program_space) <objfiles_safe_range>: New typedef. <objfiles_safe>: 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.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 02b1a9d..82400a4 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -514,7 +514,7 @@ objfile_separate_debug_iterate (const struct objfile *parent,
/* Put one object file before a specified on in the global list.
This can be used to make sure an object file is destroyed before
- another when using all_objfiles_safe to free all objfiles. */
+ another when using objfiles_safe to free all objfiles. */
void
put_objfile_before (struct objfile *objfile, struct objfile *before_this)
{
@@ -587,7 +587,7 @@ add_separate_debug_objfile (struct objfile *objfile, struct objfile *parent)
parent->separate_debug_objfile = objfile;
/* Put the separate debug object before the normal one, this is so that
- usage of all_objfiles_safe will stay safe. */
+ usage of objfiles_safe will stay safe. */
put_objfile_before (objfile, parent);
}
@@ -735,7 +735,7 @@ free_all_objfiles (void)
for (so = master_so_list (); so; so = so->next)
gdb_assert (so->objfile == NULL);
- for (objfile *objfile : all_objfiles_safe (current_program_space))
+ for (objfile *objfile : current_program_space->objfiles_safe ())
delete objfile;
clear_symtab_users (0);
}
@@ -1044,7 +1044,7 @@ have_full_symbols (void)
void
objfile_purge_solibs (void)
{
- for (objfile *objf : all_objfiles_safe (current_program_space))
+ for (objfile *objf : current_program_space->objfiles_safe ())
{
/* We assume that the solib package has been purged already, or will
be soon. */