From f252c6d5dc49cb27838e153e863f16ea7895859e Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 16 Jan 2019 06:37:15 -0700 Subject: Make psymtab range adapter a method on objfile This removes the objfile_psymtabs class in favor of a method on objfile and on psymtab_storage. 2019-01-16 Tom Tromey * objfiles.h (struct objfile) : New method. (class objfile_psymtabs): Remove. * psymtab.h (class psymtab_storage) : New typedef. : New method. (require_partial_symbols): Change return type. * psymtab.c (require_partial_symbols) (psym_expand_symtabs_matching): Update. * mdebugread.c (parse_partial_symbols): Update. * dbxread.c (dbx_end_psymtab): Update. --- gdb/objfiles.h | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'gdb/objfiles.h') diff --git a/gdb/objfiles.h b/gdb/objfiles.h index 2cf61957ec1..5299a3c8e5e 100644 --- a/gdb/objfiles.h +++ b/gdb/objfiles.h @@ -293,6 +293,14 @@ struct objfile DISABLE_COPY_AND_ASSIGN (objfile); + /* A range adapter that makes it possible to iterate over all + psymtabs in one objfile. */ + + psymtab_storage::partial_symtab_range psymtabs () + { + return partial_symtabs->range (); + } + /* Reset the storage for the partial symbol tables. */ void reset_psymtabs () @@ -642,19 +650,6 @@ private: struct objfile *m_objfile; }; -/* A range adapter that makes it possible to iterate over all - psymtabs in one objfile. */ - -class objfile_psymtabs : public next_adapter -{ -public: - - explicit objfile_psymtabs (struct objfile *objfile) - : next_adapter (objfile->partial_symtabs->psymtabs) - { - } -}; - #define ALL_OBJFILE_OSECTIONS(objfile, osect) \ for (osect = objfile->sections; osect < objfile->sections_end; osect++) \ if (osect->the_bfd_section == NULL) \ -- cgit v1.2.1