diff options
author | Tom Tromey <tom@tromey.com> | 2020-05-08 14:21:22 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2020-05-08 14:21:22 -0600 |
commit | 94c93c35b50d0783fdfda277508d0ae6c3e372fb (patch) | |
tree | e7df63b540b33dc1f070c3394b1ad942121470eb /gdb/progspace.h | |
parent | a1fd1ac9def557cbb7570cf90178a00cb26e7fef (diff) | |
download | gdb-94c93c35b50d0783fdfda277508d0ae6c3e372fb.zip gdb-94c93c35b50d0783fdfda277508d0ae6c3e372fb.tar.gz gdb-94c93c35b50d0783fdfda277508d0ae6c3e372fb.tar.bz2 |
Remove ALL_PSPACES
This removes the ALL_PSPACES macro. In this case it seemed cleanest
to change how program spaces are stored -- instead of using a linked
list, they are now stored in a std::vector.
gdb/ChangeLog
2020-05-08 Tom Tromey <tom@tromey.com>
* symtab.c (set_symbol_cache_size)
(maintenance_print_symbol_cache, maintenance_flush_symbol_cache)
(maintenance_print_symbol_cache_statistics): Update.
* symmisc.c (print_symbol_bcache_statistics)
(print_objfile_statistics, maintenance_print_objfiles)
(maintenance_info_symtabs, maintenance_check_symtabs)
(maintenance_expand_symtabs, maintenance_info_line_tables):
Update.
* symfile-debug.c (set_debug_symfile): Update.
* source.c (forget_cached_source_info): Update.
* python/python.c (gdbpy_progspaces): Update.
* psymtab.c (maintenance_info_psymtabs): Update.
* probe.c (parse_probes): Update.
* linespec.c (iterate_over_all_matching_symtabs)
(collect_symtabs_from_filename, search_minsyms_for_name): Update.
* guile/scm-progspace.c (gdbscm_progspaces): Update.
* exec.c (exec_target::close): Update.
* ada-tasks.c (ada_tasks_new_objfile_observer): Update.
* breakpoint.c (print_one_breakpoint_location)
(create_longjmp_master_breakpoint)
(create_std_terminate_master_breakpoint): Update.
* progspace.c (program_spaces): Now a std::vector.
(maybe_new_address_space): Update.
(add_program_space): Remove.
(program_space::program_space): Update.
(remove_program_space): Update.
(number_of_program_spaces): Remove.
(print_program_space, update_address_spaces): Update.
* progspace.h (program_spaces): Change type.
(ALL_PSPACES): Remove.
(number_of_program_spaces): Don't declare.
(struct program_space) <next>: Remove.
Diffstat (limited to 'gdb/progspace.h')
-rw-r--r-- | gdb/progspace.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/gdb/progspace.h b/gdb/progspace.h index 0e32224..099b4dc 100644 --- a/gdb/progspace.h +++ b/gdb/progspace.h @@ -28,6 +28,7 @@ #include "gdbsupport/next-iterator.h" #include "gdbsupport/safe-iterator.h" #include <list> +#include <vector> struct target_ops; struct bfd; @@ -272,9 +273,6 @@ struct program_space next_adapter<struct so_list> solibs () const; - /* Pointer to next in linked list. */ - struct program_space *next = NULL; - /* Unique ID number. */ int num = 0; @@ -369,17 +367,11 @@ struct address_space #define current_target_sections (¤t_program_space->target_sections) /* The list of all program spaces. There's always at least one. */ -extern struct program_space *program_spaces; +extern std::vector<struct program_space *>program_spaces; /* The current program space. This is always non-null. */ extern struct program_space *current_program_space; -#define ALL_PSPACES(pspace) \ - for ((pspace) = program_spaces; (pspace) != NULL; (pspace) = (pspace)->next) - -/* Returns the number of program spaces listed. */ -extern int number_of_program_spaces (void); - /* Returns true iff there's no inferior bound to PSPACE. */ extern int program_space_empty_p (struct program_space *pspace); |