Make ada_tasks_inferior_data::task_list an std::vector
authorSimon Marchi <simon.marchi@polymtl.ca>
Sun, 26 Aug 2018 15:56:41 +0000 (11:56 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sun, 26 Aug 2018 15:56:57 +0000 (11:56 -0400)
commitc645cda49e2b5fcf35773089d1ae16d6fc3481c6
tree83699fb7f1d014edabca1042f933e5e7430b7318
parent39e7af3e4b4e6c9f39d8d58cae73a2d307e6e1a1
Make ada_tasks_inferior_data::task_list an std::vector

This removes a VEC type.  It requires converting ada_tasks_inferior_data
to C++ (initializing fields, allocating with new).  It seems, however,
that the allocated ada_tasks_inferior_data structures are never freed
(that should be fixed separately).

gdb/ChangeLog:

* ada-tasks.c (ada_task_info_s): Remove typedef.
(DEF_VEC_O(ada_task_info_s)): Remove.
(struct ada_tasks_inferior_data): Initialize fields.
<task_list>: Make an std::vector.
(get_ada_tasks_inferior_data): Allocate with new.
(ada_get_task_number): Adjust.
(get_task_number_from_id): Likewise.
(valid_task_id): Likewise.
(ada_get_task_info_from_ptid): Likewise.
(iterate_over_live_ada_tasks): Likewise.
(add_ada_task): Likewise.
(read_known_tasks): Likewise.
(ada_build_task_list): Likewise.
(print_ada_task_info): Likewise.
(info_task): Likewise.
(task_command_1): Likewise.
gdb/ChangeLog
gdb/ada-tasks.c