mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +08:00
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.
This commit is contained in:
parent
894882e344
commit
bcb430e4cd
@ -1,3 +1,12 @@
|
||||
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.
|
||||
|
||||
2018-05-29 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* python/py-type.c (typy_richcompare): Update.
|
||||
|
@ -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)
|
||||
|
@ -400,8 +400,7 @@ update_address_spaces (void)
|
||||
void
|
||||
clear_program_space_solib_cache (struct program_space *pspace)
|
||||
{
|
||||
VEC_free (so_list_ptr, pspace->added_solibs);
|
||||
|
||||
pspace->added_solibs.clear ();
|
||||
pspace->deleted_solibs.clear ();
|
||||
}
|
||||
|
||||
|
@ -36,9 +36,6 @@ struct address_space;
|
||||
struct program_space_data;
|
||||
struct address_space_data;
|
||||
|
||||
typedef struct so_list *so_list_ptr;
|
||||
DEF_VEC_P (so_list_ptr);
|
||||
|
||||
/* A program space represents a symbolic view of an address space.
|
||||
Roughly speaking, it holds all the data associated with a
|
||||
non-running-yet program (main executable, main symbols), and when
|
||||
@ -207,7 +204,7 @@ struct program_space
|
||||
|
||||
/* When an solib is added, it is also added to this vector. This
|
||||
is so we can properly report solib changes to the user. */
|
||||
VEC (so_list_ptr) *added_solibs = NULL;
|
||||
std::vector<struct so_list *> added_solibs;
|
||||
|
||||
/* When an solib is removed, its name is added to this vector.
|
||||
This is so we can properly report solib changes to the user. */
|
||||
|
@ -862,7 +862,7 @@ update_solib_list (int from_tty)
|
||||
{
|
||||
|
||||
i->pspace = current_program_space;
|
||||
VEC_safe_push (so_list_ptr, current_program_space->added_solibs, i);
|
||||
current_program_space->added_solibs.push_back (i);
|
||||
|
||||
TRY
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user