diff options
author | Tom Tromey <tromey@adacore.com> | 2019-02-15 14:05:38 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2019-02-19 12:26:37 -0700 |
commit | 98814c6c111a0681e691a72834c8dcc5b8d1bb3a (patch) | |
tree | 569c709c9438d99160649efbe94acd546877a4d6 /gdb/ada-lang.h | |
parent | 6f2117ba3892110badc65a7126b19cec211acfa2 (diff) | |
download | gdb-98814c6c111a0681e691a72834c8dcc5b8d1bb3a.zip gdb-98814c6c111a0681e691a72834c8dcc5b8d1bb3a.tar.gz gdb-98814c6c111a0681e691a72834c8dcc5b8d1bb3a.tar.bz2 |
Minor Ada task cleanups
While working on the Ada task code, I noticed a few things that could
be cleaned up:
* task_list_valid_p was not set in all cases in ada_build_task_list.
This causes many needless re-fetches of the task list.
* task_list_valid_p can be bool, and various functions can also return
bool.
* Nothing checks the return value of read_known_tasks, so it can be
changed to return void.
* The call to ada_build_task_list in
ravenscar_thread_target::update_thread_list is redundant, because
this is the first thing done by iterate_over_live_ada_tasks.
Tested using the internal AdaCore test suite against a ravenscar
target.
gdb/ChangeLog
2019-02-19 Tom Tromey <tromey@adacore.com>
* ravenscar-thread.c
(ravenscar_thread_target::update_thread_list): Don't call
ada_build_task_list.
* ada-lang.h (ada_build_task_list): Don't declare.
* ada-tasks.c (struct ada_tasks_inferior_data)
<task_list_valid_p>: Now bool.
(read_known_tasks, ada_task_list_changed)
(ada_tasks_invalidate_inferior_data): Update.
(read_known_tasks_array): Return bool.
(read_known_tasks_list): Likewise.
(read_known_tasks): Return void.
(ada_build_task_list): Now static.
Diffstat (limited to 'gdb/ada-lang.h')
-rw-r--r-- | gdb/ada-lang.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h index 14470d5..ee03dbd 100644 --- a/gdb/ada-lang.h +++ b/gdb/ada-lang.h @@ -411,8 +411,6 @@ extern void iterate_over_live_ada_tasks extern const char *ada_get_tcb_types_info (void); -extern int ada_build_task_list (void); - extern void print_ada_task_info (struct ui_out *uiout, char *taskno_str, struct inferior *inf); |