diff options
author | Tom Tromey <tom@tromey.com> | 2018-05-29 00:38:23 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-05-29 11:51:11 -0600 |
commit | bcb430e4cd5bcd913813236536031f1fc7f72aee (patch) | |
tree | 4b2546872474cb0ff401043bdfe261d2492cf5cd /gdb/breakpoint.c | |
parent | 894882e344735ace5231f179484086f7697d27cc (diff) | |
download | gdb-bcb430e4cd5bcd913813236536031f1fc7f72aee.zip gdb-bcb430e4cd5bcd913813236536031f1fc7f72aee.tar.gz gdb-bcb430e4cd5bcd913813236536031f1fc7f72aee.tar.bz2 |
Change program_space::added_solibs to a std::vector
This changes program_space::added_solibs to a std::vector, removing a
VEC.
Tested by the buildbot.
gdb/ChangeLog
2018-05-29 Tom Tromey <tom@tromey.com>
* progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
(struct program_space) <added_solibs>: Now a std::vector.
* breakpoint.c (print_solib_event): Update.
(check_status_catch_solib): Update.
* progspace.c (clear_program_space_solib_cache): Update.
* solib.c (update_solib_list): Update.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 721afd2..0cc9688 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -4580,8 +4580,7 @@ static void print_solib_event (int is_catchpoint) { bool any_deleted = !current_program_space->deleted_solibs.empty (); - int any_added - = !VEC_empty (so_list_ptr, current_program_space->added_solibs); + bool any_added = !current_program_space->added_solibs.empty (); if (!is_catchpoint) { @@ -4613,18 +4612,14 @@ print_solib_event (int is_catchpoint) if (any_added) { - struct so_list *iter; - int ix; - current_uiout->text (_(" Inferior loaded ")); ui_out_emit_list list_emitter (current_uiout, "added"); - for (ix = 0; - VEC_iterate (so_list_ptr, current_program_space->added_solibs, - ix, iter); - ++ix) + bool first = true; + for (struct so_list *iter : current_program_space->added_solibs) { - if (ix > 0) + if (!first) current_uiout->text (" "); + first = false; current_uiout->field_string ("library", iter->so_name); current_uiout->text ("\n"); } @@ -8009,12 +8004,7 @@ check_status_catch_solib (struct bpstats *bs) if (self->is_load) { - struct so_list *iter; - - for (int ix = 0; - VEC_iterate (so_list_ptr, current_program_space->added_solibs, - ix, iter); - ++ix) + for (struct so_list *iter : current_program_space->added_solibs) { if (!self->regex || self->compiled->exec (iter->so_name, 0, NULL, 0) == 0) |