aboutsummaryrefslogtreecommitdiff
path: root/gdb/ravenscar-thread.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-02-15 14:05:38 -0700
committerTom Tromey <tromey@adacore.com>2019-02-19 12:26:37 -0700
commit98814c6c111a0681e691a72834c8dcc5b8d1bb3a (patch)
tree569c709c9438d99160649efbe94acd546877a4d6 /gdb/ravenscar-thread.c
parent6f2117ba3892110badc65a7126b19cec211acfa2 (diff)
downloadgdb-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/ravenscar-thread.c')
-rw-r--r--gdb/ravenscar-thread.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/gdb/ravenscar-thread.c b/gdb/ravenscar-thread.c
index 05a8320..cb4f26a 100644
--- a/gdb/ravenscar-thread.c
+++ b/gdb/ravenscar-thread.c
@@ -374,8 +374,6 @@ ravenscar_add_thread (struct ada_task_info *task)
void
ravenscar_thread_target::update_thread_list ()
{
- ada_build_task_list ();
-
/* Do not clear the thread list before adding the Ada task, to keep
the thread that the process stratum has included into it
(m_base_ptid) and the running thread, that may not have been included