This patch fixes a bug in System.Stack_Usage.Tasking.Compute_All_Tasks
where it would attempt to read the stack of threads that had already
completed.
gcc/ada/ChangeLog:
* libgnarl/s-stusta.adb (Compute_All_Tasks): Skip terminated tasks.
-- This is why this package is part of GNARL:
with System.Tasking.Debug;
+with System.Tasking.Stages;
with System.Task_Primitives.Operations;
with System.IO;
-- Calculate the task usage for a given task
- Report_For_Task (Id);
+ if not System.Tasking.Stages.Terminated (Id) then
+ Report_For_Task (Id);
+ end if;
end loop;
end if;