Commit 98814c6
committed
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.1 parent 6f2117b commit 98814c6
4 files changed
+42
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
1 | 16 | | |
2 | 17 | | |
3 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
414 | | - | |
415 | | - | |
416 | 414 | | |
417 | 415 | | |
418 | 416 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
230 | 232 | | |
231 | 233 | | |
232 | 234 | | |
233 | | - | |
| 235 | + | |
234 | 236 | | |
235 | 237 | | |
236 | 238 | | |
| |||
803 | 805 | | |
804 | 806 | | |
805 | 807 | | |
806 | | - | |
| 808 | + | |
807 | 809 | | |
808 | | - | |
| 810 | + | |
809 | 811 | | |
810 | 812 | | |
811 | 813 | | |
| |||
826 | 828 | | |
827 | 829 | | |
828 | 830 | | |
829 | | - | |
| 831 | + | |
830 | 832 | | |
831 | 833 | | |
832 | 834 | | |
833 | | - | |
| 835 | + | |
834 | 836 | | |
835 | | - | |
| 837 | + | |
836 | 838 | | |
837 | 839 | | |
838 | 840 | | |
| |||
843 | 845 | | |
844 | 846 | | |
845 | 847 | | |
846 | | - | |
| 848 | + | |
847 | 849 | | |
848 | 850 | | |
849 | 851 | | |
| |||
864 | 866 | | |
865 | 867 | | |
866 | 868 | | |
867 | | - | |
| 869 | + | |
868 | 870 | | |
869 | 871 | | |
870 | 872 | | |
| |||
962 | 964 | | |
963 | 965 | | |
964 | 966 | | |
965 | | - | |
966 | | - | |
| 967 | + | |
967 | 968 | | |
968 | | - | |
969 | | - | |
| 969 | + | |
| 970 | + | |
970 | 971 | | |
971 | 972 | | |
972 | 973 | | |
| |||
983 | 984 | | |
984 | 985 | | |
985 | 986 | | |
| 987 | + | |
| 988 | + | |
986 | 989 | | |
987 | 990 | | |
988 | | - | |
989 | | - | |
990 | | - | |
991 | | - | |
992 | | - | |
993 | | - | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
994 | 999 | | |
995 | | - | |
996 | | - | |
997 | | - | |
998 | | - | |
999 | | - | |
1000 | | - | |
1001 | 1000 | | |
1002 | 1001 | | |
1003 | 1002 | | |
1004 | 1003 | | |
1005 | 1004 | | |
1006 | 1005 | | |
1007 | | - | |
1008 | | - | |
| 1006 | + | |
| 1007 | + | |
1009 | 1008 | | |
1010 | 1009 | | |
1011 | 1010 | | |
| |||
1361 | 1360 | | |
1362 | 1361 | | |
1363 | 1362 | | |
1364 | | - | |
| 1363 | + | |
1365 | 1364 | | |
1366 | 1365 | | |
1367 | 1366 | | |
| |||
1380 | 1379 | | |
1381 | 1380 | | |
1382 | 1381 | | |
1383 | | - | |
| 1382 | + | |
1384 | 1383 | | |
1385 | 1384 | | |
1386 | 1385 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
378 | | - | |
379 | 377 | | |
380 | 378 | | |
381 | 379 | | |
| |||
0 commit comments