diff options
author | Tom Tromey <tromey@adacore.com> | 2020-08-07 10:26:45 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2020-08-07 10:26:46 -0600 |
commit | 78c02f21ad122c2c775cb6629bb20829b2cafa01 (patch) | |
tree | 86d87250a4ea3578381b852f64f82305a3af9cd9 | |
parent | d5d833afcf70888c5186f5117540cfe49a928c4a (diff) | |
download | gdb-78c02f21ad122c2c775cb6629bb20829b2cafa01.zip gdb-78c02f21ad122c2c775cb6629bb20829b2cafa01.tar.gz gdb-78c02f21ad122c2c775cb6629bb20829b2cafa01.tar.bz2 |
Use gdb::function_view in iterate_over_live_ada_tasks
This changes iterate_over_live_ada_tasks to accept a
gdb::function_view. This is needed by a subsequent patch.
gdb/ChangeLog
2020-08-07 Tom Tromey <tromey@adacore.com>
* ada-lang.h (ada_task_list_iterator_ftype): Now a
gdb::function_view.
(iterate_over_live_ada_tasks): Change type of argument.
* ada-tasks.c (iterate_over_live_ada_tasks): Change type
of argument.
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/ada-lang.h | 5 | ||||
-rw-r--r-- | gdb/ada-tasks.c | 2 |
3 files changed, 12 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7bee9c9..cfa38cf 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,13 @@ 2020-08-07 Tom Tromey <tromey@adacore.com> + * ada-lang.h (ada_task_list_iterator_ftype): Now a + gdb::function_view. + (iterate_over_live_ada_tasks): Change type of argument. + * ada-tasks.c (iterate_over_live_ada_tasks): Change type + of argument. + +2020-08-07 Tom Tromey <tromey@adacore.com> + * ravenscar-thread.c (ravenscar_thread_target) <extra_thread_info>: Remove. (ravenscar_thread_target::extra_thread_info): Remove. diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h index 9be5979..ae313ce 100644 --- a/gdb/ada-lang.h +++ b/gdb/ada-lang.h @@ -375,9 +375,10 @@ extern struct ada_task_info *ada_get_task_info_from_ptid (ptid_t ptid); extern int ada_get_task_number (thread_info *thread); -typedef void (ada_task_list_iterator_ftype) (struct ada_task_info *task); +typedef gdb::function_view<void (struct ada_task_info *task)> + ada_task_list_iterator_ftype; extern void iterate_over_live_ada_tasks - (ada_task_list_iterator_ftype *iterator); + (ada_task_list_iterator_ftype iterator); extern const char *ada_get_tcb_types_info (void); diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c index 27b4587..d54c8b3 100644 --- a/gdb/ada-tasks.c +++ b/gdb/ada-tasks.c @@ -376,7 +376,7 @@ ada_get_task_info_from_ptid (ptid_t ptid) terminated yet. */ void -iterate_over_live_ada_tasks (ada_task_list_iterator_ftype *iterator) +iterate_over_live_ada_tasks (ada_task_list_iterator_ftype iterator) { struct ada_tasks_inferior_data *data; |