mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-18 13:23:10 +08:00
[Ada] Add ada-tasks.c:iterate_over_live_ada_tasks
This new function is needed by the ravenscar-thread layer. gdb/ChangeLog: * ada-tasks.c (iterate_over_live_ada_tasks): New function. * ada-lang.h (iterate_over_live_ada_tasks): Declare.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2010-09-28 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
|
* ada-tasks.c (iterate_over_live_ada_tasks): New function.
|
||||||
|
* ada-lang.h (iterate_over_live_ada_tasks): Declare.
|
||||||
|
|
||||||
2010-09-27 Pierre Muller <muller@ics.u-strasbg.fr>
|
2010-09-27 Pierre Muller <muller@ics.u-strasbg.fr>
|
||||||
|
|
||||||
* amd64-windows-tdep.c (amd64_skip_main_prologue): New function.
|
* amd64-windows-tdep.c (amd64_skip_main_prologue): New function.
|
||||||
|
@ -378,6 +378,10 @@ extern int valid_task_id (int);
|
|||||||
|
|
||||||
extern int ada_get_task_number (ptid_t);
|
extern int ada_get_task_number (ptid_t);
|
||||||
|
|
||||||
|
typedef void (ada_task_list_iterator_ftype) (struct ada_task_info *task);
|
||||||
|
extern void iterate_over_live_ada_tasks
|
||||||
|
(ada_task_list_iterator_ftype *iterator);
|
||||||
|
|
||||||
extern int ada_build_task_list (int warn_if_null);
|
extern int ada_build_task_list (int warn_if_null);
|
||||||
|
|
||||||
extern int ada_exception_catchpoint_p (struct breakpoint *b);
|
extern int ada_exception_catchpoint_p (struct breakpoint *b);
|
||||||
|
@ -212,6 +212,27 @@ ada_task_is_alive (struct ada_task_info *task_info)
|
|||||||
return (task_info->state != Terminated);
|
return (task_info->state != Terminated);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Call the ITERATOR function once for each Ada task that hasn't been
|
||||||
|
terminated yet. */
|
||||||
|
|
||||||
|
void
|
||||||
|
iterate_over_live_ada_tasks (ada_task_list_iterator_ftype *iterator)
|
||||||
|
{
|
||||||
|
int i, nb_tasks;
|
||||||
|
struct ada_task_info *task;
|
||||||
|
|
||||||
|
ada_build_task_list (0);
|
||||||
|
nb_tasks = VEC_length (ada_task_info_s, task_list);
|
||||||
|
|
||||||
|
for (i = 0; i < nb_tasks; i++)
|
||||||
|
{
|
||||||
|
task = VEC_index (ada_task_info_s, task_list, i);
|
||||||
|
if (!ada_task_is_alive (task))
|
||||||
|
continue;
|
||||||
|
iterator (task);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Extract the contents of the value as a string whose length is LENGTH,
|
/* Extract the contents of the value as a string whose length is LENGTH,
|
||||||
and store the result in DEST. */
|
and store the result in DEST. */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user