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/psymtab.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/psymtab.h')
-rw-r--r-- | gdb/psymtab.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gdb/psymtab.h b/gdb/psymtab.h index 26aeb29..3ee5eee 100644 --- a/gdb/psymtab.h +++ b/gdb/psymtab.h @@ -92,6 +92,16 @@ public: struct partial_symtab *allocate_psymtab (); + typedef next_adapter<struct partial_symtab> partial_symtab_range; + + /* A range adapter that makes it possible to iterate over all + psymtabs in one objfile. */ + + partial_symtab_range range () + { + return partial_symtab_range (psymtabs); + } + /* Each objfile points to a linked list of partial symtabs derived from this file, one partial symtab structure for each compilation unit @@ -144,8 +154,7 @@ extern const struct quick_symbol_functions dwarf2_debug_names_functions; are loaded. This function returns a range adapter suitable for iterating over the psymtabs of OBJFILE. */ -class objfile_psymtabs; -extern objfile_psymtabs require_partial_symbols (struct objfile *objfile, - int verbose); +extern psymtab_storage::partial_symtab_range require_partial_symbols + (struct objfile *objfile, int verbose); #endif /* PSYMTAB_H */ |