diff options
author | Tom Tromey <tom@tromey.com> | 2019-01-16 06:37:15 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-01-17 15:42:05 -0700 |
commit | f252c6d5dc49cb27838e153e863f16ea7895859e (patch) | |
tree | 4b84a64f29b3e1318eead66fc233483a04a931a5 /gdb/objfiles.h | |
parent | b669c95337903d39aa2254e8ea0405c0ac117d24 (diff) | |
download | gdb-f252c6d5dc49cb27838e153e863f16ea7895859e.zip gdb-f252c6d5dc49cb27838e153e863f16ea7895859e.tar.gz gdb-f252c6d5dc49cb27838e153e863f16ea7895859e.tar.bz2 |
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 <tom@tromey.com>
* objfiles.h (struct objfile) <psymtabs>: New method.
(class objfile_psymtabs): Remove.
* psymtab.h (class psymtab_storage) <partial_symtab_range>: New
typedef.
<range>: 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.
Diffstat (limited to 'gdb/objfiles.h')
-rw-r--r-- | gdb/objfiles.h | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/gdb/objfiles.h b/gdb/objfiles.h index 2cf6195..5299a3c 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<struct partial_symtab> -{ -public: - - explicit objfile_psymtabs (struct objfile *objfile) - : next_adapter<struct partial_symtab> (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) \ |