summaryrefslogtreecommitdiff
path: root/gdb/objfiles.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/objfiles.h')
-rw-r--r--gdb/objfiles.h22
1 files changed, 9 insertions, 13 deletions
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index 599d8a1bce9..2cf61957ec1 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -301,6 +301,15 @@ struct objfile
partial_symtabs.reset (new psymtab_storage ());
}
+ typedef next_adapter<struct compunit_symtab> compunits_range;
+
+ /* A range adapter that makes it possible to iterate over all
+ compunits in one objfile. */
+
+ compunits_range compunits ()
+ {
+ return compunits_range (compunit_symtabs);
+ }
/* All struct objfile's are chained together by their next pointers.
The program space field "objfiles" (frequently referenced via
@@ -554,19 +563,6 @@ extern void default_iterate_over_objfiles_in_search_order
/* A range adapter that makes it possible to iterate over all
- compunits in one objfile. */
-
-class objfile_compunits : public next_adapter<struct compunit_symtab>
-{
-public:
-
- explicit objfile_compunits (struct objfile *objfile)
- : next_adapter<struct compunit_symtab> (objfile->compunit_symtabs)
- {
- }
-};
-
-/* A range adapter that makes it possible to iterate over all
minimal symbols of an objfile. */
class objfile_msymbols